IP Subnet Calculator
Enter any IPv4 address with a prefix and get the network, broadcast, masks and usable host range worked out instantly. Nothing leaves your browser.
Subnet
- Network address
- —
- Broadcast address
- —
- Netmask
- —
- Wildcard mask
- —
- CIDR notation
- —
- Address class
- —
Hosts
- First usable host
- —
- Last usable host
- —
- Usable hosts
- —
- Total addresses
- —
- Scope
- —
- Binary netmask
- —
How subnetting works
An IPv4 address is 32 bits, usually written as four numbers from 0 to 255. A subnet mask splits those 32 bits into two halves: the left-hand bits identify the network, and the remaining right-hand bits identify a host inside it. The prefix length after the slash simply counts the network bits.
So 192.168.1.0/24 reserves the first 24 bits — 192.168.1 — for the
network, leaving 8 bits for hosts. Eight bits give 256 combinations, of which the first is the
network address and the last is the broadcast address, leaving 254 usable.
Prefix lengths at a glance
| Prefix | Netmask | Total addresses | Usable hosts |
|---|---|---|---|
/30 | 255.255.255.252 | 4 | 2 |
/29 | 255.255.255.248 | 8 | 6 |
/28 | 255.255.255.240 | 16 | 14 |
/26 | 255.255.255.192 | 64 | 62 |
/24 | 255.255.255.0 | 256 | 254 |
/22 | 255.255.252.0 | 1,024 | 1,022 |
/16 | 255.255.0.0 | 65,536 | 65,534 |
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
Every step down in prefix length doubles the size of the network. That doubling is the whole of subnet arithmetic; once it clicks, the rest is bookkeeping.
Private address ranges
Three ranges are reserved for private networks and are never routed on the public internet. Your home router almost certainly uses one of them:
10.0.0.0/8— 16.7 million addresses, common in large corporate networks172.16.0.0/12— about a million addresses, common in data centres and Docker192.168.0.0/16— 65,536 addresses, the default for consumer routers
Devices on these ranges reach the internet through NAT, which is why every device in your house shows the same public address on the what is my IP page.
Two subnets worth knowing
A /31 has no usable hosts by the classic rule, but is deliberately used on
point-to-point links where both addresses are assigned and no broadcast is needed. A
/32 describes a single host exactly, and shows up constantly in firewall rules and
routing tables when you want to match one address and nothing else.
Related searches
Other ways people look for this tool.