CIDR calculator
APP $ cidr ✓ There is no submit button. Your addresses and blocks are not sent to a server; results update only in this browser window PUB 2026-07-26UPD 2026-10-27VERIFY Standards and official sourcesEnter an address block in any supported format and see everything in one place. The calculator shows both the prefix (/24) and subnet mask (255.255.255.0), the first and last addresses, and whether the IP addresses you enter fall within the block. For multiple blocks, it also shows how many remain after aggregation and whether the original address coverage is preserved.
10.0.0.0/24 · 10.0.0.0 255.255.255.0 · 10.0.0.0 0.0.0.255 (wildcard) · 10.0.0.0 - 10.0.0.255 (range). IPv4 only. Wildcards must be contiguous and convertible to CIDR. The values 0.0.0.0 and 255.255.255.255 are interpreted as subnet masks, not wildcards. To express their wildcard meanings, use /32 and /0, respectively. Results update as you type, with the prefix and subnet mask always shown together. Your input format is preserved under Original input. Leave the IP field blank to skip membership checks. Errors are explained in the BLOCK card for that line. If you enter a range, you get the CIDR blocks that cover it exactly, along with options showing how much extra address space fewer blocks would include. Recommendations highlight where a few extra addresses can greatly shorten the list. If any host bits are set, the calculator normalizes the input to the network address and marks the line number and its block with !.Using this tool
When it helps
Use this calculator to compare different notations for IPv4 blocks, aggregate an address list, or check which block contains a particular IP address. Enter one block per line; the corresponding BLOCK card uses that line number. You can mix prefixes, subnet masks, contiguous wildcard masks, and ranges written as a start and end address. This also helps compare source lists that describe blocks in different formats.
First check how each line was interpreted in Block details, then look for blocks that can be combined under Aggregation. To check individual addresses, enter one IP per line in the second field and read Membership. Review the reason shown in any BLOCK with an error. Invalid lines are excluded from calculations on valid blocks, so a visible result does not mean the entire input was processed.
Understanding results
In Block details, Prefix and Mask describe the same size in two notations. Range and Total addresses include both endpoints. For prefixes of /30 or shorter, the Usable addresses field shows the calculated range with the network and broadcast addresses excluded. For /31, it shows both addresses of a point-to-point link; for /32, it shows one address. If the result differs from Original input, also read the notice explaining normalization to the network address.
Aggregation removes overlap and combines compatible boundaries without extending the original address coverage. A card for a start-to-end range separately offers summaries that may extend that range. When a shorter list is proposed, check how many additional addresses it includes. Membership checks the full range, so an included boundary address is not automatically an address you can assign to a host.
Measured case
In a browser calculation, the block field contained 192.0.2.0/25 and 192.0.2.128/25 on separate lines. Aggregation reduced the two blocks to 192.0.2.0/24. The result showed Mask as 255.255.255.0, Range as 192.0.2.0 through 192.0.2.255, Total addresses as 256, and Wildcard mask as 0.0.0.255. There was one adjacent merge, with the original coverage preserved.
Checking 192.0.2.200 and 198.51.100.1 in the IP field showed that the first address was outside the first /25 but inside the second. The second address was outside both blocks. Each /25 card showed 128 total addresses and 126 usable addresses. These examples use addresses reserved for documentation. Read aggregated address coverage separately from the host counts of the individual subnets.
Questions and answers
Why does my input become a different network address?
If host bits are set to one under the specified prefix, the calculator clears them to obtain the block. It retains the original input and marks the line and BLOCK with !, so check the block used for the calculation. Use /32 when you intend to identify just the entered address.
Can I enter any wildcard mask?
Only contiguous wildcard masks that can be converted to CIDR are supported. The values 0.0.0.0 and 255.255.255.255 are interpreted as subnet masks first. To express their wildcard meanings, enter /32 and /0, respectively.
Can I use the range-card recommendation directly in a firewall?
The recommendation uses a criterion specific to this tool: reducing the CIDR count while expanding the original range by no more than 10%. It does not decide whether the extra addresses may be permitted. For a firewall or ACL where no extra address is acceptable, use the exact list with no added coverage.
Does leaving the IP field blank prevent block calculations?
The second IP field is optional, so Block details and Aggregation still work when it is empty. Only Membership is skipped.
Further details
How it operates
CIDR describes a block with an address and prefix length. Addresses sharing those leading bits belong to the block; both its size and its starting address must fit the boundary. To convert a start-to-end range into CIDR blocks, the calculator takes the largest aligned block at the current start that does not pass the end. It repeats that step over the remainder until the range is covered without gaps.
Aggregation removes entries already covered by another block and repeatedly combines adjacent pairs that completely fill a common parent block. Exact aggregation does not fill missing addresses between two ranges. Even adjacent ranges may remain as several blocks if their boundaries do not align into one CIDR block. Membership applies the mask to each IP address and compares the result with the network address of the block. These comparisons do not send packets or check whether a device responds.
Standards and references
Section 3.1 of RFC 4632 explains prefix notation and size, while Section 4 discusses address assignment and aggregation. Section 2.1 of RFC 3021 supports treating both /31 addresses as hosts on a point-to-point link. The 10% recommendation in the range card is a tool-specific selection criterion, not an allowance specified by an RFC. Applying route aggregation requires a separate review of routes and policies for that network.
Constraints
This calculator supports IPv4, not IPv6 or noncontiguous wildcard masks. Block input is limited to 64 entries; Membership handles up to 200 distinct IP addresses and 64 blocks, with excess entries omitted. The calculator does not determine address ownership, assignment, use, special-purpose restrictions, or connectivity. JavaScript is required, and entered values are calculated in the browser. Before using results in a configuration, review invalid lines, network-address normalization, extra coverage, and omission notices, then compare the result with the rules of the actual device.
Standards: RFC 4632 (CIDR address assignment and aggregation) · RFC 3021 (/31 point-to-point links)