Tools / Subnet calculator
Subnet calculator
Calculate the subnet range from an address and a network mask or prefix.
What you get
- Network address: the first address of the subnet, which names the network.
- Broadcast address: the last address, used to reach every device in the subnet.
- First and last host: the range you can assign to devices.
- Usable hosts: the network and broadcast addresses are not assignable, so a subnet has two fewer usable addresses than its total.
- Wildcard mask: the inverse of the subnet mask, used in some router and firewall rules.
Common prefixes
| Prefix | Subnet mask | Usable hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /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 |
| /30 | 255.255.255.252 | 2 |
Common questions
What does /24 mean?
It means the first 24 bits of the address identify the network and the remaining 8 bits identify hosts. That equals the mask 255.255.255.0 and gives 256 addresses, 254 of them usable.
How do I choose a subnet size?
Pick the smallest prefix that fits your devices with room to grow. For example, 50 devices fit in a /26 (62 usable hosts).
What are /31 and /32?
A /31 has two addresses and is used on point-to-point links. A /32 is a single address.