Skip to main content
IPAddressLookup.in

IPv4 Range to CIDR Calculator

Convert any arbitrary start and end IPv4 address boundary into the exact minimal set of covering CIDR prefixes for Linux iptables/nftables, cloud VPC security groups, and BGP prefix filters.

Sample boundaries:

Range: 192.168.1.1 – 192.168.1.6 · Total Addresses: 6

Minimal Covering CIDR Prefixes (4 Blocks)

CIDR BlockStart (Network)End (Broadcast)AddressesCopy
192.168.1.1/32192.168.1.1192.168.1.11
192.168.1.2/31192.168.1.2192.168.1.32
192.168.1.4/31192.168.1.4192.168.1.52
192.168.1.6/32192.168.1.6192.168.1.61

Why Arbitrary IP Ranges Often Require Multiple CIDR Blocks

A single CIDR block of prefix length /N must obey two strict binary constraints: its size must be an exact power of two (2^(32−N)), and its starting 32-bit integer address must be evenly divisible by that block size (meaning the trailing 32 − N bits of the start address are all zeros).

When an IP allocation or firewall rule starts or ends on an unaligned boundary—for example, 192.168.1.1 through 192.168.1.6—no single CIDR prefix can cover those 6 addresses without spilling over into .0 or .7. Our algorithm steps through the range using 64-bit BigInt bitmask alignment, greedily selecting the largest aligned power-of-two block at each step until the entire range is covered. Compare individual blocks with our IPv4 Subnet Calculator.

Practical Use Cases

  • RDAP netblock conversion: Legacy WHOIS records often list startAddress and endAddress ranges that span multiple CIDR prefixes.
  • Cloud firewall allow-lists: AWS, GCP, and Azure security groups require strict CIDR notation rather than start–end IP pairs.

Technical Specifications & Protocol Facts

Authoritative parameters, dimensions, and IETF RFC compliance

Parameter / DimensionTechnical SpecificationStandard / Authority
Canonical Document ScopeIP Range to CIDR Calculator — Route /ip-range-calculatorIPAddressLookup.in Technical Reference
Supported Address FamiliesIPv4 (32-bit dotted-decimal) & IPv6 (128-bit hexadecimal)RFC 791 / RFC 8200 / RFC 5952
Authoritative Registration ProtocolRegistration Data Access Protocol (RDAP) via IANA BootstrapRFC 7480–7484 / RFC 9224
Special-Purpose Range ClassificationPrivate LAN (RFC 1918), Shared CGNAT 100.64.0.0/10 (RFC 6598), ULA (RFC 4193)RFC 6890 IANA Registry

Frequently Asked Questions

Concise answers verified against IANA, APNIC, and IETF protocol standards

What is the primary purpose of IP Range to CIDR Calculator?

Convert any arbitrary IPv4 start–end boundary into minimal covering CIDR blocks for firewall rules and routing. Every output on IPAddressLookup.in follows IETF RFC standards and cites primary RIR/IANA sources.

Are IP and network queries on this page logged or shared with advertisers?

No. IPAddressLookup.in operates on a strict data-minimization model with stateless query execution, short-lived caching (15 minutes max for upstream RDAP/DNS), and zero persistent user lookup history.

How often is the technical documentation on IPAddressLookup.in reviewed?

All protocol calculators, RFC citations, and Indian telecom notes are verified by the 2026-11-01 editorial and engineering review cycle.

Contextual utilities and reference documentation verified for this workflow

IP Range Calculator · Canonical: https://ipaddresslookup.in/ip-range-calculator · Reviewed: 2026-11-01

Reviewer: IPAddressLookup.in Technical Network Utility Group · Stateless Privacy · Accuracy & Data Limits