CIDR / Subnet Calculator
Switch between IPv4 and IPv6, enter an address with a prefix length, and see the network, address range, host count, netmask, reverse-DNS zone and more. Works from /1 to /32 for IPv4 and up to /128 for IPv6.
Click a class to jump to the start of its range (Any → /1, A → /8, B → /16, C → /24), or move the slider — the class highlights whenever the prefix is in its range: Any /1–/7 (supernets), Class A /8–/15, Class B /16–/23, Class C /24–/32.
e.g. 10.0.0.0/8, 192.168.1.10/24, or 2001:db8::/48
Prefix reference tables
Every prefix length with its mask, total addresses and host/subnet counts. The row matching your current address family and prefix is highlighted.
| Prefix | Subnet mask | Total addresses | Usable hosts |
|---|
What is CIDR? What about classes?
CIDR (Classless Inter-Domain Routing) writes a block of IP addresses as an address, a slash and a prefix length, like 192.168.1.0/24. The prefix length is how many bits at the start are fixed for the network; the remaining bits identify hosts within it. A smaller prefix (like /8) covers a huge range, a larger one (like /30) just a handful.
Before CIDR, IPv4 used classes: Class A networks used a /8 mask (first octet 1–126), Class B used /16 (128–191) and Class C used /24 (192–223). Modern networks are classless, but the class defaults are still a useful starting point — that's what the buttons at the top set.
For IPv4, the network address is the first address in the block and the broadcast is the last; usable hosts sit in between (a /31 is a special two-address point-to-point link, and a /32 is a single host). IPv6 works the same way with 128-bit addresses and no broadcast — a /64 is the standard size for a single network.
Provided for general reference. Always double-check critical network configuration against your own equipment and records.