CuscusLab Logo

CIDR Calculator

Instantly calculate IPv4 subnet masks, IP ranges, and host capacity. Enter an IP and CIDR prefix (e.g., /24) to get started.

CIDR Calculator

Enter any IPv4 address

Select prefix length (0-32)

Common CIDR Reference

CIDRSubnet MaskTotal HostsUsable HostsNote
/32255.255.255.25511Single host
/31255.255.255.25422Point-to-point
/30255.255.255.25242Small subnet
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254Class C
/23255.255.254.0512510
/22255.255.252.01,0241,022
/21255.255.248.02,0482,046
/20255.255.240.04,0964,094
/19255.255.224.08,1928,190
/18255.255.192.016,38416,382
/17255.255.128.032,76832,766
/16255.255.0.065,53665,534Class B
/15255.254.0.0131,072131,070
/14255.252.0.0262,144262,142
/13255.248.0.0524,288524,286
/12255.240.0.01,048,5761,048,574
/11255.224.0.02,097,1522,097,150
/10255.192.0.04,194,3044,194,302
/9255.128.0.08,388,6088,388,606
/8255.0.0.016,777,21616,777,214Class A

Click any row to auto-select that CIDR prefix

What is CIDR?

CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and IP routing. It replaces the older class-based system (Class A, B, C) with a flexible system that allows network engineers to divide IP address spaces into subnets of various sizes, improving the efficiency of IP address distribution.

Understanding Subnetting

Subnetting is the practice of dividing a network into two or more smaller networks. It helps in:

  • Reducing Network Traffic: By breaking down a large network, broadcast traffic is contained within smaller subnets.
  • Improving Network Security: Easier to apply security policies to specific subnets.
  • Simplified Management: Easier to identify and troubleshoot issues in smaller, logical groups.

CIDR Reference

  • /32 1 IP
  • /30 4 IPs (2 usable)
  • /29 8 IPs (6 usable)
  • /24 (Class C) 256 IPs
  • /16 (Class B) 65,536 IPs
  • /8 (Class A) 16,777,216 IPs

Common Terms

Network Address
The first IP address of a subnet, used to identify the network itself.
Broadcast Address
The last IP address of a subnet, used to communicate with all hosts in that subnet.
Wildcard Mask
Inverse of the subnet mask, often used in ACLs (Access Control Lists). 0 bits matter, 1 bits don't.

Frequently Asked Questions

What is CIDR notation?

CIDR notation allows you to specify a network mask by simply adding a slash and the number of significant bits (e.g., /24) to the IP address. It replaced the older classful network design.

How do I calculate usable hosts?

The formula for usable hosts is 2^(32 - prefix) - 2. We subtract 2 to account for the Network Address (first IP) and the Broadcast Address (last IP), which are reserved.

What happens with /31 and /32 prefixes?

/32 represents a single IP address (host route). /31 is used for point-to-point links (like between routers) where network and broadcast addresses are used as host addresses to save space (RFC 3021).