Skip to content

Free · IPv4 · IPv6 · CIDR · VLSM

IP subnet calculator
done right.

Type an IP address and a subnet mask or CIDR prefix. Get the network, broadcast, IP range, wildcard mask and Cisco snippets — instantly, with the bits laid out in front of you.

Enter any notation: 192.168.1.1/24, 10.0.0.1 255.255.255.0, or plain IP

Subnet Mask Prefix: /24Netmask: 255.255.255.0
Presets:

32-Bit Subnet Boundary Visualizer

Click any bit position to adjust the CIDR prefix boundary

Network (24 bits)
Host (8 bits)
Octet 1192Mask: 255
11111111
Octet 2168Mask: 255
11111111
Octet 31Mask: 255
11111111
Octet 41Mask: 0
00000000
Usable Hosts
254
Total IPs: 256
Network Address
192.168.1.0
Prefix: /24
Usable Host Range
192.168.1.1
192.168.1.254
Broadcast Address
192.168.1.255
Subnet Broadcast

Detailed Subnet Breakdown

Private (RFC 1918)
Subnet Mask
255.255.255.0
Wildcard Mask (Cisco ACL)
0.0.0.255
Hexadecimal IP / Mask
0xC0A80101 / 0xFFFFFF00
Integer / Decimal IP
3232235777
IP Class & Routing
Class C • Classless Inter-Domain Routing (CIDR)
Reverse DNS (in-addr.arpa)
1.1.168.192.in-addr.arpa
Cisco IOS Command Templates
ip address 192.168.1.1 255.255.255.0
access-list 1 permit 192.168.1.0 0.0.0.255
01

Interactive 32-bit ruler

Tap any bit to move the network/host boundary and watch every value update. Binary math, made tangible.

02

RFC 3021 & special ranges

Correct handling of /31 point-to-point links, /32 host routes, CGNAT (100.64.0.0/10) and link-local blocks.

03

Cisco-ready output

Copy interface commands and wildcard ACL entries straight into your router config.

The free IP subnet calculator for IPv4 and IPv6

An IP subnet calculator is an online tool that takes an IP address and a subnet mask (or a CIDR prefix) and instantly works out everything about the network that address belongs to: the network address, the broadcast address, the first and last usable host, the total number of hosts, the wildcard mask and more. Instead of converting octets to binary and counting bits by hand, you type one line and read the answer. ipcalc.net is a fast, accurate IP calculator that handles both IPv4 and IPv6, runs entirely in your browser and never asks you to sign up.

Whether you are studying for a networking exam, planning a VPC, configuring a router or just trying to understand what 192.168.1.0/24 means, a good subnet calculator saves time and prevents expensive mistakes. A single wrong bit in a mask can overlap two networks, break routing or open a firewall rule far wider than intended.

How to use this subnet calculator

  1. Type an IPv4 address with a prefix (10.0.0.1/22) or a dotted mask (10.0.0.1 255.255.252.0) into the box above. A bare IP address also works.
  2. Adjust the prefix with the slider, the drop-down or by clicking bits in the 32-bit ruler to see the network and host boundary move.
  3. Read the results: network address, broadcast address, usable host range, subnet mask, wildcard mask, hexadecimal and integer forms, and reverse DNS name.
  4. Copy any value with one click, or press Share to send a link that reopens the exact same calculation.

What is a subnet mask?

An IP subnet mask is a 32-bit number that splits an IPv4 address into a network portion and a host portion. Wherever the mask has a 1, that bit of the address identifies the network; wherever it has a 0, the bit identifies a host inside that network. The mask 255.255.255.0 is written in binary as 24 ones followed by 8 zeros, so the first three octets name the network and the last octet names the host. Devices compare the mask against a destination address to decide whether a packet stays on the local network or must be sent to a gateway. If you have ever wondered about an ip subnet mask gateway setup, this is the rule: a host talks directly to any address inside its own subnet and uses its default gateway for everything else.

CIDR notation explained

CIDR stands for Classless Inter-Domain Routing. CIDR notation writes the mask as a slash followed by the number of network bits, so 255.255.255.0 becomes /24 and 255.255.255.192 becomes /26. It replaced the rigid class A, B and C system in 1993 and lets networks of any size be allocated, which is why one subnet mask calculator is not enough on its own: you also need to convert between masks, prefixes and ranges. Our CIDR calculator and subnet mask calculator do exactly that.

CIDRSubnet maskTotal IPsUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/26255.255.255.1926462
/28255.255.255.2401614
/30255.255.255.25242

