Free tool · IPv4 and IPv6
IP subnet calculator
Enter an IP address with a prefix or subnet mask to get its network, broadcast, usable host range, mask, wildcard and binary breakdown. Then split the network into smaller subnets.
Results
Binary view
Network bits Host bits ·
Split into smaller subnets
| # | Subnet | Usable range | Broadcast |
|---|
How the calculator works
A prefix length such as /26 says how many bits, counted from the left, identify the network. The remaining bits identify hosts. The calculator applies the mask to your address to find the network, sets every host bit to find the broadcast address, and counts the addresses in between.
Quick reference
| Prefix | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Frequently asked questions
Why are two addresses not usable?
In most subnets the first address identifies the network and the last is the broadcast address, so hosts use the addresses in between.
Why does a /31 show two usable hosts?
RFC 3021 allows /31 subnets on point-to-point links, where no broadcast address is needed, so both addresses are used. Check that both ends of the link support it.
What is a wildcard mask?
The inverse of the subnet mask. Cisco-style ACLs and OSPF network statements use it: 0.0.0.63 matches the 64 addresses of a /26.
Are IP classes still used?
No. Routing has been classless (CIDR) since the 1990s. The class is shown for reference only, because some exams and older documentation still mention it.
Why do IPv6 networks use /64?
Stateless address autoconfiguration (SLAAC) needs a 64-bit interface ID, so LAN subnets are almost always /64. Sites typically receive a /48 or /56 to divide into /64s.
Need to plan several subnets at once?
Use the subnet planner. Enter a block and the hosts each segment needs, and it allocates them all.
Free download
Subnetting cheat sheet
Two A4 pages: every prefix from /8 to /32 with masks, wildcards and host counts, private and special ranges, a four-step subnetting method, VLSM, summarisation and an IPv6 quick reference. See what’s inside.