IP CIDR Range Calculator

Given an IPv4 address and a CIDR prefix, this calculator works out the whole address block: the network address, the broadcast address, the first and last usable host addresses, the subnet mask and the total number of addresses. The arithmetic is exact bitwise masking, the same operation a router performs.

0.00
0.00
0.00
0.00
0.00
0.00

CIDR range formula

Mask = (0xFFFFFFFF left-shift (32 - prefix)) AND 0xFFFFFFFF
Network = IP AND mask
Broadcast = network OR (NOT mask)
First host = network + 1, Last host = broadcast - 1
Total addresses = 2 ^ (32 - prefix)

All operations treat the IPv4 address as a single 32-bit unsigned integer. The first and last usable host only apply when the block has at least 4 addresses (prefix 30 or shorter).

Worked example: 192.168.1.10/24

A /24 mask is 255.255.255.0. Network = 192.168.1.0, broadcast = 192.168.1.255. First usable = 192.168.1.1, last usable = 192.168.1.254. Total addresses = 256, of which 254 are usable.

CIDR range: frequently asked questions

What does CIDR notation mean?

CIDR notation writes an IPv4 address followed by a slash and a prefix length, such as 192.168.1.0/24. The prefix length is how many leading bits identify the network. The remaining bits address hosts. CIDR replaced the older fixed class A/B/C scheme, per RFC 4632.

How is the network address found?

The network address is the IP with all host bits set to zero. It is computed as the bitwise AND of the IP address and the subnet mask derived from the prefix length. The broadcast address sets all host bits to one.

What are the first and last usable hosts?

For a normal subnet the first usable host is the network address plus one, and the last usable host is the broadcast address minus one. A /31 (RFC 3021) and /32 are special cases with no separate usable range under the classic rule.

Does this calculator validate the address?

Yes. Each of the four octets must be a whole number from 0 to 255 and the prefix must be 0 to 32. Out-of-range entries return a not-applicable result rather than a wrong answer.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.