cidr calculator ipv4

IPv4 CIDR Calculator

Quickly calculate subnet mask, network address, broadcast address, and usable host range from an IPv4 CIDR block.

Or enter the IP address and prefix separately:

What Is CIDR in IPv4?

CIDR stands for Classless Inter-Domain Routing. In plain language, CIDR is a smarter way to define how much of an IPv4 address is the network part and how much is the host part. Instead of only using old class-based networks (Class A, B, C), CIDR uses a slash notation like /24, /27, or /30.

A CIDR block is written like this: IP_ADDRESS/PREFIX. For example, 10.0.5.20/16. The prefix (/16) says that the first 16 bits are network bits. The rest are host bits.

Why a CIDR Calculator Is Useful

A subnet calculator saves time and prevents mistakes when planning or troubleshooting networks. With one input, you can get:

  • Subnet mask (for example, /24 = 255.255.255.0)
  • Wildcard mask (commonly used in ACLs)
  • Network address
  • Broadcast address
  • First and last usable host
  • Total addresses and usable host count

This is especially helpful for network engineers, sysadmins, cloud architects, and anyone building VLANs, VPC subnets, VPN routes, firewall rules, or DHCP scopes.

How to Read Common IPv4 Prefixes

Quick Reference

  • /8 → 255.0.0.0 (very large network)
  • /16 → 255.255.0.0
  • /24 → 255.255.255.0 (very common LAN subnet)
  • /27 → 255.255.255.224 (32 addresses total)
  • /30 → 255.255.255.252 (4 addresses total, often point-to-point)
  • /31 → 2 addresses (often used for point-to-point links under RFC 3021)
  • /32 → single host route

Understanding Calculator Results

Network Address

The network address is the first address in the subnet. It identifies the subnet itself and is not assigned to regular hosts.

Broadcast Address

The broadcast address is the last address in the subnet. It is used to send traffic to all hosts in that subnet (except special cases like /31 and /32 usage).

Usable Host Range

For most subnets (/30 and larger networks), usable hosts are between network+1 and broadcast-1. For /31, both addresses can be used on point-to-point links. For /32, there is one exact host.

Practical Examples

Example 1: 192.168.10.50/24

Subnet mask: 255.255.255.0. Network: 192.168.10.0. Broadcast: 192.168.10.255. Usable hosts: 192.168.10.1 through 192.168.10.254.

Example 2: 172.16.4.130/26

/26 means 64 total addresses per subnet. This address belongs to the subnet 172.16.4.128/26. Broadcast is 172.16.4.191, with usable range 172.16.4.129 to 172.16.4.190.

Example 3: 10.0.0.9/30

/30 creates blocks of 4 addresses. The subnet is 10.0.0.8/30, usable hosts are 10.0.0.9 and 10.0.0.10, and broadcast is 10.0.0.11.

Subnetting Tips for Cleaner Network Design

  • Start with requirements: how many hosts per segment now and in 12-24 months.
  • Choose prefixes that leave room for growth without wasting too many addresses.
  • Keep subnet sizes consistent where possible for easier operations.
  • Document network, gateway, DHCP pool, and reserved addresses for each subnet.
  • Use private IPv4 ranges wisely: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

Frequently Asked Questions

Is CIDR only for routers?

No. CIDR is used everywhere: servers, firewalls, cloud networking, load balancers, and endpoint routing tables.

What is the difference between CIDR and subnet mask?

They express the same concept in different formats. For example, /24 is the same as 255.255.255.0.

Can this help with firewall ACLs?

Yes. The wildcard mask result is often used in ACL syntax (especially on some network platforms).

Final Thoughts

If you work with IPv4, a reliable CIDR calculator is one of the fastest ways to reduce errors and speed up planning. Use the tool above whenever you need to quickly validate subnet details, host ranges, masks, and routing boundaries.

🔗 Related Calculators