How to use the IP Subnet Calculator
The IP subnet calculator shows the network address, mask, broadcast address and host range for an IPv4 address and prefix.
Open the IP Subnet Calculator →
What you need to enter
- IPv4 address
- CIDR prefix (/n)
The formula
Mask = the first n bits set to 1. Network = IP AND mask. Broadcast = network OR NOT mask. Usable hosts = 2^(32 − n) − 2.
Worked example
Using the default values in the calculator:
- IPv4 address: 192.168.1.77
- CIDR prefix (/n): 24
| Network address | 192.168.1.0/24 |
| Subnet mask | 255.255.255.0 |
| Broadcast address | 192.168.1.255 |
| Usable host range | 192.168.1.1 – 192.168.1.254 |
| Usable hosts | 254 |
| Wildcard mask | 0.0.0.255 |
Tips for better results
- A /24 has 254 usable hosts.
- Plan for growth.
Common mistakes to avoid
- Using the broadcast or network address for a host.
- Confusing prefix and mask.
Please note: Results are estimates for general use. For safety-critical work such as electrical or building projects, check with a qualified professional and local codes. See our Disclaimer.