ToolNestr

CIDR / IP Range Calculator

Enter a CIDR block and instantly see the full range of IP addresses it covers. For large ranges only the first and last 10 addresses are shown to keep the page responsive.

Reviewed by the ToolNestr Editorial Team — July 2026

Calculate CIDR range

How CIDR calculation works

CIDR (Classless Inter-Domain Routing) was introduced in 1993 (RFC 1517–1520) to replace the rigid classful addressing scheme that was wasting IP address space. Under classful addressing, organizations were allocated entire Class A, B, or C networks regardless of their actual needs. CIDR allows any prefix length between /0 and /32, enabling ISPs to allocate exactly the right amount of address space and aggregate routes efficiently.

The calculator parses the CIDR notation, extracts the IP address and prefix length, then computes the network address by zeroing out the host bits using a bitwise AND with the subnet mask. The broadcast address is computed by setting all host bits to 1. The complete range of addresses between (and including) the network and broadcast addresses is then generated. For large ranges (more than 20 addresses) the display is truncated to show only the first and last 10 addresses for readability.

The total number of addresses in any CIDR block is always a power of two: 2^(32 - prefix). This is because the prefix defines a fixed number of bits and the remaining bits enumerate all possible combinations. For example, /24 has 2^8 = 256 addresses, /20 has 2^12 = 4096 addresses, and /16 has 2^16 = 65,536 addresses. Understanding this exponential relationship is key to planning IP allocations.

CIDR IP Range Diagram Diagram showing how a CIDR prefix maps to a contiguous block of IP addresses CIDR Block 10.0.0.0/24 — 256 IP Addresses N B N = Network (10.0.0.0) ... B = Broadcast (10.0.0.255) 10.0.0.0 /24 Block 254 usable hosts 10.0.0.255 Broadcast
A /24 CIDR block spans 256 addresses from the network address to the broadcast address, with 254 usable host addresses in between

Why CIDR was a breakthrough

Before CIDR, the internet routing table was growing exponentially and threatened to overwhelm the memory capacity of routers. Classful addressing meant that a /8 (Class A) announcement carried 16 million addresses, while a /24 (Class C) announced only 256 addresses. The routing table had to store every individual classful network, which by 1993 had grown to over 100,000 entries and was accelerating.

CIDR solved this through route aggregation (also called supernetting or prefix summarization). Instead of announcing four separate /24 networks, an ISP could announce a single /22 that covered all of them. This collapsed multiple routing table entries into one. Today's global BGP routing table contains nearly 1 million IPv4 routes, but without CIDR it would be many times larger and would have exceeded router hardware capabilities decades ago.

CIDR also enabled the creation of Classless Inter-Domain Routing zones, where IP allocation could be delegated hierarchically. IANA allocates large /8 blocks to Regional Internet Registries (RIRs), which allocate smaller blocks to ISPs, which allocate even smaller blocks to customers. This hierarchical structure mirrors the DNS system and makes the internet scalable and manageable.

CIDR quick reference

Prefix Subnet Mask Total IPs Usable Hosts Example Use
/8255.0.0.016,777,21616,777,214Large ISP / enterprise
/16255.255.0.065,53665,534University / large company
/24255.255.255.0256254Small office / VLAN
/28255.255.255.2401614Small subnet
/30255.255.255.25242Point-to-point link
/32255.255.255.25510Single host route

Using CIDR in practice

Network engineers use CIDR notation daily for configuring routing protocols, firewall rules, and access control lists. In BGP, prefixes are advertised with their CIDR length to indicate the subnet size. In OSPF, network statements use wildcard masks (the inverse of subnet masks) to match interfaces. In firewall rules, source and destination addresses are often specified in CIDR notation to match entire subnets with a single rule.

When troubleshooting routing issues, understanding CIDR is essential. A common problem is a more specific prefix (/24) being advertised alongside a less specific one (/16) from a different source. The router's longest-prefix-match algorithm always prefers the more specific route, which can cause traffic to be sent to unexpected destinations. This is why proper route filtering and prefix-list management are critical in production BGP deployments.

