Manual Subnetting Without a Calculator: Fast Calculations Like a Network Technician
Tired of subnet calculators? Learn to work out block size, network, broadcast, and host counts in your head with practical examples.
Why You Should Be Able to Calculate in Your Head
Have you ever been in this position? You are configuring a router, then a client asks for a new IP address, and you start opening a subnet calculator in your browser. The problem is that in the field, that calculator often is not there: you are stuck in an SSH session, on a local network without internet, or in a practical exam that bans helper tools.
Honestly, subnetting is not advanced math. It is just multiplication by powers of two and a single comparison operation. Once you are used to it, calculating is faster than opening a browser.
This article is written from a practical angle, not full theory. You need to understand the block concept, and the rest is practice.
Foundation: Addresses in a Single Subnet
Every /xx prefix indicates how many address bits are part of the network. The rest, 32 - prefix, are host bits. The number of addresses in a subnet is always:
2^(32 - prefix)
The most familiar examples:
/24means2^8= 256 addresses/16means2^16= 65,536 addresses
Of that total number of addresses, two are always unusable for devices: the first (network address) and the last (broadcast address). So the addresses that devices can actually use are:
2^(32 - prefix) - 2
Memorize This Small Table
The prefixes most often used in homelabs and offices are only these. Memorize these rows and half the work is done:
| Prefix | Total addresses | Usable addresses |
|---|---|---|
| /24 | 256 | 254 |
| /25 | 128 | 126 |
| /26 | 64 | 62 |
| /27 | 32 | 30 |
| /28 | 16 | 14 |
| /29 | 8 | 6 |
| /30 | 4 | 2 |
Notice the pattern: each time the prefix number increases by one, the number of addresses is halved. From /24 to /25 it becomes 128, to /26 it becomes 64, and so on. A series of halving by two from 256 downward.
Three Steps to Calculate a Subnet
If you are given an IP address and prefix such as 192.168.1.37/27, this is the order of operations:
Step 1: Find the block size.
The block size is the number of addresses in each block, following the table above. For /27, the block size is 32.
Step 2: Find the network address.
The network address is the largest multiple of the block size that does not exceed the value of the last octet of the IP. From the example 192.168.1.37 with a block of 32:
- 32 x 1 = 32
- 32 x 2 = 64 (already past 37)
So the network address is 192.168.1.32.
Step 3: Find the broadcast address.
The broadcast address is network address + block size - 1:
- 32 + 32 - 1 = 63
Its broadcast address is 192.168.1.63. The addresses devices can use are 33 through 62, a total of 30 devices, matching the /27 row in the table.
More Examples So It Sinks In
Example 1: 10.0.0.200/26
- Block size /26 = 64
- Network: the largest multiple of 64 below 200 → 192
- Broadcast: 192 + 64 - 1 = 255
- Usable: 193 through 254 (62 devices)
Network address 10.0.0.192, broadcast 10.0.0.255.
Example 2: 172.16.5.130/25
- Block size /25 = 128
- Network: the multiple of 128 below 130 → 128
- Broadcast: 128 + 128 - 1 = 255
- Usable: 129 through 254 (126 devices)
Network address 172.16.5.128, broadcast 172.16.5.255.
Example 3: a subnet that spans two octets
If the prefix is below /24, for example /20, the block is in the third octet. The block size for /20 is 16 in the third octet (256 x 16 = 4,096 total addresses). For 10.0.10.150:
- Multiples of 16 in the third octet: 10 is between 0 and 16, so the network is
10.0.0.0 - Broadcast: network + 4,095 =
10.0.15.255 - Usable:
10.0.0.1through10.0.15.254
What you need to remember: the block size is calculated on the octet where the host bits start being cut. For /20, that is the third octet.
A Special Case You Must Know: /30
/30 has only 4 addresses, with 2 usable. That is perfect for a point-to-point connection between two devices, such as between a router and a core switch, or between two routers.
Example 192.168.99.5/30:
- Block size 4
- Network: the multiple of 4 below 5 → 4
- Broadcast: 4 + 4 - 1 = 7
- Usable: only 5 and 6
In large networks, /30 is used so only those two addresses are wasted, not 254. A small detail, but it makes total address accounting in sparse networks awkward.
Common Mistakes That Lead to Wrong Calculations
These are a few things that often trip people up even when they understand the concept:
- The network address must be a multiple of the block size. Many people just take the number right below the IP. 37 is not a multiple of 32, so the network is actually 32, not something close to it.
- Broadcast is not network + block. Without subtracting 1, you shift one address into the next subnet. Always network + block size, then subtract 1.
- Not accounting for the two wasted addresses. Subnet capacity is the total number of addresses, but device capacity is always the total minus 2.
- Prefixes below /24 cut into the third octet. If you use /22 or /20 on the last octet, the result is off. Align where the block size is calculated with the position of the host bits.
A Quick Wrap-Up
Once that eight-row table is in your head, subnetting becomes habit: look at the prefix, read the block size, find the multiple, calculate the broadcast. You do not need to memorize stacked formulas, just the pattern of twos being halved repeatedly.
Try a quick exercise before you close this tab: 192.168.4.75/28. Block size 16, 75 is between 64 and 80, so the network is 192.168.4.64, the broadcast is 192.168.4.79, and the hosts are 65 through 78. If you got the same answer, the method has clicked.
If you keep slipping on the same step, type 192.168.4.75/28 into the subnet calculator and compare. The difference usually points straight at whether the block size, the rounding to the network address, or the two reserved addresses is where you went wrong.
Related Articles
CCNA at UNPAM: Program, Benefits, and How to Register
UNPAM has an official CCNA program (ITN, SRWE, ENSA). Learn what it covers, how valuable the certificate is, and how to register via Kredensia.
NetworkingNetworking Certification Paths for Your Career: Cisco, Juniper, MikroTik
A complete guide to networking certification paths: Cisco's CCST/CCNA/CCNP/CCIE, Juniper's JNCIA/JNCIS/JNCIP/JNCIE, and MikroTik's MTCNA/MTCRE, plus network engineer career prospects in Indonesia.
NetworkingWiFi Security: WPA2, WPA3, 802.1X, and Rogue AP
Secure wireless networks: strengths and weaknesses of WPA2 through WPA3, enterprise 802.1X, how to detect rogue access points, and safe home WiFi practices.
Your ideas deserve to be read by thousands of people.
ByteNesia is built for everyone. If you have experience, tutorials, or opinions about technology, write and share them here. Your name will be credited as a contributor.
Write anything: tool reviews, homelab tutorials, security tips, or your tech stories.