Skip to main content
IP Range CalculatorPRO
IPv4 Subnetting & RangeInstant Client-Side Tool

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.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

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.

  1. Enter a range

    Type a start and end address, such as 192.168.1.200 – 192.168.2.10.

  2. Compare the bits

    The calculator compares both addresses bit by bit from the left.

  3. Stop at the first difference

    The count of matching bits before the first difference is the covering prefix length.

  4. 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 End

Every 1 bit marks a position where the endpoints differ.

Covering prefix

p = 32 − bitlength(D)

Common leading bits.

Covering block

(Start AND Mask(p))/p

One 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.

RangeCovering CIDRRange SizeCover SizeExtra
192.168.1.200 – 192.168.2.10192.168.0.0/22671,024957
10.0.0.0 – 10.0.0.25510.0.0.0/242562560
10.0.0.1 – 10.0.0.25410.0.0.0/242542562
172.16.5.0 – 172.16.6.255172.16.4.0/225121,024512
172.16.4.0 – 172.16.7.255172.16.4.0/221,0241,0240
203.0.113.60 – 203.0.113.70203.0.113.0/2511128117
10.0.255.0 – 10.1.0.25510.0.0.0/15512131,072130,560
198.51.100.0 – 198.51.100.99198.51.100.0/2510012828
100.64.0.0 – 100.127.255.255100.64.0.0/104,194,3044,194,3040
192.0.2.127 – 192.0.2.128192.0.2.0/242256254

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.