How to use the IP Subnet Calculator
- 1. Enter an addressUse CIDR (10.0.5.20/20), a mask (172.16.4.9 255.255.254.0) or an IPv6 address with a prefix.
- 2. Optionally splitGive a longer prefix, such as 28, to list the smaller subnets inside.
- 3. CalculateSee the network, broadcast, usable range, host count, masks in decimal and binary, and the address type.
How subnetting works
An IPv4 address is 32 bits. The prefix length (the /26 in 192.168.10.37/26) says how many leading bits identify the network; the rest identify hosts. Setting all host bits to 0 gives the network address, and setting them all to 1 gives the broadcast address. Neither can be given to a device, so a subnet with h host bits has 2h − 2 usable hosts. /31 point-to-point links (RFC 3021) and single-host /32s are the exceptions. The wildcard mask is the inverse of the subnet mask and is used in Cisco ACLs and OSPF. Everything is calculated in your browser; nothing you enter is uploaded.
For IPv6 the tool gives the compressed and full forms, the first and last address, the address count and the type (global, unique local, link-local, multicast or documentation). IPv6 has no broadcast address, and /64 is the normal size for a LAN.
Worked example
For 192.168.10.37/26, the mask is 255.255.255.192, so the network is 192.168.10.0/26 and the broadcast address is 192.168.10.63. The usable range is 192.168.10.1 to 192.168.10.62, which is 62 hosts. The wildcard mask is 0.0.0.63, the next subnet starts at 192.168.10.64, and the address is private (RFC 1918). The results matched Python's ipaddress module on 400 random IPv4 and 200 IPv6 networks.
Quick reference
- /24 = 254 hosts, /25 = 126, /26 = 62, /27 = 30, /28 = 14, /29 = 6, /30 = 2.
- Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
- Cloud subnets reserve extra addresses; AWS keeps 5 in every subnet.
Frequently asked questions
What if I don't give a prefix?
The tool uses the old class default (/8, /16 or /24) and says so.
Why is 192.168.01.1 rejected?
Leading zeros are ambiguous (some systems read them as octal), so they're refused.
Is the subnet calculator free?
Yes. You can open the subnet calculator and use every option without signing up. When you calculate a subnet for the first time, we ask once for your name and WhatsApp number; after that it, and every other Uncodemy tool, opens straight away.