What Is a Subnet / CIDR Calculator?
A Subnet (CIDR) Calculator divides an IPv4 address space using a prefix length from /0 to /32 to compute the exact network ID, broadcast address, subnet mask, wildcard mask (for ACLs/OSPF), first and last usable host IP, and usable host capacity. Calculations run 100% locally in your browser with instant updates.
- Execution Mode
- 100% client-side browser math — instant, zero latency
- CIDR Range
- Full /0 through /32 support including RFC 3021 /31 point-to-point
- Dual Utility
- CIDR Subnet Calculator + IP Start–End Range to CIDR Converter
- Outputs
- Network, Broadcast, Mask, Wildcard, Usable IPs & Binary notation
Common IPv4 CIDR Prefix Cheat Sheet
| CIDR | Subnet Mask | Usable Hosts / Typical Use |
|---|---|---|
| /24 | 255.255.255.0 | 254 usable hosts — standard office LAN or VPC subnet |
| /25 | 255.255.255.128 | 126 usable hosts — half Class-C VLAN segmentation |
| /26 | 255.255.255.192 | 62 usable hosts — small cloud microservice subnet |
| /28 | 255.255.255.240 | 14 usable hosts — firewall DMZ or NAT gateway block |
| /30 | 255.255.255.252 | 2 usable hosts — classic router-to-router link |
| /32 | 255.255.255.255 | 1 host — single-IP firewall rule or loopback route |
How to Calculate Subnets & Convert IP Ranges
-
1 Enter an IPv4 address & CIDR prefix
Type an IP such as 192.168.10.42 and choose a prefix length (/0 to /32) or paste 10.0.0.0/22 directly.
-
2 Read network, broadcast & usable range
Copy the network address, subnet mask, wildcard mask, binary mask, and usable host count immediately.
-
3 Convert arbitrary IP ranges to CIDR
Use the IP Range to CIDR tab to turn any start/end IPv4 span into the minimal set of firewall-ready CIDR blocks.
Frequently Asked Questions
How many usable IPs are in a /24 subnet?
A /24 subnet has 256 total IPv4 addresses (2^8): 1 network address, 1 broadcast address, and 254 usable host addresses.
What is a wildcard mask used for?
A wildcard mask is the bitwise inverse of the subnet mask (e.g. 0.0.0.255 for /24) used in Cisco IOS access control lists (ACLs) and OSPF network statements.
How does a /31 subnet work?
Per RFC 3021, /31 subnets are reserved for point-to-point router links with 2 usable peer addresses and no separate network or broadcast address.
Is any IP data sent to a server when I use this calculator?
No. All subnet and CIDR range calculations execute locally inside your browser using JavaScript bitwise arithmetic.