CIDR & Netmask Calculator
Enter either a CIDR block (like 192.168.1.10/24) or an IP address + prefix length.
What is a CIDR netmask calculator?
A CIDR netmask calculator helps you convert and understand IPv4 subnet information. It takes an IP address and a CIDR prefix (like /24) and returns critical networking details such as the subnet mask, network address, broadcast address, and host range.
If you work in IT, cloud infrastructure, DevOps, cybersecurity, or home lab networking, this is one of the fastest ways to avoid subnetting mistakes.
Why CIDR exists
CIDR stands for Classless Inter-Domain Routing. Before CIDR, IP allocation followed rigid class-based ranges (Class A, B, C). That model wasted addresses and made route aggregation harder. CIDR solved this by allowing flexible prefix lengths.
- /8 means the first 8 bits are network bits.
- /16 means the first 16 bits are network bits.
- /24 means the first 24 bits are network bits.
- /30, /31, and /32 are often used for point-to-point links and single-host routes.
How this calculator works
Input methods
You can use either format:
- CIDR notation: 192.168.50.19/27
- Split input: IP = 192.168.50.19 and Prefix = 27
Outputs provided
- Subnet mask (dotted decimal and binary)
- Wildcard mask (inverse mask)
- Network address
- Broadcast address
- Host range
- Total addresses and usable hosts
Understanding each field
Network address
This is the first address in the subnet. It identifies the subnet itself and is not normally assignable to a host.
Broadcast address
This is the last address in the subnet and is used to send traffic to all hosts in that subnet (except in modern /31 behavior where broadcast is treated differently).
Subnet mask
The subnet mask translates the CIDR prefix into dotted decimal form, such as:
- /24 → 255.255.255.0
- /25 → 255.255.255.128
- /26 → 255.255.255.192
- /27 → 255.255.255.224
Wildcard mask
The wildcard mask is the inverse of the subnet mask, frequently used in ACLs. For example, if the mask is 255.255.255.0, the wildcard is 0.0.0.255.
Practical subnetting examples
Example 1: Small office VLAN
Need up to 30 devices? A /27 gives 32 total addresses and 30 usable host addresses. Perfect for a small segment.
Example 2: Point-to-point WAN link
A /30 gives 4 total addresses with 2 usable hosts. Traditionally used for router-to-router links.
Example 3: Cloud route to one host
A /32 identifies exactly one address and is common in firewall rules, BGP advertisements, and host routes.
Common mistakes to avoid
- Mixing up network address and first usable host.
- Assuming all prefixes reserve broadcast in the same way (/31 is special per RFC 3021).
- Using the wrong subnet when planning DHCP pools.
- Forgetting route summarization opportunities (supernetting).
Quick CIDR cheat list
- /24 → 256 total, 254 usable
- /25 → 128 total, 126 usable
- /26 → 64 total, 62 usable
- /27 → 32 total, 30 usable
- /28 → 16 total, 14 usable
- /29 → 8 total, 6 usable
- /30 → 4 total, 2 usable
- /31 → 2 total, 2 usable (point-to-point)
- /32 → 1 total, 1 usable
Final thoughts
A solid grasp of CIDR and netmasks saves time and prevents outages. Use this calculator to validate your subnet plans quickly before deploying firewall rules, VLANs, cloud VPC subnets, or static routes.