Smallest Covering CIDR Calculator
Find one prefix covering a range.
Smallest Covering CIDR Calculator: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related IPv4 Subnetting & RangeAll Tools
IPv4 Range Calculator
Find address boundaries from a prefix.
IPv4 Subnet Calculator
Calculate subnet details from address and mask.
Network Address Calculator
Find the subnet’s network address.
IPv4 Broadcast Address Calculator
Find broadcast addresses where applicable.
First and Last Address Calculator
Identify a range’s endpoints.
Usable IPv4 Host Range Calculator
Apply the selected subnet-use rules.
How Smallest Covering CIDR Calculator Works?
This tool works by finding the longest prefix that the start and end addresses share, then returning the block defined by that prefix.
Enter a range
Type a start and end address, such as
192.168.1.200 – 192.168.2.10.Compare the bits
The calculator compares both addresses bit by bit from the left.
Stop at the first difference
The count of matching bits before the first difference is the covering prefix length.
Return the block
The calculator returns the covering block and the number of extra addresses it adds outside the range.
Smallest Covering CIDR Calculator Formula
The formula is p = 32 − bit length of (Start XOR End), and Cover = (Start AND Mask(p))/p.
Differing bits
D = Start XOR EndEvery 1 bit marks a position where the endpoints differ.
Covering prefix
p = 32 − bitlength(D)Common leading bits.
Covering block
(Start AND Mask(p))/pOne prefix holding both endpoints.
Extra addresses
2^(32−p) − (End − Start + 1)Addresses in the cover but outside the range.
Worked example: 192.168.1.200 – 192.168.2.10
Octet 3: 1 = 00000001 2 = 00000010 Shared bits = 16 + 6 = 22 Cover = 192.168.0.0/22 Range size = 67 addresses, cover size = 1,024 Extra = 1,024 − 67 = 957 addresses
Smallest Covering CIDR Calculator Conversion Table
The table shows the single covering prefix for 10 ranges, with the range size, cover size, and extra addresses.
| Range | Covering CIDR | Range Size | Cover Size | Extra |
|---|---|---|---|---|
| 192.168.1.200 – 192.168.2.10 | 192.168.0.0/22 | 67 | 1,024 | 957 |
| 10.0.0.0 – 10.0.0.255 | 10.0.0.0/24 | 256 | 256 | 0 |
| 10.0.0.1 – 10.0.0.254 | 10.0.0.0/24 | 254 | 256 | 2 |
| 172.16.5.0 – 172.16.6.255 | 172.16.4.0/22 | 512 | 1,024 | 512 |
| 172.16.4.0 – 172.16.7.255 | 172.16.4.0/22 | 1,024 | 1,024 | 0 |
| 203.0.113.60 – 203.0.113.70 | 203.0.113.0/25 | 11 | 128 | 117 |
| 10.0.255.0 – 10.1.0.255 | 10.0.0.0/15 | 512 | 131,072 | 130,560 |
| 198.51.100.0 – 198.51.100.99 | 198.51.100.0/25 | 100 | 128 | 28 |
| 100.64.0.0 – 100.127.255.255 | 100.64.0.0/10 | 4,194,304 | 4,194,304 | 0 |
| 192.0.2.127 – 192.0.2.128 | 192.0.2.0/24 | 2 | 256 | 254 |
What is Smallest Covering CIDR Calculator?
The Smallest Covering CIDR Calculator is a tool that returns the one CIDR prefix with the fewest addresses that still contains an entire IP range.
An exact conversion of a range often needs several CIDR blocks. Some systems accept only 1 prefix per entry. The Smallest Covering CIDR Calculator gives that single prefix and reports how many extra addresses it pulls in.
Ranges that straddle a large boundary produce large covers. 192.0.2.127 – 192.0.2.128 holds 2 addresses, but the covering block is 192.0.2.0/24, since the 2 endpoints differ in the 8th bit of the last octet.
What are the uses of Smallest Covering CIDR Calculator?
There are 4 main uses of the Smallest Covering CIDR Calculator, including single-entry rules, route summaries, and cloud CIDR selection.
Writing single-entry rules
Security groups with tight rule limits use 1 covering prefix per range.
Drafting route summaries
A summary route for scattered subnets starts with the smallest covering prefix.
Choosing a VPC CIDR
A cloud network must contain every planned subnet. The cover shows the minimum VPC size.
Measuring over-permission
The extra address count shows how much a broad rule over-permits.