There are two ways to approach a subnetting problem: start from how many subnets you need, or start from how many hosts each subnet needs to support. This guide covers the second approach, host-based subnetting, which flips the usual left-to-right bit-borrowing process on its head and starts from the right instead.
The Core Trade-Off
Subnetting always involves the same fundamental trade-off: borrowing more bits for the network portion increases the number of available subnets while reducing the number of hosts each subnet can support. A /16 network, for example, could be subnetted down to a /22 (64 subnets, 1,022 hosts each) or all the way to a /28 (4,096 subnets, only 14 hosts each), depending entirely on which side of that trade-off actually matters more for a given design, a decision that should always be driven by real requirements rather than an arbitrary default.
Prefix Length Reference Table
This table shows the relationship between prefix length, available subnets, and usable hosts, using a /16 base network as the reference point. The same relationship holds regardless of the starting prefix; only the absolute numbers shift.
| Prefix | Subnet Mask | Available Subnets | Usable Hosts per Subnet |
|---|---|---|---|
| /17 | 255.255.128.0 | 2¹ = 2 | 2¹⁵ − 2 = 32,766 |
| /18 | 255.255.192.0 | 2² = 4 | 2¹⁴ − 2 = 16,382 |
| /19 | 255.255.224.0 | 2³ = 8 | 2¹³ − 2 = 8,190 |
| /20 | 255.255.240.0 | 2⁴ = 16 | 2¹² − 2 = 4,094 |
| /21 | 255.255.248.0 | 2⁵ = 32 | 2¹¹ − 2 = 2,046 |
| /22 | 255.255.252.0 | 2⁶ = 64 | 2¹⁰ − 2 = 1,022 |
| /23 | 255.255.254.0 | 2⁷ = 128 | 2⁹ − 2 = 510 |
| /24 | 255.255.255.0 | 2⁸ = 256 | 2⁸ − 2 = 254 |
| /25 | 255.255.255.128 | 2⁹ = 512 | 2⁷ − 2 = 126 |
| /26 | 255.255.255.192 | 2¹⁰ = 1,024 | 2⁶ − 2 = 62 |
| /27 | 255.255.255.224 | 2¹¹ = 2,048 | 2⁵ − 2 = 30 |
| /28 | 255.255.255.240 | 2¹² = 4,096 | 2⁴ − 2 = 14 |
| /29 | 255.255.255.248 | 2¹³ = 8,192 | 2³ − 2 = 6 |
Notice the pattern running down this table: every step down adds exactly one more borrowed bit, doubling the subnet count while halving the usable host count, the same relationship that governs subnetting math no matter which starting prefix you begin from, a consistency worth relying on when sanity-checking any new calculation.

Host-Based vs. Network-Based Subnetting
Network-based subnetting starts with “how many subnets do I need?” and borrows bits from left to right in the host portion until that subnet count is reached. Host-based subnetting flips this entirely: it starts with “how many hosts does each subnet need to support?” and works from the right side of the host portion instead, since that’s where the bits that need to remain as host bits actually live.

A Complete Worked Example
Problem: You’ve been allocated 192.168.100.0 with the default mask 255.255.255.0 (/24), and each subnet needs to support 62 hosts.
Step 1: Find the required host bits. The usable host formula is 2^h − 2. Testing h = 6: 2⁶ − 2 = 62, an exact match for the requirement. So 6 host bits need to remain in the host portion, a value worth confirming by testing h = 5 as well (2⁵ − 2 = 30, too small) to see clearly why h = 6 is the correct minimum.
Step 2: Determine the new subnet mask. Starting from the default /24 mask, 11111111.11111111.11111111.00000000, the last octet needs exactly 6 bits left as host bits, meaning only the top 2 bits of that octet get borrowed for the network portion, a much smaller adjustment than the previous octet-level examples covered earlier in this guide:
Before: 255.255.255.0 = 11111111.11111111.11111111.00000000
After: 255.255.255.192 = 11111111.11111111.11111111.11000000
The new mask is 255.255.255.192, or /26.
Step 3: Find the increment. The increment is the value of the lowest borrowed bit converted to decimal. With 2 bits borrowed in the last octet, that’s 64 (the value of the second-lowest bit position in an octet, since the two borrowed bits together produce block sizes of 64 addresses each).
Step 4: Enumerate the subnets using that increment.
| Subnet | Network ID | Broadcast Address | Total Addresses |
|---|---|---|---|
| Net-0 | 192.168.100.0 | 192.168.100.63 | 64 |
| Net-1 | 192.168.100.64 | 192.168.100.127 | 64 |
| Net-2 | 192.168.100.128 | 192.168.100.191 | 64 |
| Net-3 | 192.168.100.192 | 192.168.100.255 | 64 |
Each subnet’s network address and broadcast address aren’t usable, leaving exactly 62 usable host addresses per subnet, precisely matching the original requirement.

