cidr mask calculator

Enter a valid IPv4 address. You can include CIDR here (like 10.0.0.5/16).
Range: 0 to 32
CIDR Calculation Results
IP Address-
Address Type-
CIDR Notation-
Subnet Mask-
Wildcard Mask-
Binary Mask-
Network Address-
Broadcast Address-
First Usable Host-
Last Usable Host-
Total Addresses-
Usable Hosts-
Note: For /31 networks, this calculator treats both addresses as usable (RFC 3021 point-to-point behavior).

What Is CIDR and Why It Matters

CIDR stands for Classless Inter-Domain Routing. It replaced the older class-based IPv4 system and gave network engineers a much more flexible way to divide address space. Instead of being limited to fixed class boundaries (like Class A, B, and C), CIDR allows any prefix length from /0 through /32.

In practical terms, CIDR lets you create right-sized networks. Need about 60 hosts? A /26 can do it. Need only 2 addresses for a point-to-point link? A /31 is perfect. This flexibility helps reduce waste and keeps address plans cleaner.

How to Use This CIDR Mask Calculator

Step-by-step

  • Enter an IPv4 address (for example: 192.168.10.25).
  • Enter the CIDR prefix length (for example: 27).
  • Click Calculate.

You can also enter combined notation in one field, such as 10.20.30.40/22. The tool will parse it automatically.

What the Results Mean

Subnet Mask

The subnet mask is the dotted-decimal form of your prefix. For example, /24 equals 255.255.255.0.

Wildcard Mask

The wildcard mask is the inverse of the subnet mask. It is commonly used in ACLs and routing policies. For /24, the wildcard is 0.0.0.255.

Network and Broadcast

The network address is the first address in the subnet; the broadcast address is the last. Traditional host ranges sit between those two addresses.

Usable Hosts

Usable host count is typically:

  • 2^(host bits) - 2 for most subnets
  • Special handling for /31 and /32

Quick CIDR Reference

  • /8 → 255.0.0.0 → 16,777,216 total addresses
  • /16 → 255.255.0.0 → 65,536 total addresses
  • /24 → 255.255.255.0 → 256 total addresses
  • /25 → 255.255.255.128 → 128 total addresses
  • /26 → 255.255.255.192 → 64 total addresses
  • /27 → 255.255.255.224 → 32 total addresses
  • /28 → 255.255.255.240 → 16 total addresses
  • /29 → 255.255.255.248 → 8 total addresses
  • /30 → 255.255.255.252 → 4 total addresses
  • /31 → 255.255.255.254 → 2 total addresses
  • /32 → 255.255.255.255 → 1 total address

Common Planning Mistakes

  • Forgetting growth: if you need 50 hosts today, /26 gives room. /27 does not.
  • Confusing total vs usable: a /24 has 256 total, but normally 254 usable hosts.
  • Ignoring boundaries: subnet increments matter (for /27, blocks increment by 32).
  • Mixing masks incorrectly: route summarization only works when boundaries line up.

Worked Example

Suppose you enter 192.168.10.25 with prefix /27.

  • Subnet mask: 255.255.255.224
  • Block size in last octet: 32
  • Network range containing .25 is .0 to .31
  • Network address: 192.168.10.0
  • Broadcast address: 192.168.10.31
  • Usable hosts: 192.168.10.1 to 192.168.10.30

Final Thoughts

A fast CIDR calculator is one of the best tools for network design, troubleshooting, and certification study. Use it to validate subnetting decisions, check host capacity, and verify network/broadcast boundaries before deploying changes.

🔗 Related Calculators