IPv4 CIDR / Classless Subnet Calculator
Enter any IPv4 address and prefix length to calculate subnet details instantly.
What is classless subnetting?
Classless subnetting (CIDR, Classless Inter-Domain Routing) is a modern way of dividing IP networks
without being limited to the old Class A/B/C boundaries. Instead of fixed masks like
255.255.255.0, CIDR uses prefix lengths such as /24, /27, or /30.
This gives network engineers precise control over address allocation.
In short, CIDR lets you right-size subnets. Need 30 hosts? Use a smaller subnet like /27 instead of wasting
a full /24. Need point-to-point links? /31 is ideal in modern networks.
How to use this calculator
- Type an IPv4 address (for example,
10.20.30.40). - Enter a prefix length from 0 to 32.
- Click Calculate Subnet.
- Review the network address, broadcast, host range, and mask details.
What the results mean
Network Address
The first address in the subnet. It identifies the subnet itself and is not assigned to a host.
Broadcast Address
The last address in the subnet. In traditional IPv4 LANs, broadcast traffic targets this address.
Usable Host Range
The address interval that can be assigned to devices. For most subnets, this excludes network and broadcast.
For /31, both addresses are usable on point-to-point links. For /32, it represents a single host route.
Subnet Mask and Wildcard Mask
Subnet mask (e.g., 255.255.255.224) marks network bits. Wildcard mask (e.g., 0.0.0.31) is commonly used
in ACL rules and marks host bits.
Quick CIDR reference
- /24 → 256 total addresses, 254 usable
- /25 → 128 total addresses, 126 usable
- /26 → 64 total addresses, 62 usable
- /27 → 32 total addresses, 30 usable
- /28 → 16 total addresses, 14 usable
- /29 → 8 total addresses, 6 usable
- /30 → 4 total addresses, 2 usable
- /31 → 2 total addresses, 2 usable (point-to-point)
- /32 → 1 address, single host route
Worked example
Suppose you enter 192.168.10.34/27. A /27 subnet has blocks of 32 addresses:
0-31, 32-63, 64-95, and so on.
- 34 falls inside the
32-63block. - Network address =
192.168.10.32. - Broadcast address =
192.168.10.63. - Usable hosts =
192.168.10.33through192.168.10.62.
Common subnetting mistakes
- Mixing up subnet mask and wildcard mask.
- Forgetting that network and broadcast are usually not host addresses.
- Using the wrong prefix for expected host count.
- Ignoring RFC 3021 behavior for
/31links.
Final thoughts
A classless subnet calculator is one of the most practical tools in network design, operations, and troubleshooting. Whether you're planning VLANs, creating firewall objects, or validating route summaries, quick subnet math saves time and prevents outages. Keep this page handy whenever you work with IPv4 CIDR blocks.