CIDR calculator

Convert ranges, merge networks or split prefixes with exact IPv4 and IPv6 arithmetic.

Local IPv4 and IPv6 arithmetic. Your inputs stay in this tab.

Choose an operation
IP version

Use two addresses from the same family. Both endpoints are included.

Ready. Choose an operation and enter your addresses.

Range to CIDR

Illustrative example

192.0.2.0 – 192.0.2.255256
  1. 192.0.2.0/24256
This calculated example explains the output. Enter your own values and run the tool to replace it.
On this page

Learn more about CIDR calculator

Use the CIDR calculator for ranges, aggregation and splitting

An address list is easier to review when its boundaries are explicit. This CIDR calculator converts an inclusive IP range into the smallest exact set of network prefixes, combines overlapping or adjacent networks without filling gaps, and divides a parent network into equal smaller blocks. Choose the operation above, enter your values, and select Calculate. Both IPv4 and IPv6 are supported.

Read more

Calculations run locally after the page loads, without contacting entered addresses or sending them to a calculation API. Inputs stay in this tab. Clear resets the page; editing an input removes its previous result.

Convert an IP range with the CIDR calculator

Select Range to CIDR and enter inclusive first and last addresses in the same family. Reversed ranges are rejected. A single address becomes an IPv4 /32 or IPv6 /128.

For example, enter 192.0.2.10 through 192.0.2.20. The CIDR calculator returns 192.0.2.10/31, 192.0.2.12/30, 192.0.2.16/30, and 192.0.2.20/32. Their sizes are two, four, four and one address, for a total of eleven. The first block begins exactly at the requested start and the final block ends exactly at the requested finish.

CIDR calculator aggregation examples

Select Aggregate CIDRs and paste one address/prefix per line. Blank lines are ignored. The CIDR calculator accepts up to 256 nonempty lines and 16,384 characters per calculation. Use IPv4 or IPv6 in a given list, not both. Invalid entries stop the complete operation and identify the source line; they are never silently omitted from an otherwise successful answer.

Try 192.0.2.0/25 and 192.0.2.128/25. Together, they cover every address in 192.0.2.0/24, so the CIDR calculator combines them. Adding a duplicate or a smaller prefix already contained in those networks does not increase the address total. Aggregation describes the union of the supplied networks, counting each distinct address once.

Alignment still matters. The adjacent networks 192.0.2.64/26 and 192.0.2.128/26 cannot become one /25 without adding addresses. The CIDR calculator therefore keeps both. Similarly, 192.0.2.0/26 and 192.0.2.128/26 remain separate because an unlisted interval lies between them. A shorter result is useful only when it preserves the original coverage.

If you enter 192.0.2.12/25, the prefix describes the containing network 192.0.2.0/25. The CIDR calculator clears the host bits and displays a normalization notice with the original input and resulting network. Open that notice before copying. An address/prefix does not mean a range beginning at that host; use Range to CIDR when you intend specific inclusive endpoints.

Split networks with the CIDR calculator

Select Split a CIDR, enter the parent network, and give the new prefix length as digits. The new length must be at least the parent's length and no greater than 32 for IPv4 or 128 for IPv6. The CIDR calculator supports the same length too, which returns the normalized parent as a single block rather than an error.

For 192.0.2.0/24 split into /26 networks, the calculator returns four children: 192.0.2.0/26, 192.0.2.64/26, 192.0.2.128/26, and 192.0.2.192/26. Each contains 64 mathematical addresses. The children do not overlap, and their combined coverage equals the parent. The operation does not reserve gateway addresses or allocate the networks on a device.

Read CIDR calculator results accurately

The summary shows family, exact address total and block count. Rows contain each canonical prefix and inclusive boundaries, sorted by numeric address rather than alphabetical spelling.

Read more

