This subnet calculator helps you convert an IPv4 address and CIDR prefix into the subnet details you actually need for network planning. Enter an IP address and a CIDR prefix (0–32) to instantly calculate the subnet mask, wildcard mask, network address, broadcast address, usable host range, and total/usable host counts.
It’s useful for planning VLANs, splitting networks, allocating IP space, and troubleshooting routing or firewall rules. If you’re learning subnetting, the binary view and the “block size” method make it easier to understand how network and host bits work.
Calculate IP Subnet
What this subnet calculator returns
- Network address
- Broadcast address (typical subnets)
- Usable IP range (first/last host)
- Total usable hosts (with /31 and /32 edge-case rules)
- Subnet mask (dotted-decimal)
- Wildcard mask
- Binary representation (IP, mask, network, broadcast)
Subnet calculator examples
Example 1: /24 network
- Input: 192.168.1.10/24
- Subnet mask: 255.255.255.0
- Network: 192.168.1.0
- Broadcast: 192.168.1.255
- Usable range: 192.168.1.1 – 192.168.1.254
- Usable hosts: 254
Example 2: /30 network
- Input: 10.0.0.5/30
- Subnet mask: 255.255.255.252
- Network: 10.0.0.4
- Broadcast: 10.0.0.7
- Usable range: 10.0.0.5 – 10.0.0.6
- Usable hosts: 2
Example 3: /31 point-to-point
- Input: 203.0.113.10/31
- Usable hosts: 2 (RFC 3021 point-to-point)
Quick subnetting guide (fast mental math)
- Find the subnet mask from the CIDR prefix
- Identify the “interesting octet”
- Block size = 256 − mask_octet
- Network ranges increment by block size
- Network = start of block, broadcast = end of block
| CIDR | Subnet mask |
|---|---|
| /24 | 255.255.255.0 |
| /25 | 255.255.255.128 |
| /26 | 255.255.255.192 |
| /27 | 255.255.255.224 |
| /28 | 255.255.255.240 |
| /29 | 255.255.255.248 |
| /30 | 255.255.255.252 |
| /31 | 255.255.255.254 |
| /32 | 255.255.255.255 |
CIDR edge cases
- /32 = a single IP (host route)
- /31 = point-to-point links (often treated as 2 usable addresses, no dedicated broadcast in practice)
- /0 = the entire IPv4 internet
- Very small subnets aren’t “wrong”, but usable-host logic changes
Common questions
How do I convert CIDR to a subnet mask?
CIDR /N means the first N bits are network bits. Common examples: /24 = 255.255.255.0, /30 = 255.255.255.252, /32 = 255.255.255.255.
How do I calculate the usable IP range?
For typical subnets (/0–/30), usable range is network+1 to broadcast-1. For /31 and /32, usable-host rules differ (point-to-point and host routes).
What is block size in subnetting?
Block size is 256 minus the subnet mask value in the “interesting octet”. Network ranges increment by that block size (e.g., /26 → 255.255.255.192 → block size 64).
Why does /31 sometimes have 2 usable IPs?
RFC 3021 allows /31 for point-to-point links. Both addresses are used as endpoints (no dedicated broadcast in practice).
What does /32 mean?
A /32 represents a single IP (host route). Network, broadcast, and usable range collapse to one address.
What is a wildcard mask and when is it used?
A wildcard mask is the inverse of a subnet mask. It’s commonly used in ACLs to match ranges of IP addresses.
What is the difference between public and private IP ranges?
Private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are used internally and aren’t routable on the public internet. Public IPs are globally routable.
How do I know if an IP is inside a subnet?
An IP is inside a subnet if (IP AND mask) equals the subnet’s network address. This calculator shows the network address so you can verify quickly.
What is a broadcast address?
In typical IPv4 subnets, the broadcast address is the last address in the subnet and can be used to reach all hosts. Some edge cases like /31 behave differently.
Does this tool support IPv6 subnetting?
This page focuses on IPv4. IPv6 subnetting uses /64 and other prefixes with different conventions.
Related tools
- WHOIS Lookup — IP/ASN ownership context
- DNS Records Lookup — verify DNS before network changes
- Reverse DNS Lookup — PTR checks for mail and infra
- IPv6 Ping — test IPv6 connectivity