Subnet Calculator
Calculate network address, broadcast address, usable host range, and subnet mask from any CIDR notation. Free, instant, no sign-up.
IP & CIDR
Network
192.168.1.0/24
256
Total IPs
254
Usable Hosts
192.168.1.1
First Host
192.168.1.254
Last Host
Details
Binary
Split Into Subnets
Rounded up to 4 subnets of /26 each (64 addresses per subnet).
| # | Network | Usable Range |
|---|---|---|
| 1 | 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 |
| 2 | 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 |
| 3 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 |
| 4 | 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 |
100% client-side — nothing you enter here is sent to a server.
CIDR Quick-Reference Chart
Every common prefix from /8 to /32, with its subnet mask and host counts.
| CIDR | Subnet Mask | Total IPs | Usable Hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
Support Our Free Tools
If you find this calculator helpful, please consider supporting our work. Your contribution helps us build and maintain these free tools for everyone.
Buy me a coffeeFree IP Subnet & CIDR Calculator
Subnetting math is simple in theory — it's all binary AND/OR operations — but easy to get wrong by hand, especially with edge cases like /31 point-to-point links or /32 host routes. This calculator handles the full range from /0 to /32 correctly, converts between CIDR prefix and dotted-decimal subnet mask in either direction, and works out the network address, broadcast address, and usable host range instantly.
How Subnet Calculations Work
🌐 Network Address
The IP address with every host bit set to 0 — found by ANDing the IP address with the subnet mask.
📡 Broadcast Address
The IP address with every host bit set to 1 — found by ORing the network address with the wildcard mask (the inverted subnet mask).
👥 Usable Hosts
Every address in the range except the network and broadcast addresses — calculated as 2^(host bits) − 2 for most subnets.
🔀 CIDR Prefix
The number of leading 1 bits in the subnet mask — a /24 mask (255.255.255.0) has 24 leading 1 bits, leaving 8 bits for hosts.
Special Cases: /31 and /32
Most subnets reserve their first address (network) and last address (broadcast), leaving the rest usable. Two prefixes break that pattern: a /32 identifies exactly one host with no network or broadcast concept at all, and a /31, defined by RFC 3021, is used almost exclusively for point-to-point links — both of its two addresses are usable, since there's no need for a broadcast address on a link with only two endpoints. This calculator applies those rules automatically rather than always subtracting two hosts.
Frequently Asked Questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation combines an IP address with a slash and a number, like 192.168.1.0/24, where the number is how many leading bits of the address are the fixed network portion — the rest identify hosts within that network.
How do I calculate the number of usable hosts in a subnet?
Usable hosts is 2^(32 − prefix length) − 2 for most subnets, since the first address is reserved as the network address and the last as the broadcast address. A /24 has 2^8 − 2 = 254 usable hosts. /31 and /32 are special cases with their own rules.
What's different about a /31 or /32 subnet?
A /32 identifies a single host with no network or broadcast concept. A /31, per RFC 3021, is used for point-to-point links and has no reserved network or broadcast address — both of its two addresses are usable.
How is the broadcast address calculated?
The broadcast address is the network address with every host bit set to 1 — equivalent to the network address OR'd with the wildcard mask (the inverse of the subnet mask).
What's the difference between a public and private IP address?
Private IP addresses (like 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) are reserved for use inside local networks and aren't routable on the public internet. Any address outside those reserved ranges (and outside loopback and link-local ranges) is considered a public, internet-routable address.
Explore More Free Developer Tools
The Subnet Calculator is part of Texterfly's growing collection of free developer tools — no sign-up, nothing uploaded to a server.
Explore All Tools
134 free tools — no signup required
All 134 tools are free · No signup · No ads
