Internet Protocol version 4 (IPv4) Subnet Calculator
Calculate an IPv4 subnet boundary from CIDR or a dotted mask, then check usable hosts, special-purpose ranges and reserve-adjusted capacity.{{ summaryTitle }} {{ summaryValue }} {{ summaryLine }} {{ badge.label }}{{ badge.value }}
| Measure | Value | Operational meaning | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.context }} |
Address guidance
{{ model.address_category }}
{{ categoryGuidance }}
- Boundary rule
- {{ boundaryGuidance }}
- Capacity decision
- {{ planningGuidance }}
- Next check
- Confirm routing, DHCP, gateway, ACL, and platform behavior before deployment.
| Prefix | Subnet mask | Total addresses | Usable hosts | Position | Copy |
|---|---|---|---|---|---|
| /{{ row.prefix }} | {{ row.mask }} | {{ formatInteger(row.total) }} | {{ formatInteger(row.usable) }} | {{ row.position }} |
An IPv4 address identifies one 32-bit value, but routing and allocation depend on the boundary around it. A prefix such as /24 says that the first 24 bits describe the network and the remaining 8 bits vary within that block. The same boundary can be written as the dotted mask 255.255.255.0.
A host address does not need to be the first address in its subnet. Applying the prefix clears the host bits to find the network address, then sets those bits to one to find the upper boundary. For an ordinary subnet, the lower boundary is reserved as the network address and the upper boundary is the directed broadcast; the addresses between them form the usual usable range.
| Prefix | Host bits | Total addresses | Usable under this model | Typical meaning |
|---|---|---|---|---|
/24 | 8 | 256 | 254 | Ordinary subnet |
/30 | 2 | 4 | 2 | Small ordinary subnet |
/31 | 1 | 2 | 2 | Point-to-point endpoints |
/32 | 0 | 1 | 1 | Single host route |
The /31 and /32 cases need special care. RFC 3021 allows both addresses in a /31 to act as endpoints on a point-to-point link, with no directed broadcast on that link. A /32 identifies one address rather than an ordinary multi-host subnet.
Address syntax and ownership are different questions. Private, shared, loopback, link-local, documentation, multicast, and other special-purpose ranges have defined roles, while an address outside a built-in special range is not automatically allocated, reachable, or safe to use.
Capacity planning adds another distinction. A block may contain enough mathematical host positions yet still be unsuitable because local policy reserves gateway, redundancy, DHCP, network-appliance, or future-growth addresses. Add those needs before choosing the smallest prefix.
How to Use This Tool:
Enter one IPv4 address with enough notation to establish the intended prefix.
- Enter CIDR such as
192.168.10.24/24, an address plus a contiguous dotted mask, or a bare address that you will pair with an explicit Prefix override. - Leave Prefix override on Auto to use the entered CIDR or mask. Choose an explicit prefix from
/0to/32when you deliberately want it to take precedence. - Read Normalized CIDR, the usable range, mask, wildcard, broadcast boundary, and address category. Fix an invalid octet, noncontiguous mask, missing prefix, or fractional planning input before continuing.
- Optionally enter a whole Host requirement and Growth reserve. Compare the planned-host count with Host fit and the smallest recommended prefix.
Interpreting Results:
Normalized CIDR is the boundary to carry into a route, access list, DHCP scope, IP address management record, or interface plan. If the entered address contained host bits, the normalized network may differ from the input.
The usable range follows ordinary network-and-broadcast reservations except at /31 and /32. For a /31, use both addresses only when the link and devices follow RFC 3021 point-to-point semantics. For a /32, network, usable, and upper-boundary fields resolve to the same single address.
A special-purpose label is a policy clue, not a reachability test. Verify allocation in IPAM or with the responsible network owner, and check live routing, DHCP, firewall, and duplicate-address state before deployment.
Technical Details:
IPv4 subnet arithmetic treats each dotted address as one unsigned 32-bit integer. A prefix mask keeps the network bits and clears the host bits. Its bitwise inverse is the wildcard mask.
Formula Core:
For address A, prefix p, and its 32-bit mask Mp, the network and upper boundary come from bitwise masking and the block size.
Usable capacity applies explicit exceptions rather than subtracting two addresses from every block.
When capacity planning is enabled, the reserve is added before choosing the smallest fitting prefix. The host requirement and reserve are whole numbers, and the planned count rounds upward.
Input Rule Core:
- IPv4 input requires four decimal octets from 0 to 255 without padded leading zeros.
- CIDR accepts one prefix from 0 to 32; a dotted mask must contain contiguous one bits followed by contiguous zero bits.
- An explicit prefix override always wins over notation in the address field.
- Host requirement accepts 0 to 4,294,967,294, and growth reserve accepts 0% to 100%; both must be whole numbers.
- The capacity comparison shows the current prefix plus up to four larger and four smaller neighboring blocks.
Lookup Core:
The address category is selected from the entered address, not the whole normalized subnet. The built-in lookup covers these commonly consequential ranges.
| Category | Matched range or ranges |
|---|---|
| This network | 0.0.0.0/8 |
| Private use | 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 |
| Shared address space | 100.64.0.0/10 |
| Loopback | 127.0.0.0/8 |
| Link local | 169.254.0.0/16 |
| Documentation | 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 |
| Benchmark testing | 198.18.0.0/15 |
| Multicast | 224.0.0.0/4 |
| Reserved | 240.0.0.0/4 through 255.255.255.254 |
| Limited broadcast | 255.255.255.255/32 |
Limitations and Privacy:
The result is deterministic address arithmetic, not a live network check. It does not discover routes, DHCP leases, address conflicts, ownership, firewall policy, or public reachability.
- The special-purpose lookup is intentionally limited to the ranges listed above and may not describe every IANA registry entry.
- Reserve planning does not automatically add local gateway, high-availability, appliance, or policy reservations.
- The entered address is calculated in the browser and is not used to probe the network.
- Confirm
/31support on both point-to-point endpoints before deployment.
Worked Examples:
Normalizing a private host address
192.168.10.24/24 normalizes to 192.168.10.0/24. Its mask is 255.255.255.0, wildcard is 0.0.0.255, usable range is 192.168.10.1 to 192.168.10.254, and the ordinary directed broadcast is 192.168.10.255.
Checking a point-to-point block
203.0.113.10/31 spans 203.0.113.10 and 203.0.113.11. Both are reported as usable RFC 3021 endpoints, and the upper address has no directed-broadcast role on that point-to-point link.
References:
- RFC 4632: Classless Inter-domain Routing (CIDR), RFC Editor, August 2006.
- RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links, RFC Editor, December 2000.
- IPv4 Special-Purpose Address Space, IANA, October 9, 2025.
- How to scan an authorized subnet with Nmap, Simplified Guide.