IPv4 CIDR Calculator

Type a CIDR block in the input (default 192.168.1.0/24) and click Calculate. The tool parses the IPv4 address and prefix length, builds the subnet mask, and prints network address, broadcast, netmask, total size, usable host count, and first/last assignable hosts.

Updated 2026-08-04 · Developer

Click Calculate.

About this tool

Prefix must be 0–32 and each octet must be 0–255. For typical subnets larger than /31, two addresses are reserved for network and broadcast, so usable hosts equals size minus two. Invalid formats show a clear error such as Use a.b.c.d/prefix.

How to use

  1. Open the calculator: Load the page and locate the CIDR input and Calculate button.
  2. Enter your block: Type an IPv4 address followed by slash and prefix, for example 10.0.0.0/8.
  3. Click Calculate: Press Calculate to compute mask, network, broadcast, and host range.
  4. Read the summary: Review the multi-line output for netmask, host count, and first/last IPs.

Common use cases

Tips

FAQ

What input format is required?

Use dotted decimal IPv4, a slash, then prefix length, like 192.168.1.0/24.

How are usable hosts counted?

For most prefixes, usable hosts are total size minus network and broadcast addresses.

What if an octet is out of range?

You will see Invalid IPv4 because each part must be an integer from 0 to 255.

Is the calculation done on a server?

No. Bitwise math runs in your browser when you click Calculate.

Related keywords

Related tools