What you get from every calculation

  • Network and broadcast address – the first and last address of the subnet, both reserved in standard subnets.
  • Usable IP range – the hosts you can actually assign, plus the exact host count. Need the reverse? Try the IP range calculator.
  • Wildcard mask – the inverse of the subnet mask used in Cisco access lists and OSPF. See the wildcard mask calculator.
  • Address class and scope – whether the address is private, public, loopback, link-local, multicast or CGNAT, with its legacy IP address class.
  • Binary, hex and integer forms – useful when debugging packet captures or writing firewall rules.
  • Cisco snippets – ready-to-paste interface and access-list lines.

IPv4 versus IPv6 subnetting

IPv4 addresses are 32 bits long, which gives about 4.3 billion addresses and makes careful subnetting essential. IPv6 addresses are 128 bits long, so address conservation is no longer the goal; hierarchy and clean boundaries are. The standard IPv6 LAN is a /64, sites usually receive a /48 or /56, and subnetting on nibble (4-bit) boundaries keeps addresses readable. Our IPv6 subnet calculator uses exact 128-bit arithmetic to show the prefix, address range, number of /64 subnets and canonical RFC 5952 compression.

Private IP ranges and special addresses

Not every address is meant for the public Internet. RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks, which is why almost every home router hands out 192.168.x.x addresses. Carrier-grade NAT uses 100.64.0.0/10, link-local addresses live in 169.254.0.0/16, and 127.0.0.0/8 is loopback. The calculator labels each of these automatically so you can tell at a glance what kind of address you are looking at. For a full list, read our guide to IP address classes and private IP ranges.

Planning with VLSM

Real networks rarely need subnets of identical size. Variable Length Subnet Masking (VLSM) lets you give a 60-host office a /26 and a router-to-router link a /30 from the same parent block, wasting almost nothing. The VLSM calculator sorts your requirements, aligns each block on a binary boundary and shows the remaining free space, and the VLSM guide explains VLSM vs FLSM and VLSM vs CIDR in plain language.

Learn subnetting and practise it

Subnetting is a skill that rewards repetition. Start with our subnetting explained guide, keep the subnet mask cheat sheet open while you work, and test yourself with the subnetting practice quiz, which generates random questions and checks your answers with the same engine that powers this calculator.

Accurate, private and free

Every result is calculated with unsigned 32-bit integers for IPv4 and arbitrary-precision integers for IPv6, so there are no floating-point or overflow surprises, and the edge cases that trip up other tools — /31 point-to-point links under RFC 3021, /32 host routes and /0 default routes — are handled correctly. Calculations happen locally in your browser. If you want to automate lookups, the free REST API returns the same data as JSON, and if you just need your own address, what is my IP shows it in one click.

Subnetting, explained

What is a subnet?

A subnet (subnetwork) is a smaller logical network carved out of a larger IP network. Splitting a network into subnets reduces broadcast traffic, improves security by isolating groups of devices, and lets you allocate addresses efficiently. Every subnet is defined by a network address and a subnet mask or CIDR prefix.

What is a subnet mask?

A subnet mask divides an IPv4 address into two segments: the network portion and the host portion. In binary, contiguous 1s represent the network prefix, while contiguous 0s represent host addresses inside that network. A /24 uses 24 network bits (255.255.255.0) and leaves 8 bits for up to 254 usable hosts.

What is the difference between total IP addresses and usable hosts?

In standard subnets (/1 to /30), two addresses are reserved: the network address (all host bits 0) and the broadcast address (all host bits 1). Usable hosts therefore equal total addresses minus two: 2^(32 − CIDR) − 2. The exception is /31 (RFC 3021), which gives 2 usable hosts for point-to-point links with no broadcast address.

What are the RFC 1918 private IP ranges?

RFC 1918 reserves three blocks for private networks: 10.0.0.0/8 (10.0.0.0 – 10.255.255.255), 172.16.0.0/12 (172.16.0.0 – 172.31.255.255) and 192.168.0.0/16 (192.168.0.0 – 192.168.255.255). These private IP ranges are not routable on the public Internet.

How do I find the IP range of a subnet?

Enter the IP address and prefix in the calculator. The first usable IP is the network address plus one, and the last usable IP is the broadcast address minus one. For example, 192.168.1.0/24 spans 192.168.1.1 to 192.168.1.254. To go the other way, use the IP range calculator to convert a start and end address into CIDR blocks.