Total addresses means all values represented by the result, including values that may have special roles on an actual network. The calculator does not subtract network or broadcast addresses. It also does not claim that all listed addresses are assignable to ordinary hosts. Device behavior, link type, allocation policy and protocol rules determine how a real network uses that space.

Copy and paginate CIDR calculator results

First, Previous, Next and Last navigate pages of up to fifty rows. Go to page accepts exact decimal page numbers, including values beyond ordinary JavaScript precision. Out-of-range page numbers receive an error.

Range and aggregation results offer Copy all CIDRs. Split results offer Copy page CIDRs. Download current page exports only the visible page as one prefix per line for every operation. Check the page indicator before sharing: downloading fifty children does not export an entire large subdivision. Clipboard success is shown after the browser accepts the write.

CIDR calculator limits and method

The range operation advances from the first address using the largest aligned block that fits inside the remaining interval. Aggregation first joins overlapping or adjacent numerical intervals, then applies the same covering process. Splitting calculates a child's offset directly from its index. These choices let the calculator describe enormous networks without attempting to list every individual address.

Read more

Input limits keep processing predictable. The calculator accepts complete dotted-decimal IPv4 and standard IPv6 addresses, with a prefix where required. It rejects hostnames, URLs, ports, bracketed addresses, zone identifiers, abbreviated IPv4, hexadecimal IPv4 and IPv4 octets with leading zeros. Prefix lengths use ordinary decimal digits. Remove spreadsheet headings and comments before pasting a network list.

Mathematical validity is separate from routing, registration and access policy. The calculator does not check whether an address is online, allocated to you, announced in BGP or permitted by a firewall. Private, documentation, multicast and other special-use ranges can all be calculated. A valid result does not turn those ranges into ordinary public unicast space.

The addressing model is described in RFC 4632 and RFC 4291. For host boundaries, use the subnet calculator; these references define concepts rather than certify this implementation.

CIDR calculator questions

Can a range always become one prefix?

No. Its size must be a power of two and its first address must align with that size. The CIDR calculator returns several prefixes when those requirements are not met. This preserves exactly the requested interval. Use the first and last columns to inspect the boundaries instead of assuming that a visually simple range must also have a single-prefix representation.

Why did aggregation leave several blocks?

There may be gaps, unequal sizes or an alignment boundary that prevents a further exact merge. The CIDR calculator does not include extra addresses to make the answer shorter. Compare neighboring rows and the supplied inputs. If you really intend a wider allocation, define that wider interval explicitly rather than interpreting this result as a routing error.

Does an enormous split freeze the browser?

The CIDR calculator computes only the requested page, even for ::/0 split into /128 blocks. The total describes the complete mathematical result, while the list contains at most 50 rows. There is no bulk export of every child of such a split. Choose a practical prefix size for your actual planning task and copy the pages you need.

Can I use the result to configure a network?

Treat the CIDR calculator as arithmetic evidence within your plan. Confirm ownership, existing allocations, routing, device constraints and rollback steps separately. The CIDR notation guide explains prefix boundaries, while IP lookup and ASN lookup answer different registration and routing questions. None of these observations grants authority to use someone else's address space.

CIDR notation guide

IP lookup

ASN lookup

Can I aggregate IPv4 and IPv6 in one list?

Use one address family per calculation. Their different address spaces cannot be merged into one common prefix. Keep separate exports when a policy needs both, and check which syntax the receiving system accepts.

Why is a host address normalized before splitting?

An address with a prefix describes the containing network. Host bits are cleared to find that boundary. Read the normalization notice before copying, especially when you intended a precise start and end range rather than the entire containing prefix.

Does Download current page export every split child?

No. It exports the currently displayed page. Large subdivisions can contain many more rows than one page. Check the page indicator and distinguish the available copy and download actions before treating an export as a complete network list.

Are all mathematical addresses assignable to devices?

Not necessarily. The calculation counts represented values; it does not apply every link convention, reservation or device policy. Address-space arithmetic does not allocate resources or establish that you are authorized to configure the resulting networks.