CIDR / IP Range Calculator
CIDR / IP Range Calculator
Special-purpose check (IANA registry)
How to Use the CIDR Range Calculator
Pick a direction
CIDR → range reads one block. Range → CIDR takes a first address and a last address or a count, the form registry files use.
Check the notice
If the address you typed is not the start of its block, the calculator says so and shows the block that contains it.
Read the special-purpose check
It tells you whether the whole block, part of it, or none of it is in a private, shared, documentation, multicast or other special range.
A block, its range, and the ranges that are not ordinary
A CIDR block is an address and a prefix length, like 10.0.0.0/22: the prefix says how many leading bits name the network. Setting the remaining bits to zero gives the network address and setting them to one gives the last address, and the calculator shows both along with the subnet mask, the wildcard mask that Cisco access lists use, and the usable-host count. A /31 follows RFC 3021, where both addresses are hosts and there is no broadcast address, and a /32 is a single host.
Two things go wrong quietly with a block. The first is an address that is not the start of its block: 192.189.139.0/23 is really 192.189.138.0/23, which starts one /24 earlier than it reads. The calculator tells you when it has moved your address. The second is scope. Only three ranges are private under RFC 1918, and more than a dozen others are special in other ways, from carrier-grade NAT space to the documentation ranges. The calculator checks the whole block against the IANA special-purpose registry, not just its first address, so a block that is part private and part public is reported as exactly that.
The other direction matters because registry files record each block as a start address and a count, not as a prefix. In APNIC’s and LACNIC’s current files every record is one aligned prefix anyway, but AFRINIC’s has a few dozen that are not, and any range you assemble yourself, such as several adjacent blocks merged, usually is not either. A count that is not a power of two, or a power-of-two block that starts in the wrong place, cannot be written as one prefix. Range → CIDR returns the shortest exact list, the same split you would put in a route filter or a firewall rule.
An off-by-one in a firewall range can expose or strand a host — converting CIDR to an exact range removes the guesswork.
Which ranges are private, and why a range can need several prefixes
CIDR arrived in RFC 1519 in September 1993. RFC 4632 (August 2006) replaced that document and is the current text.
A prefix covers a power-of-two number of addresses, from 1 to 2³² (RFC 4632), starting on a multiple of that number. A range of any other shape takes several prefixes.
Private-Use space is three ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918, February 1996).
100.64.0.0/10 is Shared Address Space for carrier-grade NAT (RFC 6598), not private space. Loopback 127.0.0.0/8 (RFC 1122) and link-local 169.254.0.0/16 (RFC 3927) are special-purpose, and not RFC 1918 either.
The network and broadcast addresses are not hosts, except in a /31, where RFC 3021 makes both addresses hosts, and in a /32, which is one host.
The most IPv4 a new or existing APNIC member can get is a /23, or 512 addresses. The same page’s timeline dates the cut to a /23 from APNIC’s final /8 to 28 February 2019, under policy prop-127 (APNIC, “IPv4 exhaustion”, read 16 November 2026).
Registry files write a block as a start and a count, not a prefix. AFRINIC’s delegated file dated 15 November 2026 lists one that starts at 196.6.1.0: it is nine prefixes, not one. It is the Range → CIDR default.
Frequently Asked Questions
- CIDR (Classless Inter-Domain Routing) writes a network as an address, a slash and a prefix length, such as 192.168.1.0/24. The prefix is how many leading bits are fixed for the network; the remaining bits number the addresses inside it. It was introduced by RFC 1519 in September 1993 in place of the fixed Class A, B and C sizes, and RFC 4632 is the current specification.
- It sets every host bit of the address to zero to get the network address, and every host bit to one to get the last address. In an ordinary block the first usable host is one above the network address and the last is one below the broadcast address, so a /24 gives .1 to .254.
- A block has to start on a multiple of its own size. If the address you typed is not that start, for example 192.189.139.0/23, the calculator shows the /23 that contains it, 192.189.138.0/23, and says so above the result. That block includes .138 and stops at .139.255, so if you wanted 512 addresses starting at .139, use Range → CIDR: they are two /24s.
- A single prefix only covers a power-of-two number of addresses (1, 2, 4 … 256, 512 …), and only when the range starts on a multiple of that number. Range → CIDR splits any other range into the fewest prefixes that cover it exactly, with nothing extra. Ten addresses from 10.0.0.0 take two prefixes, a /29 and a /31.
- In an ordinary block the first address identifies the network and the last is the broadcast address, and neither is assigned to a device. A /24 has 256 addresses and 254 usable hosts. A /31 is the exception under RFC 3021: on a point-to-point link both addresses are hosts and there is no broadcast address. A /32 is a single host.
- RFC 1918 reserves three ranges for private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Many other ranges are special-purpose without being private, among them 100.64.0.0/10 for carrier-grade NAT (RFC 6598), loopback 127.0.0.0/8, link-local 169.254.0.0/16, the three documentation /24s (RFC 5737), 198.18.0.0/15 for benchmarking, multicast 224.0.0.0/4 and the reserved 240.0.0.0/4. The calculator checks the whole block against the IANA special-purpose registry, so a block such as 10.0.0.0/7, which is half 10.0.0.0/8 and half public 11.0.0.0/8, is reported as partly special-purpose rather than private.
- Addresses in 224.0.0.0/4 identify multicast groups (RFC 5771) and 240.0.0.0/4 is reserved, so neither is assigned to hosts and a network address, broadcast address or usable-host count would mean nothing there. The calculator still shows the range and the total number of addresses.
- The bitwise inverse of the subnet mask: where the mask has 1s the wildcard has 0s. For a /24 the subnet mask is 255.255.255.0 and the wildcard is 0.0.0.255. Cisco access control lists take wildcard masks, so both are shown.
- What you enter is processed in your browser and is not sent to our servers, unless you share or open a link that carries it. On this page that link is made only by the Share button, and it carries the block or range you typed.
Method & sources
How it computes
Network = address AND mask; last address = network OR wildcard; usable hosts = 2^(32-p) - 2, except /31 = 2 (RFC 3021) and /32 = 1. Scope: the whole block against the IANA IPv4 Special-Purpose Address Registry (RFC 6890) plus multicast 224.0.0.0/4 (RFC 5771). Range to CIDR: largest power-of-two block aligned at the current start that fits, repeated (RFC 4632 §3.1).
What this tool implements
- RFC 4632 §3.1 CIDR: a prefix is a power-of-two block aligned on its size; a range of any other shape is split into the fewest such blocks
- RFC 1918 Private-Use is exactly 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16; 100.64.0.0/10 is Shared Address Space (RFC 6598), not private
- Scope judged on the whole block against the IANA IPv4 Special-Purpose Address Registry (RFC 6890): within one range, partly special, or none
- RFC 3021 /31 point-to-point links: both addresses are hosts, no broadcast; multicast (RFC 5771) and reserved 240.0.0.0/4 get no host arithmetic
Sources
- RFC 4632
- RFC 1918
- RFC 3021
- RFC 6598
- RFC 5771
- IANA IPv4 Special-Purpose Address Registry (RFC 6890), read 16 Nov 2026: https://www.iana.org/assignments/iana-ipv4-special-registry/
- AFRINIC, delegated statistics file delegated-afrinic-latest dated 15 Nov 2026 (cited by file name): the 196.6.1.0 (25,600) and 192.189.139.0 (512) records used as examples