Why This Differs From Network-Based Subnetting
The math underneath both approaches is identical, the same 2ⁿ subnets and 2^h − 2 hosts formulas apply either way, but the starting point and direction of reasoning differ. Network-based subnetting answers “how many pieces do I need?” and works out from there. Host-based subnetting answers “how big does each piece need to be?” and works backward to the mask that produces pieces of exactly that size. In practice, most real-world subnetting problems are phrased as one or the other, so recognizing which type of question you’re actually being asked is the first, and often most important, step.
A Second Worked Example: A Different Host Count
It helps to see the same process applied to a different requirement. Say the same 192.168.100.0/24 network instead needs to support 14 hosts per subnet.
Step 1: Test host bit values against 2^h − 2. h = 4 gives 2⁴ − 2 = 14, an exact match, so 4 host bits need to remain, meaning the remaining 4 bits of the last octet get borrowed for the network portion.
Step 2: With 4 host bits remaining out of 8 in the last octet, 4 bits get borrowed for the network portion: 11111111.11111111.11111111.11110000 = 255.255.255.240, a /28, converting the base network from its default /24 into a considerably more granular subnet size.
Step 3: The increment is 16, the value of the lowest borrowed bit, which sets the block size every subnet in this design shares.
Step 4: Enumerating subnets in increments of 16 gives Net-0 at 192.168.100.0/28 through 192.168.100.15, Net-1 at .16 through .31, and so on, all the way through Net-15 at .240 through .255, sixteen total subnets of 16 addresses each, exactly matching the /28’s 2⁴ = 16 subnet count from the reference table above, with each subnet supporting exactly 14 usable hosts once the network and broadcast addresses are excluded.
This same four-step process, find required host bits, determine the mask, find the increment, enumerate subnets, works identically regardless of the specific host count or starting network, which is exactly why it’s worth committing to memory as a repeatable procedure rather than something to work out from scratch each time. Practicing it against a handful of different host counts, as demonstrated across both worked examples in this guide, is what actually builds the fluency to apply it quickly under exam or real-world time pressure.

Troubleshooting Host-Based Subnetting Issues
A subnet runs out of addresses shortly after deployment. This usually points back to the original host bit calculation being too conservative, sizing to the exact current requirement without any headroom for growth. Recalculating with the next larger power-of-two host count, even if it exceeds the immediate requirement, often prevents this exact problem from recurring, trading a small amount of address efficiency now for meaningfully less rework later.
Two subnets calculated separately overlap. Cross-check the increment value against both subnets’ actual network addresses; overlapping ranges almost always trace back to a miscalculated increment or a network address that wasn’t correctly aligned to a multiple of that increment. This is exactly the kind of error a subnet calculator catches quickly when manual calculation becomes error-prone, especially across a design involving several differently-sized subnets at once.
A device gets assigned what looks like the network or broadcast address. Double-check the usable range boundaries directly against the subnet’s actual network ID and broadcast address, both of which are reserved and unusable regardless of how the subnet was originally derived, host-based or network-based. This is one of the simplest checks to run, and it resolves a surprising number of “why won’t this device connect” reports on its own.
Choosing Between the Two Approaches in Practice
It’s worth thinking about which framing actually fits a given real-world scenario, rather than defaulting to whichever method feels more familiar. An ISP allocating address space to a known number of client networks, where each client needs roughly the same host capacity, is a natural fit for network-based subnetting: the subnet count is the known quantity. An enterprise designing subnets for specific departments, where HR needs support for 62 devices and the warehouse needs support for 14, is a natural fit for host-based subnetting: the host count per subnet is the known quantity, and it varies from one subnet to the next.
Many real designs actually combine both approaches within the same overall address plan, using host-based reasoning to size each individual subnet correctly, and network-based reasoning to confirm the total number of subnets produced still fits within the available address space. Recognizing which question a given subnetting scenario is actually asking, “how many subnets” or “how many hosts each,” is often the fastest way to know which direction to start borrowing bits from, and it’s a distinction worth making explicit before diving into the arithmetic.

Frequently Asked Questions
What is host-based subnetting and how does it differ from network-based subnetting?
Host-based subnetting starts by determining how many host bits are needed to support a required number of devices per subnet, then derives the mask from that. Network-based subnetting instead starts with a required number of subnets and derives the mask from that, adjusting host capacity as a consequence rather than as the primary goal.
How do I calculate the subnet mask for a specific host requirement?
Find the smallest number of host bits h such that 2^h − 2 meets or exceeds your requirement, then subtract h from 32 to get the new prefix length. For 62 hosts, h = 6 works exactly, giving a /26 (32 − 6 = 26) and a mask of 255.255.255.192.
What’s the trade-off when subnetting based on host requirements?
More host bits mean more usable addresses per subnet but fewer total subnets available from the same original block, while fewer host bits mean more subnets but a smaller host capacity in each one. Choosing the right balance depends entirely on which constraint, subnet count or host count per subnet, actually matters more for a given network design.
How can VLSM enhance host-based subnetting in larger networks?
VLSM allows different subnets within the same overall network to use different host-based mask sizes, a /26 for a 62-host subnet and a /28 for a 14-host subnet, for example, rather than forcing every subnet in the design to use the same uniform size. This lets each subnet be sized to its own actual host requirement rather than the largest requirement in the whole network.
How does host-based subnetting apply to IPv6 networks?
IPv6 typically uses a fixed /64 prefix per subnet, providing roughly 18.4 quintillion (2⁶⁴) possible host addresses, a scale so large that host-count-driven subnetting the way IPv4 requires essentially isn’t a practical concern. The host-based reasoning covered in this guide remains conceptually relevant, but the actual numbers involved make it a largely theoretical exercise under IPv6 rather than a genuine design constraint.
What are common mistakes to avoid when subnetting for a specific host count?
Choosing too few host bits, for example a /27 (30 usable hosts) when 62 are actually needed, is one of the most common errors, since it silently under-provisions a subnet that will run out of addresses as it grows. Verifying the final usable host count against the actual requirement, and checking for accidentally overlapping subnet ranges, catches most host-based subnetting mistakes before they cause real problems.