Need to split up a network or figure out how many devices your subnet can handle? Just enter an IP address and subnet mask (or CIDR like /24), and our free IP subnet calculator shows you the network address, broadcast address, usable host range, and total hosts. Perfect for network admins, CCNA students, and anyone setting up a network.
Below is a table providing typical subnets for IPv4.
| Prefix size | Network mask | Usable hosts per subnet |
|---|---|---|
| /1 | 128.0.0.0 | 2,147,483,646 |
| /2 | 192.0.0.0 | 1,073,741,822 |
| /3 | 224.0.0.0 | 536,870,910 |
| /4 | 240.0.0.0 | 268,435,454 |
| /5 | 248.0.0.0 | 134,217,726 |
| /6 | 252.0.0.0 | 67,108,862 |
| /7(Class A) | 254.0.0.0 | 33,554,430 |
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15(Class B) | 255.254.0.0 | 131,070 |
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23(Class C) | 255.255.254.0 | 510 |
| /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 |
| /31 | 255.255.255.254 | 0 |
| /32 | 255.255.255.255 | 0 |
Class boundaries highlighted for reference — most modern networks use CIDR notation instead
A subnet is just a smaller network inside a bigger network. When you have a bunch of devices — computers, phones, printers, smart TVs — they all need to be on the same network to talk to each other. But sometimes you don't want them all in one big group. Maybe you want your office computers separate from your guest Wi-Fi. That's subnetting.
Your IP address has two parts: the network part and the host part. The subnet mask tells you which part is which. It's like a secret code that says "these bits are for the network, and these bits are for the devices."
Using our calculator is super straightforward. Here's what you do:
Type in your IP address (like 192.168.1.0)
Enter your subnet mask (like 255.255.255.0) or use CIDR notation (like /24)
Hit calculate
Boom. You'll get your network address, broadcast address, usable host range, and the total number of hosts available.
Router IP: 192.168.1.1 with /24 mask. Results: Network: 192.168.1.0 | Broadcast: 192.168.1.255 | Usable: 192.168.1.1 to 192.168.1.254 | Total: 254 hosts. You can't use .0 (network address) or .255 (broadcast address).
30 computers, 5 printers, and guest Wi-Fi. Create two subnets: employees (192.168.1.0/27 — 30 usable addresses) and guests (192.168.2.0/27 — 30 usable). Guests can't access internal files. Problem solved.
Subnetting is a huge part of networking certifications. You'll need to calculate subnets manually. Our calculator is great for checking your work, but practice doing it by hand too.
Put smart bulbs and thermostats on a separate subnet from your computers. If a cheap smart plug gets hacked, your important devices stay safe.
Here's the formula you need to know:
Usable hosts = 2^(host bits) - 2
Why -2? You lose one for the network address and one for the broadcast.
/24 Example (255.255.255.0)
/27 Example (255.255.255.224)
See? Not so scary. Each time you borrow a host bit for the network, you cut available hosts in half.
Forgetting About the -2
This is the #1 mistake. People see 256 addresses and think they can use all of them. Nope. You lose the first and last one every time — network and broadcast.
Using the Wrong Subnet Mask
A /24 when you only need 10 devices wastes addresses. A /30 when you need 50 devices means nothing works. Always calculate your needs first.
Confusing Network and Broadcast Addresses
The network address is the first in the range. The broadcast is the last. They're different things, and neither can be assigned to a device.
Here's a quick reference for common subnet masks:
| CIDR | Subnet Mask | Usable Hosts |
|---|---|---|
| /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 |
Pro tip: A /30 is perfect for point-to-point connections between two routers — exactly 2 usable addresses.
Back in the old days, IP addresses were divided into classes. Class A had huge networks (16 million hosts), Class B had medium (65,000 hosts), Class C had small (254 hosts). But this system was super wasteful — giving a company a Class A when they had 100 computers wasted millions of addresses.
That's why we use CIDR (Classless Inter-Domain Routing) now. It lets you create subnets of any size, not just the old classes. Way more efficient.
VLSM (Variable Length Subnet Masking)
Use different subnet masks in different parts of your network. A /24 for your main office and a /30 for a connection to another building. Way more efficient than one mask everywhere.
Supernetting
The opposite of subnetting. Instead of breaking a network into smaller pieces, combine several small networks into one big one. Useful for simplifying routing tables.
Most subnet calculators just spit out numbers without explaining what they mean. Ours gives you the context you need. Plus, it's completely free and works on any device. No ads, no sign-ups, no nonsense.
Whether you're a networking pro or just starting out, our IP subnet calculator has your back. Try it with your own IP address and see what you discover.
The first address is the network address — it identifies the entire network. The last is the broadcast address — it sends data to every device at once. Neither can be assigned to a device. Think of it like a mailing address: you can't mail something to "the whole street."
Take the number of host bits, raise 2 to that power, then subtract 2. For a /24 with 8 host bits: 2^8 = 256, 256 - 2 = 254 usable hosts. The -2 accounts for network and broadcast addresses.
Two ways of saying the same thing. Subnet mask = 255.255.255.0. CIDR = /24. The /24 means the first 24 bits are for the network. Both tell you where network ends and host begins.
It's always the last address in the subnet range. Network 192.168.1.0 with /24 mask → broadcast is 192.168.1.255. All host bits are set to 1.
Devices with different masks might not communicate. Mask too big = wasted IPs. Mask too small = not enough addresses. Worst case, your network just won't work properly.
Yes, but you'll need to reconfigure every device. It's easier to plan ahead and get it right the first time. Use our calculator before you start.
A /30 subnet gives exactly 2 usable hosts — the smallest practical subnet. A /31 is technically possible but needs special config. Stick with /30 as your minimum.
Borrow bits from the host portion. Borrow 1 bit → 2 subnets of /25. Borrow 2 bits → 4 subnets of /26. Each borrowed bit halves the hosts per subnet.
You probably forgot to subtract the network and broadcast addresses. Or you're using the wrong subnet mask. Remember the -2 rule.
No, IPv6 works differently. IPv6 has 128 bits (vs 32 for IPv4) so subnetting is simpler. First 64 bits are usually the network prefix, last 64 for host. No worries about running out.
Start with simple /24 networks. Practice decimal-to-binary conversion. Use our calculator to check, but try manually first. There are tons of free subnetting practice sites.
Private IPs (192.168.x.x, 10.x.x.x, 172.16.x.x) are for internal networks. Public IPs are for the internet. Subnetting works the same for both, but you can't use private IPs on the public internet.
IP Address Converter
Convert between IP address formats and notations.
Binary to Decimal Converter
Convert between binary, decimal, and hex numbers.
Network Bandwidth Calculator
Calculate data transfer speeds and bandwidth needs.
Data Transfer Time Calculator
Estimate how long downloads and uploads will take.