CIDR Calculator

IPv4 subnet math: network, broadcast, host range, mask, split, contains check.

published

  • [FREE]
  • [NO_SIGNUP]
  • [NO_UPLOAD]

A CIDR calculator turns an IPv4 address with a prefix length (like 192.168.1.0/24) into the network address, broadcast, host range, subnet mask, wildcard, and binary forms. This tool also checks whether a specific IP falls inside the range and splits a CIDR into smaller subnets — common operations when sizing VPCs, configuring routers, or auditing firewall rules.

How to use the CIDR calculator

  1. Enter a CIDR. Paste from your firewall config, AWS console, or Cisco show command. Or pick from the preset dropdown.
  2. Read the breakdown. Network address, broadcast, first/last usable host, usable count, total count, subnet mask, wildcard. Binary forms below. Class + scope below that.
  3. Optional: contains check. Paste any IP into the Contains field. The tool tells you instantly if it falls inside the range.
  4. Optional: split. Pick a new (longer) prefix. The tool lists every resulting subnet — useful when carving a /16 VPC into per-tier /24s.

Special cases worth knowing

The old rule “subtract 2 for network + broadcast” doesn’t apply. A /31 has exactly 2 addresses and both are usable as the two endpoints of a point-to-point link. Common on router-to-router connections to conserve address space.

/32 — host routes

A single address. Used for loopback interfaces, BGP next-hop targets, and per-host firewall rules. Network address == broadcast == host.

/0 — the whole IPv4 internet

0.0.0.0/0 is the default route — matches every IPv4 address. Used in routing tables as “send anything not matched by a more specific route here”. Useful as a sanity-check destination in firewall rules and BGP.

RFC 1918 private ranges

CIDRCommon nameSize
10.0.0.0/8Class A private16.7M addresses
172.16.0.0/12Class B private1.05M addresses
192.168.0.0/16Class C private65,536 addresses

The calculator flags whether your CIDR fits inside one of these. Use private ranges for internal networks; they are not routable on the public internet.

Also flagged:

  • 127.0.0.0/8 — loopback (localhost)
  • 169.254.0.0/16 — link-local (auto-config when DHCP fails)

Splitting a VPC into tiers

You have a 10.0.0.0/16 VPC. You want to carve out 4 subnets — 2 public + 2 private. Pick /18:

10.0.0.0/18    — Public AZ-a   (16382 hosts)
10.0.64.0/18   — Public AZ-b
10.0.128.0/18  — Private AZ-a
10.0.192.0/18  — Private AZ-b

Each is 16,382 usable hosts. Way more than you need per tier — drop to /24 if you want tighter sizing (254 hosts each, 256 subnets per /16).

The split feature shows up to 64 subnets at a time to keep the page responsive. For finer slices (/28 into a /16 = 4096 subnets), reach for a CLI tool like ipcalc or sipcalc.

How it compares

bytefork.toolssubnet-calculator.comnetwork-tools.com/cidr-calc
Runs in browser✓ pure JS
Network + broadcast + first/last host
Binary formspartial
Contains check (is X in range?)
Split into smaller subnets✓ up to 64 rows shown
RFC 1918 / loopback / link-local flaggingpartialpartial
Share-by-URL hash (no account)
Ad-free

Privacy and security

A static HTML page with a small JavaScript bundle. All arithmetic runs in your browser tab. No upload, no analytics on input. Verify in DevTools → Network: no requests fire after the page loads.

Frequently asked questions

Is my IP information sent to a server?

No. All arithmetic runs in your browser via pure JavaScript. CIDR math is small — under 200 lines of code. Open DevTools → Network and you will see no outbound request when you change the CIDR.

What does CIDR mean?

Classless Inter-Domain Routing — a notation that combines an IPv4 address with a prefix length, like `192.168.1.0/24`. The /24 means the first 24 bits identify the network and the remaining 8 bits identify hosts inside that network. CIDR replaced the older Class A/B/C system in 1993; the new scheme lets networks be sized to powers of two anywhere from /0 (the whole internet) to /32 (a single host).

How does usable host count differ from total addresses?

In a typical subnet (/24 and lower), the first address is the network identifier and the last is the broadcast — neither is assignable to a host. So a /24 has 256 total addresses but 254 usable hosts. Two special cases: /31 is a point-to-point link (RFC 3021) where both addresses are usable as the two endpoints, and /32 is a host route where the single address is the host itself.

What is the wildcard mask?

The bitwise inverse of the subnet mask. For /24 the subnet mask is `255.255.255.0` and the wildcard is `0.0.0.255`. Cisco IOS access-control lists use wildcard masks instead of subnet masks; some firewall rules accept either. The calculator emits both.

Why is "Class" still shown?

Class A/B/C are historical (pre-1993 CIDR) but still informative. The class is derived from the first octet of the address: 1-126 = A, 128-191 = B, 192-223 = C, 224-239 = D (multicast), 240-255 = E (reserved). Modern routing ignores class; CIDR is what matters. The label is included for documentation and legacy textbook compatibility.

What counts as a private range?

RFC 1918 reserves three ranges for private use: `10.0.0.0/8` (16,777,216 addresses), `172.16.0.0/12` (1,048,576 addresses), `192.168.0.0/16` (65,536 addresses). They are routable inside an organization but not on the public internet. The calculator flags any CIDR that fits entirely inside one of the three.

How does the split feature work?

You pick a new (longer) prefix and the calculator divides the original CIDR into all equally-sized subnets at that prefix. Splitting /24 into /26 gives 4 subnets of 62 hosts each. Splitting /24 into /28 gives 16 subnets of 14 hosts each. The output shows the first 64 subnets to keep the page responsive; for larger splits, scroll the output or restrict the new prefix.

Does this support IPv6?

Not in this version — IPv4 only. IPv6 CIDR math is similar but the addresses are 128-bit and the typical use cases (prefix delegation, ULA, link-local) are different. An IPv6 calculator may land later.

Can I share a calculation?

Yes. Copy share link encodes the CIDR and the optional Contains-check IP into the URL fragment. Recipients see the same view.

Is this CIDR calculator really free?

Yes. No signup, no account, no ads, no telemetry on your input. The source is on the project repository.