IPv4/IPv6 CIDR Range Calculator

Enter a CIDR and get network address, broadcast, host range, and usable IPs

Ad placeholder (leaderboard)

A CIDR block (Classless Inter-Domain Routing) describes a contiguous range of IP addresses using an address and a prefix length, such as 192.168.1.0/24. This calculator expands any IPv4 or IPv6 CIDR into its constituent parts — network address, mask, host range and address count — entirely in your browser. It is built for firewall rule authors, cloud network engineers and anyone verifying an allow or block list.

How it works

The prefix length tells you how many leading bits are fixed as the network portion. The remaining bits vary across hosts.

  1. The address is parsed into a single integer (32-bit for IPv4, 128-bit for IPv6 using BigInt).
  2. A network mask is built with the top prefix bits set to 1 and the rest 0.
  3. network = address AND mask clears the host bits to give the network (base) address.
  4. broadcast = network OR (NOT mask) sets every host bit to give the last address in the range.
  5. Total addresses = 2^(bits − prefix). For IPv4, usable hosts = total − 2 (network + broadcast), except /31 (2 usable, RFC 3021) and /32 (1 host).

IPv6 has no broadcast address, so the tool reports first and last addresses without reserving one.

Example

For 10.0.0.0/22:

  • Mask 255.255.252.0, wildcard 0.0.3.0
  • Network 10.0.0.0, broadcast 10.0.3.255
  • First usable 10.0.0.1, last usable 10.0.3.254
  • Total 1024 addresses, 1022 usable

Notes

A /0 covers the entire address space and a /32 (or IPv6 /128) is a single host. IPv6 ranges can be astronomically large, so the tool shows the exact address count as a base-10 string rather than rounding.

Ad placeholder (rectangle)