IPv4 IP to CIDR Calculator
Enter an IPv4 address and subnet mask (either dotted decimal like 255.255.255.0 or prefix like /24) to get complete subnet details.
What this IP to CIDR calculator does
An IP to CIDR calculator converts a host IP address and subnet mask into CIDR notation and key subnet values. In practical terms, that means it tells you your network block, broadcast address, usable host range, and total number of addresses in the subnet.
This is useful for system administrators, cloud engineers, students learning networking, and anyone setting up routers, firewalls, VLANs, or VPNs.
Quick refresher: what is CIDR?
CIDR stands for Classless Inter-Domain Routing. It replaces old class-based addressing with a more flexible format:
- Network address/prefix length (for example, 192.168.1.0/24)
- The number after the slash indicates how many bits define the network portion.
- The remaining bits are available for hosts.
How to use this calculator
Step 1: Enter an IP address
Use a valid IPv4 address such as 10.0.15.23 or 172.16.4.200.
Step 2: Enter a subnet mask
You can enter subnet information in either format:
- Dotted decimal mask: 255.255.252.0
- CIDR prefix: /22 or 22
Step 3: Click Calculate
The tool will display:
- CIDR block
- Network address
- Broadcast address
- Usable host range
- Total and usable host counts
- Wildcard mask and binary forms
Common subnet sizes
| CIDR | Subnet Mask | Total Addresses | Typical Usable Hosts |
|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /24 | 255.255.255.0 | 256 | 254 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
Why IP to CIDR conversion matters
Using the right CIDR block improves network design and avoids waste. It helps you:
- Allocate address space efficiently in cloud VPCs and on-prem networks
- Write accurate firewall and routing rules
- Avoid subnet overlap in multi-site environments
- Troubleshoot connectivity issues faster
Frequently asked questions
Can I enter just the prefix length?
Yes. Enter /24 or 24 in the subnet mask field.
What happens with /31 and /32?
/31 is commonly used for point-to-point links and can represent two usable endpoints. /32 is a single-host route.
Does this calculator support IPv6?
No, this version is focused on IPv4. The same CIDR concept exists in IPv6 but with different address length and conventions.