Subnet Size Calculator
Enter how many hosts need addresses and how much growth to allow. The calculator gives the CIDR prefix, the subnet mask, the usable hosts and the wildcard mask.
- Subnet prefix
- Subnet mask
- Usable hosts
Some cloud providers reserve extra addresses in each subnet.
A subnet holds 2 to the power of its host bits, less 2. 50 hosts with 20% growth is 60, which needs 6 host bits, a /26. That has a mask of 255.255.255.192 and 62 usable addresses.
Subnet size chart
IPv4. Search for a prefix.
| Prefix | Mask | Addresses | Usable hosts |
|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /25 | 255.255.255.128 | 128 | 126 |
| /24 | 255.255.255.0 | 256 | 254 |
| /23 | 255.255.254.0 | 512 | 510 |
| /22 | 255.255.252.0 | 1024 | 1022 |
| /21 | 255.255.248.0 | 2048 | 2046 |
| /20 | 255.255.240.0 | 4096 | 4094 |
| /16 | 255.255.0.0 | 65536 | 65534 |
Hosts.
Prefix and hosts
IPv4. Slide the prefix.
Network and host bits are coloured.
How to size a subnet
Hosts to prefix. Step through it.
Hosts
Count.
Leave room for growth so you do not have to renumber.
/24, /26 or /28
Common subnets. Compare them.
Office LAN.
Team or VLAN.
Small.
Smaller subnets waste fewer addresses but leave less room to grow.
Before you assign
Network checks. Tick each item.
Tick each item as you go.
Document every subnet in an address plan.
What you get
Subnet sizing. Each tile explains one result.
CIDR.
Dotted.
Usable.
Allowed.
For ACLs.
The network and broadcast addresses cannot be given to hosts.
Frequently Asked Questions
No question matches that search.
How do I choose a subnet size?
Add two to the hosts, round up to a power of two and subtract the bits from thirty two.
How many hosts in a slash twenty four?
Two hundred and fifty four usable hosts.
What subnet do I need for fifty hosts?
A slash twenty six, with sixty two usable addresses.
What is a subnet mask?
The prefix written as four numbers, such as two five five dot two five five dot two five five dot zero.
Why subtract two hosts?
The first address names the network and the last is the broadcast.
What is CIDR notation?
A slash and the number of network bits, such as slash twenty four.
What is a wildcard mask?
The inverse of the subnet mask, used in router access lists.
Address space that fits
Pick the right subnet for your hosts and growth and your network plan stays tidy.
More size calculators
Each one has its own calculator, worked examples and answers to common questions.