About the IP Subnet Calculator
Enter an IPv4 address and a prefix length such as /26. The calculator ANDs the address with the mask to find the network, and sets all host bits to get the broadcast address.
Usable hosts are the total addresses minus the network and broadcast addresses. /31 and /32 are special cases for point-to-point links and single hosts.
How to Use the IP Subnet Calculator
- Enter the IPv4 address.
- Enter the prefix length.
- Read the mask, network, broadcast and host range.
Formula and Method
Addresses
2^(32 − prefix)
Usable hosts
2^(32 − prefix) − 2
Network
address AND mask
Worked Example
A /26 subnet
Input: 192.168.10.37/26
- Mask = 255.255.255.192
- Network = 192.168.10.0
- Broadcast = 192.168.10.63
- Hosts = 64 − 2 = 62
Result: Usable range 192.168.10.1 to 192.168.10.62.
Frequently Asked Questions
What is CIDR?
Classless Inter-Domain Routing, the /n notation for the length of the network prefix.
Why subtract 2?
The first address names the network and the last is the broadcast.
Does this support IPv6?
No, only IPv4.
Related Calculators
Sources and Further Reading
Accuracy and Scope
Results follow the formulas and scales stated on each page. Institutions, vehicles and circuits differ, so check against your own rules and equipment. See our full disclaimer.