IP Subnet Calculator
Decompose an IPv4 address and CIDR prefix into network, broadcast, masks, address counts, and host range. The implemented convention reports both /31 addresses and one /32 address as usable hosts.
Frequently Asked Questions about the IP Subnet Calculator
Where did CIDR notation come from?
CIDR was standardized in 1993 to replace classful routing and allow arbitrary IPv4 prefix lengths from /0 to /32. Classful networks used fixed default masks for Classes A, B, and C, but subnetting could already create longer prefixes inside them. In CIDR, /N is the number of leading network bits: /24 is 255.255.255.0 and /22 is 255.255.252.0.
How does the subnet mask math actually work?
The subnet mask is a 32-bit value with the leading prefix bits set to 1 and the rest set to 0. To find the network address you AND the IP with the mask: 192.168.1.42 AND 255.255.255.0 keeps the first three octets and zeros the last, giving 192.168.1.0. To find the broadcast you OR the network with the wildcard mask (the bitwise inverse): 192.168.1.0 OR 0.0.0.255 gives 192.168.1.255. The number of total addresses in the block is 2 to the power of the host-bit count, so a /24 has 2^8 = 256 addresses and a /22 has 2^10 = 1,024.
What are the RFC 1918 private address ranges?
RFC 1918 (1996) carved out three ranges for use inside private networks, with the promise that the public internet routing system will never carry them: 10.0.0.0/8 (one Class A block, 16,777,216 addresses), 172.16.0.0/12 (sixteen contiguous Class B blocks, from 172.16.0.0 to 172.31.255.255, just over a million addresses), and 192.168.0.0/16 (256 contiguous Class C blocks, 65,536 addresses). Consumer routers almost always pick a /24 from inside 192.168.0.0/16 or 10.0.0.0/8 for the home LAN. The calculator flags any address that falls inside one of these blocks as private.
Why are /31 and /32 treated as special cases?
RFC 3021 permits both addresses in a /31 on a point-to-point link. A /32 identifies one address, commonly as a host route, with no separate network or broadcast address. This calculator follows that host-route convention and reports one usable host for /32.
Did IPv4 exhaustion actually happen, and where does IPv6 fit in?
IANA allocated its remaining general IPv4 pool to the regional registries in 2011, and regional scarcity followed. Networks now use transfers, address sharing, and IPv6 during the transition. IPv6 uses 128-bit addresses, while this calculator handles IPv4 only.
Related Calculators
More calculators in "Tech"
Decimal to Binary ConverterSSN Validator (Format Check)YouTube Money CalculatorText to Binary ConverterIBAN CalculatorEngine Displacement Calculator
See all 98 calculators in "Tech"