Runs entirely in your browser — nothing leaves this page.
CIDR calculator
Network, broadcast, host range and contains-IP check.
network192.168.1.0/24
netmask255.255.255.0
broadcast192.168.1.255
first host192.168.1.1
last host192.168.1.254
usable hosts254
What the calculator shows
Give it a network in CIDR notation and it returns the range that block actually covers: network address, netmask, broadcast, the first and last usable host, and how many hosts fit. It also answers whether a specific address falls inside the block.
Useful when writing a security group, a NetworkPolicy or a route, where an off-by-one prefix silently doubles or halves what you just allowed.
Why is the usable host count two less than the total?
The first address identifies the network and the last is the broadcast, so neither can be assigned to a host. A /24 covers 256 addresses and hosts 254 of them.
What happens with /31 and /32?
They are the exceptions. A /32 is a single address — a host route. A /31 is two addresses with no network or broadcast reserved, used for point-to-point links (RFC 3021). Applying the usual minus-two rule to them gives nonsense.
How do I pick a prefix for a subnet?
Work backwards from the host count you need plus growth, then round up to the next power of two and subtract the two reserved addresses. Cloud providers also reserve a few addresses per subnet — AWS takes five — so a /28 gives you fewer usable hosts there than the arithmetic suggests.
Related tools: Port checker, DNS lookup and GeoIP lookup.