Subnetting is the practice of dividing one large IP network into smaller, self-contained networks called subnets. In plain terms, you start with one address block and split it into organized sections so devices are easier to manage, secure, and route.
If you want the math done for you, the Subnet Calculator returns ranges and host counts instantly. This guide focuses on the logic behind the result so you can read a subnet table and know why it works.
Why Subnetting Exists
Imagine an office with one flat network of thousands of devices. Traffic from every machine reaches every other machine, broadcasts travel farther than they need to, and one mistake can spill into the whole environment.
Subnetting fixes that by grouping devices logically. You might place staff laptops on one subnet, printers on another, servers on a third, and guest Wi-Fi on a fourth. That separation makes day-to-day administration much easier.
The benefits are practical:
- Less broadcast traffic on each segment
- Clearer security boundaries between groups
- More efficient use of a limited address pool
- Simpler troubleshooting when something breaks
- More predictable growth when a team or location expands
That last point matters more than beginners often expect. When you size a subnet well, you leave enough room for real devices without turning every network into one oversized bucket. Good subnetting is not abstract theory. It is basic housekeeping for any network that needs order.
Core Terms to Know
A few terms make the rest of the topic much easier:
- IP address. A device's address, written as four numbers like 192.168.1.10.
- Network portion. The leading bits that identify which network an address belongs to.
- Host portion. The trailing bits that identify a specific device within that network.
- Subnet mask. A pattern that marks where the network portion ends and the host portion begins.
One more idea helps tie those terms together. An IPv4 address has 32 bits total. Subnetting is really a question of where you draw the dividing line inside those 32 bits. More bits on the network side create more subnets. More bits on the host side create larger subnets with more usable device addresses.
You do not need to think in binary for every problem, but it helps to remember that every CIDR prefix is just a count of network bits. Once that clicks, masks, ranges, and host counts stop feeling like separate topics.
CIDR Basics
Modern networking uses CIDR notation, which writes a slash followed by a number, such as 192.168.1.0/24. That number tells you how many bits belong to the network portion.
- A larger number like /28 means more network bits and fewer hosts per subnet.
- A smaller number like /16 means fewer network bits and many more hosts.
Common values are easy to memorize once you see the pattern:
- /24 = mask 255.255.255.0 = 256 total addresses = 254 usable hosts
- /25 = mask 255.255.255.128 = 128 total addresses = 126 usable hosts
- /26 = mask 255.255.255.192 = 64 total addresses = 62 usable hosts
- /27 = mask 255.255.255.224 = 32 total addresses = 30 usable hosts
Why do these usable counts drop so quickly? Every time you increase the prefix by 1, you cut the host space in half. A /24 gives you 8 host bits. A /25 gives you 7. A /26 gives you 6. Because host counts are powers of 2, a small prefix change can make a big planning difference.
The CIDR Calculator converts any prefix into its mask and address range so you do not need to memorize every combination. Still, knowing the pattern helps you catch obvious mistakes fast.
Worked Examples
Example 1: How many hosts in a /24?
A /24 leaves 8 bits for hosts. The formula is 2 to the power of host bits, minus 2:
2^8 = 256, then 256 - 2 = 254 usable hosts.
You subtract 2 because the first address is the network identifier and the last is the broadcast address. In a /24 that means 192.168.1.0 names the subnet itself, while 192.168.1.255 reaches every host on that subnet.
If you were assigning addresses by hand, the usable range would usually start at .1 and end at .254. That simple pattern is why /24 networks feel friendly to beginners. The boundary lands cleanly on the last octet, so the usable range is easy to see.
Example 2: Splitting a /24 into smaller subnets
Suppose you need four subnets from 192.168.1.0/24. Borrowing 2 host bits creates four /26 subnets:
- 192.168.1.0/26 with hosts .1 to .62
- 192.168.1.64/26 with hosts .65 to .126
- 192.168.1.128/26 with hosts .129 to .190
- 192.168.1.192/26 with hosts .193 to .254
Each subnet holds 62 usable hosts. Notice the pattern in the network addresses: 0, 64, 128, 192. Those values move in steps of 64 because a /26 contains 64 total addresses. That step size is the fastest way to spot the next valid subnet boundary.
Here is the mental shortcut many admins use:
- Find the total block size from the prefix.
- Count forward by that block size.
- Treat each jump as the next subnet start.
- The usable hosts sit between the network address and the broadcast address.
If you want to see the bit boundary itself, the Binary Calculator makes the pattern visible, and the IP Address Calculator helps you break an address into its network and host parts.
Common Mistakes
Forgetting the network and broadcast addresses
New learners often count 2^8 as 256 usable hosts. Two addresses are reserved in a normal IPv4 subnet, so the real number is 254. Forgetting that detail causes off-by-two errors in planning.
Confusing the mask direction
A higher CIDR number means fewer hosts, not more. /28 is much smaller than /24 in host capacity even though 28 is the bigger number. The larger prefix means more bits have been claimed by the network side.
Mixing up subnets and IP ranges
Each subnet has a fixed starting address that aligns to its block size. You cannot start a /26 at an arbitrary address like 192.168.1.20. It must land on a multiple of 64 in the last octet for this example.
Over-subnetting
Creating tiny subnets everywhere wastes addresses on reserved entries and creates extra complexity for no real gain. Size subnets to realistic device counts plus some room to grow. A network that needs 45 devices probably does not need a /28 just because it technically fits today.
Putting It Together
Subnetting comes down to one repeated decision: where to draw the line between network bits and host bits. Once that idea feels natural, CIDR notation, masks, and host counts all follow from the same rule.
A practical workflow looks like this:
- Estimate how many devices each group actually needs.
- Pick a prefix that leaves enough usable hosts with some breathing room.
- Plan ranges with the Subnet Calculator.
- Convert prefixes and masks with the CIDR Calculator.
- Inspect individual addresses with the IP Address Calculator.
- Explore the Tech hub for related networking tools.
When you can read a prefix, estimate capacity, and recognize valid subnet boundaries, you already know the core of beginner subnetting. The rest is practice.
Once your networking basics are solid, How Generated Passwords Improve Account Security is a useful next read on another tech fundamental: keeping accounts hard to compromise.