How to use the Subnet Calculator
- Enter an IPv4 address in dotted-decimal notation.
- Enter a prefix length from 0 to 32.
- Read the network, broadcast, address count, and assignable-host conventions.
IPv4 prefix mask and network address
Where:
- = 32-bit IPv4 address
- = mask with p leading one bits
- = wildcard mask, the bitwise inverse of M
- = CIDR prefix length from 0 through 32
- = number of addresses in the block
Show as plain text
Network = IPv4 address AND subnet mask Broadcast = network OR wildcard mask Block size = 2^(32 − prefix)
The prefix specifies how many leading bits identify the network. The remaining bits form the host portion of the address block.
Conventional IPv4 subnets through /30 reserve network and broadcast addresses. RFC 3021 defines special /31 use on point-to-point links; /32 identifies one address.
Assumptions and limitations
- This tool handles IPv4 only; it does not calculate IPv6, routing policy, access control, or network security.
- The prefix must be an integer from 0 through 32.
- The host count follows conventional IPv4 /0–/30 rules, the RFC 3021 /31 point-to-point convention, and one address for /32.
- Private/public status and special-purpose address allocations are not classified.
Example: Address 192.168.1.34 with prefix /24
- A /24 mask is 255.255.255.0.
- Applying the mask gives network 192.168.1.0; the block ends at broadcast 192.168.1.255.
- The block has 256 addresses and 254 conventionally assignable host addresses.
When to use the Subnet Calculator
- Finding the network block containing an IPv4 address.
- Checking prefix, subnet mask, and address range.
- Understanding `/31` point-to-point and `/32` host-route cases described in the cited RFCs.
Subnet Calculator FAQs
What does /24 mean?
A /24 prefix means the first 24 bits identify the network and the remaining 8 bits form the address block's host portion.
How does a /31 subnet work?
RFC 3021 permits both addresses in a /31 block to be used on point-to-point links, rather than reserving a network and broadcast address.
Does this calculator support IPv6?
No. It accepts dotted-decimal IPv4 addresses and CIDR prefix lengths only.
References
How this calculator was built and tested is explained in our methodology. Spotted a problem? Let us know.