IPv4 subnet calculator
Enter an IPv4 address and CIDR prefix length to get the network range, mask, broadcast, and host counts.
Results
IPv6 subnet calculator
Enter an IPv6 address and prefix length to get the network prefix, first/last address in the subnet, and size. (IPv6 has no broadcast address.)
Results
How subnetting works (in plain English)
A subnet is just a way to group IP addresses. The CIDR prefix tells you how large that group is.
For IPv4, /24 means “the first 24 bits define the network,” leaving 8 bits for hosts (256 addresses).
For IPv6, prefixes work the same way — the numbers are bigger and subnets are usually much larger (often /64).
Common IPv4 subnet sizes
These are the CIDR sizes you’ll see most often in real networks. You can also download the table as a CSV.
Download common subnet sizes (CSV)| CIDR | Total IPs | Usable hosts | Typical use |
|---|---|---|---|
| /30 | 4 | 2 | Point-to-point links |
| /29 | 8 | 6 | Small network segment |
| /28 | 16 | 14 | Small office / VLAN |
| /27 | 32 | 30 | Small office / VLAN |
| /26 | 64 | 62 | Office / lab |
| /25 | 128 | 126 | Office / campus |
| /24 | 256 | 254 | Typical LAN |
| /23 | 512 | 510 | Larger LAN |
| /22 | 1,024 | 1,022 | Large office / VLAN |
| /21 | 2,048 | 2,046 | Campus / enterprise |
| /20 | 4,096 | 4,094 | Enterprise segment |
| /19 | 8,192 | 8,190 | Large enterprise |
| /16 | 65,536 | 65,534 | Very large network (legacy) |
FAQ
How many IPs are in a /24?
A /24 contains 256 total IPv4 addresses. Typically 254 are usable hosts (network + broadcast are reserved).
What’s the difference between CIDR and subnet mask?
They represent the same thing: how many bits belong to the network. CIDR uses a prefix length (like /24). A subnet mask uses dotted decimal (like 255.255.255.0).
Why does IPv6 have no broadcast address?
IPv6 was designed without broadcast. It uses multicast instead, and many operations that used broadcast in IPv4 work differently in IPv6.
Why do /31 and /32 look weird?
/32 is a single IPv4 address. /31 has two addresses and is commonly used for point-to-point links (both addresses can be used under modern standards).