Subnet Calculator
By Miikka · CalcBrew · Updated
256
Total addresses
| Total addresses | 256 |
| Usable hosts | 254 |
| Subnet mask (bits) | 24 bits |
The subnet calculator works out the number of addresses and usable hosts in an IPv4 subnet from its CIDR prefix. It is a handy aid for planning networks and sizing address space.
How the calculator works and what it’s for▾
How the subnet size is calculated
The total number of addresses follows addresses = 2^(32 − prefix). The smaller the prefix number, the larger the network and the more addresses it holds.
Usable hosts are typically two fewer, because the network address and the broadcast address are reserved separately.
What you enter and what you get
Enter the CIDR prefix, for example /24. You get the total number of addresses, the count of usable hosts and the subnet mask in bits.
A /24, for instance, gives 256 addresses, of which 254 are usable for hosts.
Who it is for and when
It suits network administrators, students and home-network builders planning how to divide an address space.
It helps you make sure a subnet has room for enough devices without wasting addresses unnecessarily.
Tips for interpreting it
A smaller prefix number grows the network, while a larger number splits the address space into smaller blocks. Choose the prefix to match the number of devices.
Remember to leave room for growth: if more devices are added, a prefix that is too tight will have to be redesigned.
🔄 Reviewed June 2026
Frequently asked questions
Cite this calculator
CalcBrew. (2026). Subnet Calculator. https://calcbrew.com/subnet-calculator“Subnet Calculator.” CalcBrew, 2026, calcbrew.com/subnet-calculator.Link to https://calcbrew.com/subnet-calculator. Results are estimates; cite the underlying formula or data source for academic work.
Related tools
More in Tech & Internet · All calculators