How to use it
Enter an IP address
Type any IPv4 address, or paste a full CIDR like 192.168.1.10/24 — the prefix select updates automatically.
Pick a prefix length
Choose anything from /0 to /32. The matching dotted subnet mask is shown next to each prefix.
Read the results
Network, broadcast, first and last usable host, host count, wildcard mask and address class update live as you type.
Quick reference
Common prefix lengths, their dotted masks and the number of usable hosts (total addresses minus the network and broadcast addresses).
| Prefix | Subnet mask | Usable hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
About the subnet calculator
Subnetting splits an IP network into smaller ranges. The prefix length says how many leading bits identify the network; the remaining bits address hosts. This calculator does the binary maths for you and labels private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and loopback (127.0.0.0/8), which is handy for firewall rules, DHCP scopes, VPNs and exam prep.
Questions
Why is the usable host count "minus 2"?
In a normal subnet, the lowest address is the network address and the highest is the broadcast address. Neither can be assigned to a device, so a /24 has 256 addresses but only 254 usable hosts. The exceptions are /31 and /32.
What is a /31?
A /31 contains just two addresses and is used for point-to-point links between routers. RFC 3021 allows both addresses to be assigned to hosts — there is no separate network or broadcast address, so you get 2 usable hosts instead of 0.
CIDR vs class — what is the difference?
Classful addressing (A, B, C) fixed the mask by the first octet: class A was /8, class B /16, class C /24. CIDR replaced this in 1993 and lets any prefix length apply to any address, so classes are now only a historical label. This tool shows both.
Is anything uploaded?
No. All calculations run in your browser with plain JavaScript — no addresses ever leave your device.