CIDR Calculator
Enter an IP address and CIDR prefix to see the full network breakdown, plus a complete CIDR-to-subnet-mask reference table below.
Input
Results
Binary
—
CIDR Reference Table
| CIDR | Subnet Mask | Total Addresses | Usable Hosts |
|---|
Overview
The CIDR Calculator expands a prefix such as 10.10.10.15/20 into the network it describes and includes a complete reference table of every prefix from /0 to /32 with its subnet mask, total addresses, and usable hosts.
It is the quickest way to answer "what mask is /20?", "how many hosts fit in a /22?", or "what range does this CIDR block cover?" — questions that come up constantly when reading firewall rules, cloud security groups, route tables, and allow-lists.
How It Works
CIDR (Classless Inter-Domain Routing, RFC 4632) replaced the old class A/B/C scheme. A prefix length says how many leading bits identify the network; the remaining bits identify hosts. /20 means 20 network bits and 12 host bits, which is the same as the mask 255.255.240.0.
Because every extra network bit halves the block, sizes follow a simple pattern: /24 = 256, /23 = 512, /22 = 1024, and so on, doubling each time the prefix shrinks by one. Contiguous blocks can be combined ("summarized") into a shorter prefix when they are aligned, which keeps routing tables small.
The calculation itself is identical to the Subnet Calculator; this page adds the reference table and focuses on reading and writing CIDR notation.
How to Use the CIDR Calculator
- Enter an address and prefix in one field, for example
10.10.10.15/20. - Press Calculate to see the network address, broadcast address, first and last address, host counts, and wildcard mask.
- Scroll to the CIDR Reference Table to compare other prefix lengths.
- Copy the results into your documentation or change ticket if needed.
Worked Example
What range does 10.10.10.15/20 cover?
A firewall rule allows 10.10.10.15/20. Note that the host bits are not zero, so the rule actually covers the whole /20 block that contains that address, not just one host.
Input
IP address / prefix: 10.10.10.15/20
Output
Prefix: /20
Subnet Mask: 255.255.240.0
Network: 10.10.0.0
Broadcast: 10.10.15.255
First Address: 10.10.0.1
Last Address: 10.10.15.254
Total Addresses: 4096
Usable Hosts: 4094
Wildcard Mask: 0.0.15.255
A /20 keeps 20 network bits: the first two octets (16 bits) plus the top 4 bits of the third octet. The third octet's mask is 11110000 (240), so subnets begin every 16 in the third octet: 10.10.0.0, 10.10.16.0, 10.10.32.0, and so on. The address 10.10.10.15 has a third octet of 10, which lies in the 0–15 block, so the network is 10.10.0.0 and it spans up to 10.10.15.255 — 4,096 addresses, of which 4,094 are usable hosts.
The practical lesson: when you see a CIDR block with non-zero host bits, most devices and firewalls silently normalize it to the network address. If you meant a single host, write /32.
Interpreting Results
- Prefix and mask
- Two ways of writing the same thing:
/20and255.255.240.0. Tools differ in which they accept, so know both. - Network vs. the address you typed
- If the network address differs from what you typed, the input had host bits set. That is valid for describing an interface address but is not the canonical form of the block.
- Total vs. usable hosts
- Usable is total minus two for prefixes up to /30; /31 and /32 are special (see the Subnet Calculator).
- Reference table
- Each row is one prefix. The Total Addresses column doubles every time the prefix drops by one, which is the fastest way to estimate sizes: /16 is 65,536, /8 is 16,777,216.
Troubleshooting
- "CIDR prefix must be between 0 and 32."
- Use a whole number from 0 to 32. Prefixes such as /48 or /64 belong to IPv6, which this tool does not handle.
- My firewall rejects or reinterprets my CIDR block.
- Calculate the block and use its network address (here
10.10.0.0/20). Some platforms refuse blocks with host bits set; others quietly widen the rule. - A rule covers more addresses than I intended.
- Compare the prefix to the reference table. Each step shorter doubles the number of covered addresses; a /16 instead of a /24 covers 256 times as much address space.
Limitations and Accuracy
- IPv4 only.
- The tool does not check whether a block is publicly routable, private (RFC 1918), or reserved. Compare against the IANA IPv4 special-purpose registry if that matters.
- It describes one block at a time and does not compute summarization of several blocks; use the IP Range Calculator to find the CIDR blocks covering an arbitrary range.
Data Handling
Runs in your browser. What you enter is processed on your device and is not sent to NetEngToolkit’s servers or to any third party.
Frequently Asked Questions
What is the difference between this and the Subnet Calculator?
The arithmetic is the same. This page is organized around reading CIDR notation and includes the full prefix reference table; the Subnet Calculator also accepts a separate subnet mask field.
Is 10.10.10.15/20 a valid thing to write?
Yes, as an interface address with its prefix length. As a route or firewall block, the canonical form is 10.10.0.0/20.
How do I summarize several subnets into one prefix?
They must be contiguous and aligned to the size of the summary. The CIDR guide explains the rule with examples.