Host capacity comes directly from the number of host bits
IPv4 addresses contain 32 bits. A CIDR prefix tells you how many of those bits describe the network. The remaining bits are available for addresses inside that subnet. Once you know the number of host bits, you can determine the total block size and, for traditional LAN subnet questions, the number of ordinary host assignments.
Traditional usable hosts = 2^(32 − prefix) − 2
If the prefix is /26, then 32 − 26 = 6 host bits. Six bits create 2^6 = 64 possible addresses. In the traditional model, one address identifies the subnet itself and one is the broadcast address, leaving 62 ordinary host assignments.
The subtraction is not a magic rule. It reflects the traditional roles of the all-zero and all-one host-bit patterns.
Memorize the pattern, not isolated numbers
| Prefix | Host bits | Total addresses | Traditional usable hosts |
|---|---|---|---|
| /24 | 8 | 256 | 254 |
| /25 | 7 | 128 | 126 |
| /26 | 6 | 64 | 62 |
| /27 | 5 | 32 | 30 |
| /28 | 4 | 16 | 14 |
| /29 | 3 | 8 | 6 |
| /30 | 2 | 4 | 2 |
Swipe horizontally to see the complete table.
The boundary addresses have special traditional meanings
All host bits = 0
Identifies the network address itself.
All host bits = 1
Identifies the traditional directed broadcast address.
Everything between
Forms the ordinary usable host range.
For a /28, four host bits provide 16 total patterns. The first pattern is the network address, the last is broadcast, and the 14 in between are traditional host assignments.
Every one-bit increase in prefix length halves the block size
A /24 has 256 total addresses. Move to /25 and the block becomes 128. /26 becomes 64, then /27 becomes 32. This halving pattern is faster to use mentally than rebuilding every power of two from scratch.
Find the smallest prefix that can satisfy a host requirement
Instead of starting with a prefix, start with the required host count and find the smallest number of host bits for which 2^h − 2 is at least the requirement.
| Need | Too small | First fit | Prefix |
|---|---|---|---|
| 12 hosts | /29 = 6 | /28 = 14 | /28 |
| 20 hosts | /28 = 14 | /27 = 30 | /27 |
| 50 hosts | /27 = 30 | /26 = 62 | /26 |
| 100 hosts | /26 = 62 | /25 = 126 | /25 |
Swipe horizontally to see the reverse-capacity table.
Mathematically fitting does not always mean operationally sensible
If exactly 62 hosts are required, a /26 technically fits 62 traditional usable addresses. But that leaves no room for a gateway, printer, access point, switch management IP, reservation, spare device, or future growth if those are part of the same addressing requirement.
Usable host count and DHCP pool size are not the same thing
A /26 may provide 62 traditional usable addresses, but the DHCP server may offer far fewer because some addresses are reserved for infrastructure or excluded from dynamic assignment.
This distinction matters in capacity planning and DHCP-scope exhaustion troubleshooting.
A /27 is too small for 50 devices even though 32 sounds close
A /27 has 5 host bits. That creates 32 total addresses, but only 30 traditional usable host addresses. A requirement for 50 devices therefore cannot fit.
The next larger block is /26 with 64 total and 62 usable, so /26 is the smallest traditional subnet that satisfies 50 hosts.
A /28 fits 12 users but may not fit the whole department
Twelve laptops fit inside a /28 because it provides 14 traditional usable addresses. But if the same subnet also needs a gateway, printer, access point, and two management addresses, the true requirement becomes 17 devices.
Now /28 is too small and /27 is the first practical fit. The lesson is to count all addresses that must exist on the subnet, not only end users.
A /25 supports 126 usable hosts, but only 100 may be available to DHCP
Suppose .1 is the gateway, .2-.20 are infrastructure, .21-.26 are reservations, and the administrator limits dynamic leases to .27-.126. The subnet has 126 traditional host addresses, but the DHCP pool has only 100 addresses.
This is why “How many hosts can the subnet hold?” and “How many DHCP clients can lease?” are different questions.
A /30 provides exactly two traditional host addresses
A /30 contains four total addresses: one network, two ordinary host assignments, and one broadcast. This made /30 common historically for point-to-point links because two endpoints need addresses.
Modern point-to-point designs may use /31 under the relevant standards, so the traditional −2 rule should not be applied blindly outside the intended question context.
Choosing /26 for 60 current hosts leaves almost no growth room
A /26 supports 62 traditional usable hosts. If 60 are already needed, only two addresses remain—and those may already be consumed by infrastructure.
A larger subnet may be justified if growth is expected, but the design decision should also consider broadcast-domain size, segmentation, DHCP, gateway configuration, and security boundaries.
Host count is easier when you understand the subnet's address range
Take 192.168.10.64/26. A /26 has 64 total addresses, so this block runs from .64 through .127.
The host-count formula and the address-boundary calculation should agree. If they do not, one of the calculations is wrong.
The prefix tells you which bits belong to the network
A /26 means 26 network bits and 6 host bits. In dotted-decimal notation, that corresponds to 255.255.255.192. You do not need the mask to calculate host count if the CIDR prefix is already given, but understanding the connection helps with broader subnetting problems.
Know the powers of two that appear constantly in subnetting
2² = 4
/30 total block size
2³ = 8
/29 total block size
2⁴ = 16
/28 total block size
2⁵ = 32
/27 total block size
2⁶ = 64
/26 total block size
2⁷ = 128
/25 total block size
/31 and /32 are reminders that context matters
The traditional formula assumes a multi-host LAN model with distinct network and broadcast addresses. Point-to-point IPv4 networks can use /31 under modern standards, and /32 represents a single host route/address.
“Total addresses” and “usable host addresses” are not interchangeable
| Question wording | /28 answer |
|---|---|
| How many total addresses are in the subnet? | 16 |
| How many traditional usable host addresses? | 14 |
| How many bits are available for hosts? | 4 |
| What is the block size? | 16 addresses |
Swipe horizontally to see the wording table.
Most host-count errors come from one of four reasoning failures
| Mistake | Why it fails | Fix |
|---|---|---|
| Using prefix length as host bits | /26 does not mean 26 host bits | Compute 32 − prefix |
| Forgetting network/broadcast | Returns total, not traditional usable | Subtract 2 when appropriate |
| Choosing /27 for 50 hosts | 30 usable is too small | Move to /26 |
| Ignoring infrastructure | User count understates real demand | Count every address requirement |
Swipe horizontally to see the mistake table.
Choose a subnet for 45 users plus infrastructure and 20% growth
Suppose a department has 45 user devices, one gateway, two printers, three access points, and four switch-management addresses. That is 55 current addresses. Add approximately 20% growth and the design target becomes about 66 addresses.
This is a better design answer than choosing /26 merely because 45 users fit.
A larger subnet solves capacity but may affect design boundaries
Increasing subnet size provides more addresses, but it can also change broadcast-domain scale, DHCP design, gateway configuration, segmentation, security policy, and documentation. Capacity is one design requirement among several.
For exam questions, state the host-count result first, then connect it to the broader network requirement if the prompt asks for design justification.
Show the arithmetic and the decision
Prefix: identify the CIDR length.
Host bits: 32 − prefix.
Total addresses: 2^(host bits).
Traditional usable: subtract network and broadcast when appropriate.
Requirement: compare usable count to needed devices.
Headroom: consider infrastructure and growth.
Host capacity and subnet boundaries should agree with each other
Host-count arithmetic becomes much stronger when you connect it to the actual address range. A /27 contains 32 total addresses, so its blocks advance in increments of 32 in the final octet when the subnet lies within a /24. If one block starts at .64, the next starts at .96. That means the .64/27 block spans .64 through .95.
This cross-check catches mistakes. If your host-count math says /27 has 30 usable addresses but your listed range contains 31 hosts, the boundary calculation is wrong.
Move one prefix step at a time when a requirement no longer fits
Because each shorter prefix doubles the total block size, capacity planning follows a predictable ladder. If /28 is too small, /27 doubles total addresses from 16 to 32. If /27 is too small, /26 doubles again to 64.
| Current fit | Next larger subnet | Usable increase |
|---|---|---|
| /30 = 2 usable | /29 = 6 usable | +4 |
| /29 = 6 usable | /28 = 14 usable | +8 |
| /28 = 14 usable | /27 = 30 usable | +16 |
| /27 = 30 usable | /26 = 62 usable | +32 |
| /26 = 62 usable | /25 = 126 usable | +64 |
Swipe horizontally to see the growth ladder.
Count address consumers, not just people
A classroom with 24 students does not necessarily need only 24 host addresses. The same subnet may also include a teacher workstation, printer, AP management address, switch management address, gateway, display controller, lab server, and temporary devices.
For capacity questions, write the requirement explicitly. If the prompt says “30 student devices,” use 30. If it says “design a subnet for the classroom,” include infrastructure when the scenario provides it. This prevents under-sizing caused by treating user count as the whole network.
The smallest possible subnet minimizes unused addresses but can reduce operational flexibility
A /27 for 28 devices leaves only two ordinary host addresses free. That is mathematically efficient, but a single new printer and one replacement device could consume all remaining capacity. A /26 leaves far more headroom, but also creates a larger broadcast domain and may be more space than the design needs.
Smaller subnet
Conserves address space and limits broadcast-domain size, but leaves less growth room.
Larger subnet
Adds capacity and flexibility, but may widen the broadcast and policy boundary.
The right choice depends on the stated requirement, not a blanket rule that smaller or larger is always better.
A subnet can have free host addresses while the DHCP pool is exhausted
Suppose a /25 has 126 traditional usable host addresses, but the administrator configured DHCP only from .50 through .100. That pool contains 51 addresses. Once all leases are active, new clients can fail to obtain an address even though many addresses elsewhere in the subnet are technically unused.
This is a powerful evidence boundary: subnet capacity and DHCP scope capacity are related but not identical.
Reservations consume address capacity even when they are not active every minute
A DHCP reservation removes an address from ordinary dynamic availability for a known device. If a subnet has 62 usable addresses and 20 are reserved for printers, cameras, and infrastructure, the dynamic client capacity is much lower than 62.
Strong planning therefore tracks three numbers separately: total usable subnet capacity, infrastructure/reserved consumption, and remaining dynamic pool headroom.
Every host bit doubles the number of address combinations
One host bit creates 2 combinations. Two host bits create 4. Three create 8. That doubling is why subnet sizes always come in powers of two. CIDR is not producing arbitrary capacities; the capacities come directly from binary combinations.
Understanding this makes it easier to reconstruct the table even if you forget one value during an exam.
A subnet that technically fits can still be the wrong answer if the requirement includes growth
Suppose the requirement says “support 28 devices today and 10 additional devices next semester.” A /27 supports 30 usable hosts, so it fits today's 28. But the actual design requirement is 38. A /26 is therefore the first traditional subnet that satisfies the full stated need.
This is exactly the kind of detail that separates arithmetic from design reasoning. The correct prefix comes from the whole requirement, not only the present count.
Use three independent checks when accuracy matters
For any host-capacity problem, verify the answer three ways: host-bit formula, known power-of-two block size, and boundary range. If all three agree, the chance of a silent arithmetic mistake drops sharply.
Use the shortest reliable method under time pressure
For /24 through /30, knowing the host-count ladder is usually fastest: 254, 126, 62, 30, 14, 6, 2. If the prefix is unfamiliar, fall back to host bits and powers of two. If the question asks for a design choice, compare the usable count to the requirement and include headroom only when the scenario calls for it.
Fast does not mean skipping the distinction between total addresses and usable hosts. That wording difference is one of the easiest places to lose an otherwise simple question.
24 How Many Hosts Per Subnet? digital flashcards
Practice host bits, powers of two, total addresses, traditional usable hosts, /24 through /30, reverse-capacity questions, DHCP pool differences, special cases, and exam wording.