CIDR Calculator
FreeBreak down IPv4 or IPv6 CIDR blocks in bulk into network/broadcast address, subnet mask, and usable host range. Includes an IP-in-range checker and a subnet splitter.
Runs entirely in your browser. Nothing is sent to a server.
CIDR Blocks
0 entriesRecent Activity
Visible to everyone. Last 20 uses across all visitors, newest first.
Calculated 2 CIDR block(s).
1 hour ago
What this tool does
CIDR Calculator breaks down one or many IPv4 or IPv6 CIDR blocks at once into their network address, broadcast address, subnet mask, usable host range, and total address count, plus an IP-in-range checker and a subnet splitter for dividing a larger block into smaller equal pieces.
How It Works
For IPv4, the /N prefix is converted into a 32-bit subnet mask (the top N bits set to 1, the rest 0), and a bitwise AND between the address and that mask gives the network address. The broadcast address is the network address with every host bit set to 1 instead, found by OR-ing the network address with the wildcard mask (the bitwise inverse of the subnet mask). Total addresses is 2^(32−N); usable hosts is that minus 2 for the reserved network and broadcast addresses, except /31 (2 usable, no reservation) and /32 (1 usable, a single host).
IPv6 works the same way but over 128 bits instead of 32, using exact big-integer arithmetic (not floating point, since 2^128 is far larger than JavaScript's safe integer range) so even the largest blocks are computed precisely. Splitting a block into smaller subnets repeats the same idea in reverse: moving the prefix from /N to /(N+k) divides the block into exactly 2^k equal, contiguous, non-overlapping pieces.
Problems it solves
- Planning a network: figuring out how many usable hosts a subnet actually has before assigning it.
- Checking a batch of CIDR blocks from a firewall rule or cloud security group all at once instead of one at a time.
- Dividing a larger allocated block (like a cloud VPC CIDR) into smaller subnets for different environments or availability zones.
- Quickly checking whether a specific IP address falls inside an allowlist or blocklist range.
Frequently asked questions
›Why does /24 give 254 usable hosts, not 256?
A /24 block has 256 total addresses (2^8, since 32 − 24 = 8 host bits), but the very first address is always reserved as the network address and the very last one as the broadcast address, leaving 254 in between for actual devices. The two exceptions are /31 (point-to-point links, RFC 3021, both addresses are usable) and /32 (a single host, no network/broadcast concept at all).
›What is a wildcard mask, and why is it different from a subnet mask?
A wildcard mask is simply the bitwise inverse of the subnet mask (0.0.0.255 instead of 255.255.255.0 for a /24). It is not used for defining the subnet itself -- it is the format Cisco ACLs and OSPF network statements expect instead of a regular subnet mask, so it is included here to save a manual inversion.
›How does splitting a block into smaller subnets work?
Splitting a /24 into four equal pieces means moving the prefix two bits to the right, to /26 (since 2^2 = 4), and each resulting /26 block is exactly 64 addresses wide, with no gaps and no overlap between them. The split tool does this automatically for any valid target prefix and lists every resulting block.
›Why is my IPv6 result shorter than what I typed in?
IPv6 addresses are always shown in their canonical compressed form: the longest run of consecutive all-zero groups is collapsed to "::" (only once per address), and leading zeros within a group are dropped -- so 2001:0db8:0000:0000:0000:0000:0000:0001 and 2001:db8::1 are the exact same address, just written differently.
›Is an IPv4 address like 10.x.x.x or 192.168.x.x special?
Yes -- 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are the three ranges reserved by RFC 1918 for private networks (home routers, office LANs, etc.) and are never routed on the public internet. The calculator flags any block inside these ranges as Private; everything else is treated as a Public, internet-routable range.
Related Tools
Calculators
Amortization Calculator
Calculate a loan's monthly payment and full amortization schedule, with extra-payment savings.
FreeCalculators
Amps To Watts Calculator
Convert between amps and watts for DC, AC single-phase, and AC three-phase circuits.
FreeCalculators
ANC Calculator
Calculate Absolute Neutrophil Count (ANC) from CBC values and see the NCI CTCAE neutropenia grade, right in your browser.
FreeCalculators
Angel Number Calculator
Discover the numerology meaning of a recurring number or your birth date Life Path Number, right in your browser.
Comments (0)
Found this tool useful? Leave a comment, share a tip, or tell us how we can make it better.
No comments yet. Be the first to share your thoughts!