How to use
- Choose IPv4 or IPv6. For IPv4, optionally pick a network class (A, B or C) to hide masks shorter than that class starts at.
- Pick the subnet: the mask with its prefix length for IPv4, or the prefix length for IPv6. You can also type the address with its prefix, like 10.0.0.1/8, and the prefix list follows.
- Enter the IP address. The results update as you type.
- Read the network and broadcast address, the usable host range, the number of hosts, the masks and the other forms of the address. For most IPv4 masks, the table below lists every subnet of that size; the row with your address is highlighted.
Formula
An IPv4 address is a 32-bit number. The subnet mask has the first prefix bits set to 1. Network address = address AND mask; wildcard = NOT mask; broadcast = network OR wildcard; total addresses = 2^(32 − prefix); usable hosts = total − 2 (the network and broadcast addresses are not given to hosts). IPv6 works the same way on 128 bits, without a broadcast address: total addresses = 2^(128 − prefix) and the last address is network OR (2^(128 − prefix) − 1).Example
A home router at 192.168.29.10 with the mask 255.255.255.0 (/24): the network is 192.168.29.0, the usable hosts run from 192.168.29.1 to 192.168.29.254, the broadcast address is 192.168.29.255 and there are 254 usable hosts. Splitting the same office into /26 subnets gives four networks of 62 hosts each.
The calculator counts usable hosts the classic way: a /31 or /32 shows 0 usable hosts, although routers can use both addresses of a /31 on a point-to-point link (RFC 3021). Private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918); 100.64.0.0/10 is shared space that internet providers use for carrier-grade NAT, which many mobile and broadband connections in India sit behind. Everything is calculated in your browser; the addresses you type are never sent anywhere.