cidr block calculator

IPv4 CIDR Block Calculator

Enter an IPv4 CIDR notation like 192.168.10.34/27 to calculate network details instantly.

What Is a CIDR Block?

CIDR stands for Classless Inter-Domain Routing. It is the modern method used to define IP network ranges. A CIDR block combines an IPv4 address and a prefix length, such as 172.16.4.19/22. The number after the slash tells you how many bits belong to the network portion.

In practical terms, CIDR notation helps you answer key networking questions quickly: Which addresses are in this subnet? What is the network address? What is the broadcast address? How many hosts can I assign?

How to Use This CIDR Block Calculator

  • Type a valid IPv4 CIDR block in the calculator (for example, 192.168.1.130/25).
  • Click Calculate or press Enter.
  • Review network address, broadcast address, usable host range, subnet mask, wildcard mask, and host count.
  • Use Reset to clear the form and start over.

Understanding the Output

Network Address

The network address is the first address in the subnet. It identifies the subnet itself, not an individual host. Routers and ACL tools use this value for route matching and policy definitions.

Broadcast Address

The broadcast address is the last address in most IPv4 subnets. Sending traffic to this address reaches all hosts in the subnet (except in special point-to-point cases).

First and Last Usable Host

For typical subnets (like /24, /26, /20), usable hosts sit between network and broadcast addresses. For /31, both addresses are usable on point-to-point links. For /32, it represents a single host route.

Quick CIDR Reference

  • /8 → 16,777,216 total addresses
  • /16 → 65,536 total addresses
  • /24 → 256 total addresses (254 usable in standard host subnetting)
  • /25 → 128 total addresses
  • /26 → 64 total addresses
  • /27 → 32 total addresses
  • /28 → 16 total addresses
  • /29 → 8 total addresses
  • /30 → 4 total addresses
  • /31 → 2 total addresses (point-to-point)
  • /32 → 1 total address (single host)

Why CIDR Calculations Matter

Accurate subnet math is essential in cloud networking, data centers, VPN design, firewall rules, and load balancer configuration. A small mistake in prefix length can expose services, break routing, or waste address space.

Whether you are planning VPC subnets in AWS, VNets in Azure, on-prem VLAN segments, or Kubernetes node networks, a reliable CIDR calculator saves time and reduces configuration errors.

Common CIDR Mistakes to Avoid

  • Using host bits as if they were network bits (for example treating any IP in the subnet as the network base).
  • Forgetting special behavior of /31 and /32 networks.
  • Confusing subnet mask and wildcard mask.
  • Assuming every subnet has exactly two unusable addresses without considering context.
  • Overlapping CIDR blocks in route tables, security groups, or firewall objects.

Practical Example

Input: 10.12.34.99/20

A /20 mask means the first 20 bits are network bits. That creates blocks of 16 in the third octet. Since 34 falls in the 32–47 range, the network starts at 10.12.32.0 and ends at 10.12.47.255. Usable hosts are 10.12.32.1 through 10.12.47.254.

Final Thoughts

CIDR is one of the most foundational concepts in modern IP networking. Mastering it helps with architecture design, troubleshooting, and automation. Use the calculator above for quick, accurate subnet details whenever you need to validate an address range before deployment.

🔗 Related Calculators