IPv4 Subnet Calculator
Enter an IPv4 address in CIDR notation and get the network, broadcast, mask, host range, and total address count.
How CIDR works
Classless Inter-Domain Routing (CIDR) replaces the old "Class A/B/C" model with a flexible address/prefix notation. The prefix says how many leading bits identify the network; the remaining bits identify hosts inside it.
| Prefix | Mask | Hosts (usable) | Use case |
|---|---|---|---|
| /24 | 255.255.255.0 | 254 | Typical home/office LAN |
| /23 | 255.255.254.0 | 510 | Doubled /24 |
| /22 | 255.255.252.0 | 1,022 | Small enterprise segment |
| /16 | 255.255.0.0 | 65,534 | Old Class B; large private nets |
| /30 | 255.255.255.252 | 2 | Point-to-point links |
| /32 | 255.255.255.255 | 1 | Single host route |
Private IPv4 ranges (RFC 1918)
10.0.0.0/8172.16.0.0/12192.168.0.0/16
FAQ
Why does /24 give 254 hosts and not 256?
The all-zeros address is the network address; the all-ones address is the broadcast. Both are reserved.
What does /31 mean?
Per RFC 3021, a /31 has exactly two usable addresses with no network or broadcast — used on point-to-point links.
What about IPv6 subnets?
IPv6 also uses CIDR notation. The conventional subnet size is /64, which gives 18 quintillion addresses per LAN. This tool focuses on IPv4 because of its higher arithmetic complexity for engineers.