Home › Networking & Subnet Calculators › CIDR Calculator

CIDR Calculator

Classless Inter-Domain Routing (CIDR, introduced in RFC 1519 and RFC 4632) eliminated rigid Class A, B, and C address boundaries, revolutionizing glob

Networking
Formula & Methodology
ext{Prefix Length } n = ext{Count of leading 1 bits in Subnet Mask} ext{Total Addresses} = 2^{32 - n} ext{Subnet Count for Target } k = 2^{k - n} quad ( ext{for } k > n)

CIDR notation specifies the number of leading binary 1s in the subnet mask. For example, /24 indicates 24 one bits followed by 8 zero bits. The total address capacity equals 2^(32 − n). Dividing a /n block into smaller /k subnets yields 2^(k − n) individual subnets.

CIDR Notation Conversion for 10.0.0.0/16

255.255.0.0 (/16)

Overview

Classless Inter-Domain Routing (CIDR, introduced in RFC 1519 and RFC 4632) eliminated rigid Class A, B, and C address boundaries, revolutionizing global internet routing and slowing IPv4 exhaustion. The CIDR Calculator converts between CIDR prefix notation (/n) and dotted-decimal subnet masks, evaluates subnet division potential, and computes parent supernet aggregations.

CIDR notation concisely describes an IP network block with a single slash suffix (such as 10.0.0.0/16 rather than 10.0.0.0 with mask 255.255.0.0). This calculator translates CIDR notation into dotted decimal masks, wildcard masks, total address capacity, and hierarchical subnetting divisions.

Worked Examples

Example 1: Converting 10.0.0.0/16 to Subnet Mask and IP Span

CIDR Block = 10.0.0.0/16, Target Subnet = /24

  1. Convert /16 prefix: 16 ones followed by 16 zeros = 255.255.0.0.
  2. Total IP capacity: 2¹⁶ = 65,536 addresses.
  3. Address span: 10.0.0.0 to 10.0.255.255.
  4. Dividing into /24 subnets: 2²⁴⁻¹⁶ = 2⁸ = 256 subnets of /24 (254 hosts each).
Final Answer: 255.255.0.0 (/16, 65,536 IPs, 256x /24 subnets)

Example 2: Cloud VPC Block (172.16.0.0/20)

CIDR Block = 172.16.0.0/20, Target Subnet = /24

  1. Prefix /20 mask: 255.255.240.0.
  2. Total capacity: 2¹² = 4,096 IP addresses.
  3. Subnet division: 2²⁴⁻²⁰ = 2⁴ = 16 subnets of /24.
Final Answer: 255.255.240.0 (/20, 4,096 IPs, 16x /24 subnets)

Example 3: Supernetting Adjacent Blocks (/24 to /23)

Two contiguous /24 blocks: 192.168.0.0/24 and 192.168.1.0/24

  1. Aggregate by decrementing prefix: /24 − 1 = /23.
  2. Supernet mask: 255.255.254.0.
  3. Combined block: 192.168.0.0/23 (512 total addresses).
Final Answer: 192.168.0.0/23 (Supernet)

How to Use This Calculator

  1. Enter an IPv4 address with prefix in CIDR notation (e.g. 10.0.0.0/16).
  2. Choose a target subnet size to evaluate division potential.
  3. View the equivalent subnet mask, wildcard mask, and complete address span.
  4. Review the parent supernet aggregation for upstream routing tables.

Reference Table

CIDR PrefixSubnet MaskTotal IPsUsable HostsClass Equivalent
/32255.255.255.25511Single Host
/30255.255.255.252421/64 Class C
/28255.255.255.24016141/16 Class C
/26255.255.255.19264621/4 Class C
/24255.255.255.02562541 Class C
/22255.255.252.01,0241,0224 Class C
/20255.255.240.04,0964,09416 Class C
/18255.255.192.016,38416,38264 Class C
/16255.255.0.065,53665,5341 Class B
/12255.240.0.01,048,5761,048,57416 Class B
/8255.0.0.016,777,21616,777,2141 Class A

Frequently Asked Questions

What does CIDR stand for and why was it introduced?
CIDR stands for Classless Inter-Domain Routing. It was introduced in 1993 to replace the rigid Class A, B, and C system, allowing arbitrary prefix lengths to optimize address allocation and shrink global BGP routing tables.
How do I convert a subnet mask into CIDR notation?
Count the total number of binary 1s in the 32-bit subnet mask. For example, 255.255.255.0 has 8 + 8 + 8 + 0 = 24 ones, which corresponds to /24.
What is route summarization (supernetting)?
Supernetting combines multiple smaller contiguous subnets into a single larger route with a shorter prefix (e.g., combining four /24 blocks into a single /22 route), reducing memory usage in router forwarding tables.
Can any two subnets be combined into a supernet?
No. To be aggregated into a single CIDR block, the subnets must be contiguous and must align on an exact power-of-two binary boundary.
What is the largest possible CIDR block in IPv4?
The largest block is 0.0.0.0/0, which represents the entire IPv4 internet address space (all 4,294,967,296 addresses) and serves as the default route on routers.
Reviewed & Authored by: OnlineConvers Editorial Team · Last Updated: 2026-10-06
Converts between CIDR slash notation and dotted-decimal bitmasks using unsigned 32-bit integer arithmetic. Subnet divisions and supernetting follow RFC 4632 specifications.