Networking
IPv4 Range to Exact CIDR Blocks Calculator
Decompose a continuous inclusive IPv4 range into aligned CIDR blocks without adding outside addresses.
How the calculation works
Addresses in inclusive range = ipv4_number(end)-ipv4_number(start)+1 addresses. CIDR block count = ipv4_range_blocks(start,end) blocks. Exact CIDR decomposition = ipv4_range_cidrs(start,end) .
Worked example
Example inputs — First IPv4 address included: 192.168.1.0; Last IPv4 address included: 192.168.1.255. Expected results — Addresses in inclusive range: 256 addresses; CIDR block count: 1 blocks; Exact CIDR decomposition: 192.168.1.0/24.
Assumptions and limits
Offline planning arithmetic: this calculator sends no packets and changes no device configuration. Actual routing, reservations, implementation limits and measured network conditions must be checked separately. Uses a greedy aligned power-of-two decomposition. This returns multiple blocks where needed rather than one covering supernet with excess addresses.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- IPv4 Subnet, Host Range & Mask Calculator
- Smallest IPv4 Covering Prefix Calculator
- IPv4 VLSM Host Requirement Planner
- IPv6 Prefix & Exact Address Capacity Calculator
- Modified EUI-64 IPv6 Interface ID Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.