CIDR Calculator

Enter a CIDR like 192.168.1.0/24 or 2001:db8::/48 and get the network address, broadcast, netmask, wildcard mask, usable host range and host counts. Runs entirely in your browser, no server, no sign-up.

Subnet details

What this CIDR calculator does

Paste a CIDR block in ADDRESS/PREFIX notation and this tool computes everything you need to plan or document a subnet — entirely in your browser, so the address you enter never leaves your machine.

For an IPv4 block it returns:

For an IPv6 block it returns the network address, prefix length, the first and last address in the block, and the total address count — exact even for a /0, which spans 2^128 addresses.

Examples

Choose text for an aligned report or json for a machine-readable object you can pipe into other tooling.

FAQ

What if I enter a host address instead of the network base?

The tool normalizes it for you: the host bits are cleared, so 192.168.1.130/26 is reported as network 192.168.1.128/26. That makes it an easy way to answer "which subnet does this IP belong to?" — paste the host with its prefix and read off the network, broadcast, and host range.

How are /31 and /32 blocks counted?

A /31 follows RFC 3021: it's a point-to-point link, so both addresses are usable hosts (no network/broadcast reservation). A /32 is a single host with exactly 1 usable address. For /30 and larger blocks the usual rule applies — total addresses minus the network and broadcast addresses.

Does it support IPv6, including huge prefixes like /0?

Yes. Any prefix from /0 to /128 works. For IPv6 you get the network address, the first and last address in the block, and an exact total address count — even a /0, whose 2^128 addresses overflow ordinary integers, is reported exactly. Broadcast and netmask are IPv4 concepts and only appear for IPv4 blocks.

Which ranges are flagged as private?

For IPv4, the scope check covers RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback (127.0.0.0/8), link-local (169.254.0.0/16), and carrier-grade NAT (100.64.0.0/10). Anything else is reported as public.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool cidr-calculator "192.168.1.0/24  or  2001:db8::/48"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/cidr-calculator/?input=192.168.1.0%2F24%20%20or%20%202001%3Adb8%3A%3A%2F48&format=text

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.