| CIDR | Subnet Mask | Usable Hosts |
|---|---|---|
| /32 | 255.255.255.255 | 1 |
| /31 | 255.255.255.254 | 2 |
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /27 | 255.255.255.224 | 30 |
| /26 | 255.255.255.192 | 62 |
| /25 | 255.255.255.128 | 126 |
| /24 | 255.255.255.0 | 254 |
| /23 | 255.255.254.0 | 510 |
| /22 | 255.255.252.0 | 1022 |
| /21 | 255.255.248.0 | 2046 |
| /20 | 255.255.240.0 | 4094 |
| /16 | 255.255.0.0 | 65.534 |
| /8 | 255.0.0.0 | 16.777.214 |
IPv4 & IPv6 Subnet Calculator with Wildcard Mask
Enter an IP address and CIDR prefix length to instantly calculate network details including network address, broadcast address, host range, subnet mask, wildcard mask, and IP class. Includes a common subnet cheatsheet.
How to calculate a subnet
- Enter a network address in CIDR notation (for example, 192.168.1.0/24).
- The tool computes the netmask, network address, broadcast, host range and available host count.
- For IPv6, the output uses the correct /64 or subdivision notation automatically.
- Use the values directly in firewall rules, DHCP pools or VPN configurations.
Common use cases
- Planning a new office or VPN subnet without collisions with existing ranges.
- Calculating how many hosts fit in a /24 vs /25 before carving up a cloud VPC.
- Converting between CIDR and dotted-decimal netmask for legacy router configs.
- Teaching networking by walking through how changing the prefix length halves or doubles the host count.
Frequently asked questions
Why do /24 networks only have 254 hosts?
The first address is the network address, the last is the broadcast — both reserved. A /24 has 256 addresses total; 254 usable for hosts.
How small can an IPv4 subnet go?
/30 gives you 2 usable hosts (point-to-point links). /31 is a special two-host variant for router links without broadcast/network reservation. /32 is a single-host route.
Do IPv6 subnets follow the same rules?
IPv6 typically uses /64 for end networks (vast address space), and has no broadcast concept. Subnet planning in IPv6 is about hierarchical allocation, not packing hosts.
Is my input logged?
No. Calculations run entirely in your browser.
CIDR Notation, Subnet Mask & Wildcard Explained
CIDR (Classless Inter-Domain Routing) notation combines an IP address with a prefix length (e.g., 192.168.1.0/24). The prefix length indicates how many bits of the address identify the network, with the remaining bits available for host addresses.
- Network and broadcast address calculation
- First and last usable host
- Total usable hosts count
- Subnet mask and wildcard mask
- IP class detection (A/B/C/D/E)
- Private vs public address identification
- Binary representation
- Common subnet cheatsheet
Free. No signup. Browser tools (subnet, JWT, password strength) run locally; lookup tools query public APIs (Cloudflare DoH, RDAP, certificate logs). Full per-tool breakdown at /methodology/.
Sources (3)
- Fuller, V., & Li, T. (2006). Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan. RFC 4632, IETF.
- Postel, J. (1981). Internet Protocol. RFC 791, IETF.
- Hinden, R., & Deering, S. (2006). IP Version 6 Addressing Architecture. RFC 4291, IETF.
These are the IETF RFCs, NIST publications, and W3C standards the tool implements or queries. Locate them on the IETF Datatracker (datatracker.ietf.org) or the official standards body.