Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Assignable address range
128.1.10.1 - 128.1.10.254
first usable host - last usable host
Network address 128.1.10.0
Broadcast address 128.1.10.255
First usable host 128.1.10.1
Last usable host 128.1.10.254
Subnet mask 255.255.255.0
Wildcard mask 0.0.0.255
Total addresses in block 256
Usable host count 254

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.

32-bit IPv4 address divided into network bits and host bits by the CIDR prefix boundary
The CIDR prefix length splits the 32-bit address into network bits (left) and host bits (right).

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.

Subnet range bar showing network address first, broadcast last, and usable hosts in between
Within a subnet the first address is the network, the last is the broadcast, and the rest are 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.

Last updated: