IP Subnet Calculator
CIDR in, everything out: network, broadcast, host range, mask, and how many hosts actually fit.
Runs entirely in your browser — nothing you enter leaves this page
How subnetting works
A CIDR prefix like /24 says how many leading bits of the
address identify the network; the remaining bits identify hosts
inside it. A /24 leaves 8 host bits — 256 addresses, of which the first
names the network itself and the last is the broadcast address, leaving
254 usable hosts. Every time you add one to the prefix, you halve the
block.
Why /31 says two usable hosts
Point-to-point links between two routers don't need network or broadcast addresses, so RFC 3021 allows both addresses of a /31 to be assigned. A /32 is a single host route. This calculator applies both special cases, which many quick-reference charts get wrong.
Related reading
Subnets decide what traffic stays local and what crosses a router — the substrate under everything we cover in What is DNS?, What is a load balancer?, and What is a CDN?. Private ranges (10/8, 172.16/12, 192.168/16) are flagged automatically above.