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.
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:
- Network address — the base address with the host bits cleared. A non-aligned host is normalized to its network, so
192.168.1.130/26becomes192.168.1.128. - Broadcast address — the address with every host bit set.
- Netmask and wildcard mask — e.g.
/24gives255.255.255.0and0.0.0.255. - Usable host range — the first and last assignable host. A
/31is treated as an RFC 3021 point-to-point link (both addresses usable) and a/32as a single host. - Total addresses and usable hosts.
- Scope — whether the block is private (RFC 1918
10/8,172.16/12,192.168/16, loopback, link-local, or CGNAT100.64/10) or public.
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
192.168.1.0/24gives network192.168.1.0, broadcast192.168.1.255, 254 usable hosts.10.0.0.0/30gives 4 addresses, 2 usable hosts (10.0.0.1-10.0.0.2).2001:db8::/64gives 18,446,744,073,709,551,616 addresses.
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=textMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