Cloud networking heavily uses CIDR. AWS VPCs are created with a CIDR block (e.g., 10.0.0.0/16), and subnets within that VPC use smaller CIDR blocks (e.g., 10.0.1.0/24). Azure virtual networks and Google Cloud VPCs follow the same pattern. Understanding how CIDR blocks nest and overlap is essential for designing cloud network architectures that scale without conflicts.

Limitations

This calculator handles standard IPv4 CIDR notation only. IPv6 CIDR notation uses a similar format (e.g., 2001:db8::/32) but with 128-bit addresses and hex representation. The calculator truncates the display for ranges larger than 20 addresses — for those cases, the full list is not shown to maintain browser performance. The displayed first/last 10 addresses are sufficient to understand the range boundaries.

Note that CIDR blocks must be aligned to bit boundaries. A /24 must start on an address where the last 8 bits are zero (e.g., 10.0.1.0/24, not 10.0.1.128/24). If you enter a misaligned CIDR, the calculator will still compute the math, but the resulting range will be the aligned block that contains the entered address. This is consistent with how routers interpret CIDR notation.

Frequently asked questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its network prefix in the form A.B.C.D/N where N is the number of leading bits that identify the network. For example, 10.0.0.0/24 means the first 24 bits are the network portion and the remaining 8 bits identify hosts.

How do I read CIDR notation?

The number after the slash is the prefix length. It tells you how many bits are fixed for the network. A shorter prefix means a larger range: /8 has 16 million addresses, /16 has 65,536, /24 has 256, and /32 is a single host.

What is the difference between CIDR and subnet mask?

CIDR notation (e.g., /24) and subnet mask (e.g., 255.255.255.0) are two ways of expressing the same thing. The prefix length is simply the count of 1-bits in the subnet mask. /24 equals 24 bits set to 1, which is 255.255.255.0.

How many IPs are in a /16?

A /16 prefix has 32 - 16 = 16 host bits, giving 2^16 = 65,536 total addresses. The first address is the network address and the last is the broadcast address, leaving 65,534 usable addresses.

What is a /32 CIDR?

A /32 prefix means all 32 bits are fixed — it represents a single IP address with no network or broadcast address. It is commonly used for host routes in routing tables and for whitelisting specific IPs in firewall rules.

Can CIDR ranges overlap?

Yes — overlapping CIDR ranges are a common source of routing problems. For example, 10.0.0.0/16 completely contains 10.0.1.0/24. IP address management (IPAM) systems are used to detect and prevent overlaps in production networks.

What is the smallest possible CIDR range?

The smallest is /32, representing a single IP address. The largest is /0, representing all 4.3 billion IPv4 addresses. In practice, /0 is only used in default routes.

What are first/last 10 addresses?

For large CIDR ranges (more than 20 addresses), showing every IP would overwhelm the page. Instead, the calculator shows the first 10 and last 10 addresses in the range with ellipsis between them, giving you a clear picture of the range boundaries.

All tool categories

Networking & IP Tools (36 tools)
🧮 Everyday (26 tools)
💪 Health & Fitness (30 tools)
💰 Finance (34 tools)
🔢 Math (23 tools)
📄 PDF Tools (10 tools)
🎨 Creators (12 tools)
💻 Developers (24 tools)
⚡ Engineering & Science (24 tools)
⚛️ Physics (48 tools)
🧪 Chemistry (50 tools)
🧬 Biology (50 tools)
🏠 Construction & Home Improvement (105 tools)
👗 Clothing & Garment Tools (68 tools)
🍳 Cooking & Baking (9 tools)
🚗 Automotive (26 tools)
🖼️ Image Tools (13 tools)
🔐 Security & Hash (15 tools)
📝 Text Tools (15 tools)
🔍 SEO Tools (11 tools)
🔄 Converters (69 tools)
🕐 Time & Date (15 tools)
📊 Chart Generators (11 tools)
🕌 Islamic Tools (16 tools)