Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

Stop Guessing Subnet Sizes: A Practical Mental Model for IPv4 Subnetting

A slash prefix is a 32-bit boundary: count the remaining host bits to get block size, then use aligned multiples to find the network address and range.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

IPv4 subnet sizes become predictable once you treat the slash prefix as a boundary in a 32-bit address. The prefix fixes the leading network bits; the bits left over determine the block size. Use the prefix to count host bits, convert the boundary into a block size, then find the aligned network address.

What does /26 mean?

An IPv4 address contains 32 bits. In CIDR notation, the number after the slash is the count of leading bits that identify the network prefix. For example, in 192.168.10.77/26, 26 bits are fixed as the network prefix and the remaining 6 bits vary within the address block. RFC 4632 defines this slash value as the number of significant bits in the prefix and uses examples such as 172.16.0.0/16 and 192.168.99.0/24 (RFC 4632).

As an Amazon Associate I earn from qualifying purchases.

The subnet mask expresses the same boundary in dotted decimal. Its network bits are 1s and its host bits are 0s; those 1s must be contiguous from the left (RFC 1812). Thus, /26 is 255.255.255.192: the first 26 bits are fixed, and six bits remain for addresses in each block.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Host bits = 32 − prefix length.
  • Total addresses in the block = 2host bits, or 2(32 − prefix length).
  • Each additional prefix bit halves the block; removing one prefix bit doubles it.

This is classless addressing: use the explicit prefix length rather than relying on legacy Class A, B, or C assumptions. CIDR allows address blocks of different sizes to be assigned and aggregated (RFC 4632).

How many addresses are in a /26?

A /26 leaves 32 − 26 = 6 host bits, so it contains 26 = 64 total addresses. In a conventional IPv4 broadcast subnet, the first address is the network address and the last is the directed broadcast address, so the usual assignable range contains 64 − 2 = 62 host addresses. That minus-two rule is the common case, not a universal rule.

Prefix Host bits Total addresses Ordinary broadcast-subnet usable hosts
/24 8 256 254
/25 7 128 126
/26 6 64 62
/27 5 32 30
/28 4 16 14
/31 1 2 2 on a point-to-point link under RFC 3021
/32 0 1 Not an ordinary subnet host range; RFC 4632 lists it as a one-address host route

The counts follow the prefix arithmetic in RFC 4632. For a /31 specifically assigned to a point-to-point link, RFC 3021 section 2.1 says “the two addresses above MUST be interpreted as host addresses”; both addresses can therefore be used as endpoints in that defined case (RFC 3021). Do not apply the conventional minus-two rule to that use case.

How does the block-size shortcut work?

A prefix divides the 32-bit address space into aligned, power-of-two blocks. When the prefix ends partway through an octet, the mask value in that octet reveals the block size: subtract it from 256. For example, a mask octet of 192 gives a block size of 256 − 192 = 64.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Mask value in partial octet Block size
128 128
192 64
224 32
240 16
248 8
252 4
254 2

These values reflect the binary pattern of contiguous 1s in a subnet mask and the power-of-two blocks that CIDR prefixes define (RFC 1812; RFC 4632). To find the network boundary, identify the affected octet and choose the greatest multiple of the block size that is no larger than the address’s value in that octet.

How do I find the subnet for an IP address?

  1. Read the prefix. For 192.168.10.77/26, the prefix is 26.
  2. Find the host bits and block size. There are 32 − 26 = 6 host bits, so the block contains 26 = 64 addresses. The mask is 255.255.255.192, making the final-octet block size 256 − 192 = 64.
  3. Find the aligned boundary. The final-octet multiples of 64 are 0, 64, 128, and 192. Since 77 is between 64 and 127, the network begins at 192.168.10.64.
  4. Find the broadcast and host range. The next block begins at 192.168.10.128, so the preceding address, 192.168.10.127, is the directed broadcast. In this ordinary broadcast subnet, the usable host range is 192.168.10.65 through 192.168.10.126.

The result is network 192.168.10.64/26. The reusable sequence is prefix, host bits, block size, aligned boundary, then network and broadcast addresses.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How should I choose a subnet size?

Start with the number of endpoint addresses the subnet must support, then choose the smallest block that accommodates that requirement and a sensible amount of expected growth. Total addresses come in powers of two, so moving one prefix bit shorter doubles capacity, while moving one bit longer halves it.

  • Compare the required endpoint count and growth headroom with the usable capacity, not just the total address count.
  • Account for the addresses reserved by the conventional network-and-broadcast arrangement where it applies.
  • Check that the chosen block begins on a valid boundary and fits inside the parent allocation.
  • In variable-length subnetting, allocate the largest requirements first, then place smaller blocks at valid boundaries. CIDR supports subblocks with different prefix lengths (RFC 1812).
  • Check platform constraints before assigning the subnet. AWS documentation currently describes IPv4 subnet CIDRs from /16 through /28; that provider-specific range may change, so consult its current Subnet CIDR blocks documentation.

For scale, AWS Networking Best Practices says a /16 contains 65,536 addresses (AWS Networking Best Practices: CIDR Planning). That is the total block size; it should not be mistaken for the number of assignable hosts in every environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.