How to Calculate Subnet Calculator
What is Subnet Calculator?
An IP subnet calculator finds network address, broadcast address, usable host range, wildcard mask, and number of hosts from an IP/CIDR input like 192.168.1.0/24.
Formula
Network address = IP AND subnet mask; Host count = 2^(32−prefix)−2; CIDR = /24 means /24 prefix bits
- IP
- IP address (IPv4 dotted decimal)
- SM
- Subnet mask (dotted decimal or /prefix)
- n
- Number of usable hosts
Step-by-Step Guide
- 1CIDR /n: first n bits = network; remaining bits = host addresses
- 2Network address: all host bits set to 0
- 3Broadcast: all host bits set to 1
- 4Usable hosts = 2^(32−n) − 2
Worked Examples
Input
10.0.0.0/8
Result
Network: 10.0.0.0; Broadcast: 10.255.255.255; Hosts: 10.0.0.1–10.255.255.254 (16,777,214 hosts)
Frequently Asked Questions
What's a subnet mask?
Defines network portion of IP (mask 1s) and host portion (mask 0s). /24 = 255.255.255.0.
How many hosts in /24 subnet?
2^(32−24)−2 = 2^8−2 = 256−2 = 254 usable addresses (network & broadcast reserved).
What's CIDR notation?
/24 means first 24 bits are network. Shorthand for subnet mask. 192.168.1.0/24 is cleaner than /255.255.255.0.