What is the IP Address CIDR Range Calculator?
This tool takes an IPv4 address written in dotted-decimal form together with a CIDR network prefix length and works out the full subnet: the network address, the broadcast address, the range of assignable host addresses, the subnet mask, the wildcard mask, and the address counts. It follows classless inter-domain routing (CIDR, RFC 4632) and works identically anywhere in the world - IP addressing is a universal standard, not region-specific.
How to use it
Enter the four octets of the IPv4 address (each 0-255), for example 128, 1, 10, 164, and the prefix length after the slash (0-32), for example 24, giving 128.1.10.164/24. The calculator highlights the primary result - the assignable host range - and lists every derived field below it.
The formula explained
The address is first packed into a single 32-bit unsigned integer: $$\text{ip} = \text{octet}_1 \times 2^{24} + \text{octet}_2 \times 2^{16} + \text{octet}_3 \times 2^{8} + \text{octet}_4.$$ The subnet mask has its top p bits set to 1, where p is the prefix. The network address is \(\text{ip} \mathbin{\&} \text{mask}\); the broadcast address is the network OR the wildcard (the bitwise complement of the mask). The first usable host is \(\text{network} + 1\) and the last usable host is \(\text{broadcast} - 1\). Total addresses equal \(2^{32-p}\), and usable hosts equal that total minus 2, floored at 0.
Worked example
For 128.1.10.164/24: the mask is 255.255.255.0 and the wildcard is 0.0.0.255. The network address is 128.1.10.0 and the broadcast is 128.1.10.255. The assignable range is 128.1.10.1 to 128.1.10.254. There are 256 total addresses and 254 usable hosts.
FAQ
Why are usable hosts two fewer than total addresses? In classic IPv4 subnetting the network address and the broadcast address cannot be assigned to a host, so a /24 with 256 addresses offers 254 usable hosts.
What about /31 and /32? A /31 holds 2 addresses and a /32 holds 1; the classic usable-host formula reports 0 for both, although RFC 3021 allows the two addresses of a /31 to be used on point-to-point links.
What is a wildcard mask? It is the bitwise inverse of the subnet mask (0s where the mask has 1s and vice versa). It is commonly used in router access control lists to match a range of addresses.