IP Subnet Calculator
Calculate IPv4 or IPv6 subnet information — network address, broadcast address, range, host count and CIDR notation.
Enter as CIDR (e.g. 10.0.0.1/8 or 172.16.5.0/20)
How to use the IP Subnet Calculator
- Enter your inputs into the IP Subnet Calculator above.
- Results update instantly as you type — no submit button needed.
- Adjust any value to see how the result changes in real time.
The subnet math
Network = IP AND Subnet Mask · · · Broadcast = Network OR (NOT Mask) · · · Host count = 2^(32 − prefix length) − 2
A CIDR like /24 means 24 bits are network, 8 bits are host (IPv4). The host count subtracts 2 for network and broadcast addresses. IPv6 uses 128-bit addresses with similar logic.
Worked example
192.168.1.50/24: network 192.168.1.0; broadcast 192.168.1.255; usable hosts 192.168.1.1 to 192.168.1.254 (254 total). Subnet mask: 255.255.255.0.
Frequently asked questions
What is CIDR notation?
Classless Inter-Domain Routing notation: IP/prefix-length. /24 = 24 network bits = mask 255.255.255.0. Compact alternative to dotted-decimal subnet masks.
What are the private IP ranges?
IPv4: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. IPv6: fc00::/7 (Unique Local). These don't route on the public internet.
Why subtract 2 from host count?
In classic IPv4 subnetting, the all-zeros host = network address, all-ones = broadcast. Neither is usable for a host. IPv6 has no broadcast address; usable count is closer to the full 2^bits.