Free tech learning for everyone, from basics to pro

NoteNetworking fundamentalsBeginner

Subnetting in your head: the block-size method

In short: Find the "interesting" octet, work out the block size (256 minus the mask value in that octet), and count up in blocks. Everything else follows from that.

The method in four steps

  1. Find the interesting octet: the first octet where the mask isn't 255.
  2. Work out the block size: 256 minus the mask value in that octet.
  3. Find the network: the largest multiple of the block size that's less than or equal to the IP's value in that octet.
  4. Find the broadcast: the next network minus one.

Worked example: 172.16.45.130/26

  • /26 is 255.255.255.192, so the interesting octet is the 4th.
  • Block size: 256 − 192 = 64. Networks start at .0, .64, .128, .192.
  • 130 falls in the block starting at .128, so the network is 172.16.45.128.
  • The next block starts at .192, so the broadcast is 172.16.45.191.
  • Usable hosts: .129 to .190, which is 26 − 2 = 62.

Prefixes worth memorising

PrefixMaskBlock sizeUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

Sizing a subnet for a requirement

Need at least N hosts? Find the smallest number of host bits h where 2h − 2 ≥ N. The prefix is 32 − h. For 50 hosts, h = 6 (62 hosts), so use a /26.

Practise until it's automatic: try the subnetting practice tool and the branch office challenge.

Key takeaways

  • Block size = 256 − mask value in the interesting octet.
  • Network = the block the address falls into; broadcast = next block − 1.
  • Usable hosts = 2^host bits − 2 (except /31 and /32).
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.