IPv4 subnet calculator
Type an address and prefix like 10.0.12.34/20 to get the network and broadcast addresses, usable host range, subnet mask and how many hosts fit.
Split into subnets
| Subnet | Hosts | Broadcast |
|---|
Runs entirely in your browser. Nothing you enter is sent to a server.
CIDR cheat sheet
| Prefix | Mask | Usable hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /20 | 255.255.240.0 | 4,094 |
| /22 | 255.255.252.0 | 1,022 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
Why two addresses are “lost”
In most subnets the first address identifies the network and the last is the broadcast address, so a /24 has 256 addresses but 254 usable hosts. Point-to-point /31 links (RFC 3021) and single-host /32 routes are exceptions.
Want to know your own public address? Check What is my IP.
Frequently asked questions
How many hosts are in a /24?
256 addresses, 254 usable hosts.
What is a wildcard mask?
The inverse of the subnet mask, used in Cisco ACLs and OSPF. For /24 it’s 0.0.0.255.
Does it support IPv6?
Not yet — this calculator covers IPv4.