CIDR calculator
Paste a CIDR block to see the range, mask, wildcard and host count.
Runs 100% in your browserHow to read a CIDR block
- Paste a CIDR block. Enter a CIDR like 10.0.0.0/16 or any IP plus a prefix.
- Read the block. Network, broadcast, host range, mask, wildcard and totals appear instantly.
- Copy the summary. Use Copy to grab the block summary as plain text.
Why CIDR replaced address classes
Before 1993 an IPv4 network was one of three fixed sizes — class A (about 16 million addresses), class
B (about 65,000) or class C (256) — chosen by the address's leading bits. That was hopelessly coarse:
an organisation needing 2,000 addresses had to take a whole class B and waste 63,000, and the global
routing table was ballooning. Classless Inter-Domain Routing (RFC 4632) threw the classes out and let
the prefix length be any value, so a block can be sized to the requirement. This calculator
takes a block in A.B.C.D/N form and reports exactly which addresses it contains, the mask
and wildcard, and how many hosts you can actually assign.
How prefix length maps to block size
The number after the slash is how many leading bits are fixed as the network; the rest are free for
hosts. Because each freed bit doubles the count, the math is exact and worth memorising at the round
points: a /24 holds 256 addresses, a /23 holds 512, a /22 holds
1,024, and every decrement of the prefix doubles again. Going the other way, raising the prefix halves
the block — the basis of VLSM (variable-length subnet masking), where you slice a
parent block into right-sized children. Adjacent equal blocks that share a boundary can also be
aggregated back into one shorter-prefix route, which is how the internet's backbone
keeps its routing tables small.
CIDR in cloud networks
Every cloud network is defined by CIDR: AWS VPCs, GCP networks, Azure VNets and Kubernetes pod and service ranges all ask for a block, then expect you to carve non-overlapping subnets out of it across availability zones. The cardinal rule is that blocks which must route to each other — peered VPCs, a VPN to on-premises — cannot overlap, so picking the parent block deliberately (and leaving room to grow) matters more than it first appears. Use this tool to check a candidate block's range and size before you commit it; the calculation is pure client-side math and never touches a server. To convert a single mask or prefix, see the subnet mask calculator.
Frequently asked questions
- Classless Inter-Domain Routing (RFC 4632) writes an IP and prefix together as A.B.C.D/N, where N is the number of network bits. 192.168.1.0/24 covers 192.168.1.0–192.168.1.255.
- Same math, framed around the CIDR block itself rather than a specific host. Paste a CIDR and you get its range, mask, hosts and class summary.
- Enter an IP too — the network address is computed from whatever IP you give. To inspect a known CIDR, paste it directly, e.g. 10.0.0.0/16.
- No. Calculations are pure client-side JavaScript with strict CSP — there is no fetch to a server.