Subnet / CIDR Calculator
Free browser-based IPv4 subnet and CIDR calculator. Instantly compute the network address, broadcast address, subnet mask, and usable host range.
What CIDR notation actually says
The "/24" after an IP address is the prefix length: how many bits, counting from the left, are fixed as the network portion. A /24 fixes the first 24 bits (the first three octets), leaving the last 8 bits — 256 possible values — to identify hosts on that network. A /30 fixes all but the last 2 bits, leaving room for exactly 4 addresses. The math this tool does is entirely bitwise: it builds a 32-bit mask from the prefix length, ANDs it with the address to find the network address, and inverts the mask to find how much room is left for hosts.
Every address in a subnet falls into one of three buckets: the network address (all host bits zero), the broadcast address (all host bits one), and everything in between, which is usable for a host. That middle range is what "usable hosts" reports.
Reading the result table
Network Address and Broadcast Address mark the two ends of the block — neither is assignable to a device under normal IPv4 rules. Usable Host Range is the actual range you can hand out to interfaces. Total Addresses counts every address in the block including the network and broadcast ones; Usable Hosts subtracts those two.
The /31 and /32 exceptions
Two prefix lengths break the network/broadcast/host pattern on purpose. A /32 is a single address with no room for anything else — it's used for host routes and loopback-style addressing, not a network. A /31 has exactly two addresses and, per RFC 3021, both are treated as usable host addresses with no broadcast — this is the standard way to address a point-to-point link (like a router-to-router WAN interface) without wasting two of your four available addresses on network/broadcast overhead.
Quick reference for common prefixes
- /24 — 256 addresses, 254 usable — the default for a small LAN
- /25 — 128 addresses, 126 usable
- /27 — 32 addresses, 30 usable — a common size for a server VLAN
- /29 — 8 addresses, 6 usable — a common size for a small point-to-point or DMZ segment
- /30 — 4 addresses, 2 usable — the traditional (pre-RFC 3021) point-to-point size
- /31 — 2 addresses, both usable — the modern point-to-point size