Subnetting splits a network into smaller pieces using CIDR notation: the number after the slash says how many bits are the network part. A /24 has 256 addresses and 254 usable hosts; a /26 has 64 addresses and 62 usable hosts. The network address is the first address in the range and the broadcast address is the last.
Every device on a network has an address, and every address belongs to a range. Subnetting is the art of cutting those ranges into sensible pieces — big enough for the devices you have, small enough that you are not wasting addresses or letting every device shout at every other device. It sounds like arcane network engineering. In practice, it is powers of two, and if you can halve a number repeatedly, you can subnet.
This guide starts from nothing and works up to a full example: taking a /24 network, splitting it into /26 subnets, and finding the network and broadcast address for any host. No binary tables to memorise, no exam tricks, just the arithmetic.
What an IP address actually is
An IPv4 address like 192.168.1.100 is four numbers, each between 0 and 255, separated by dots. Underneath, each of those numbers is eight bits — eight ones and zeros — so the whole address is 32 bits long. That is all an IP address is: a 32-bit number written in a human-friendly way.
The key idea is that part of those 32 bits identifies the network, and the rest identifies the individual device — the host — inside that network. The dividing line between the two parts is what subnetting is all about. Move the line one way and you get fewer, bigger networks. Move it the other way and you get more, smaller networks. The total is always 32 bits, so every bit you give to the network is a bit you take away from the hosts.
CIDR notation: the number after the slash
CIDR notation writes the dividing line as a single number after a slash. 192.168.1.0/24 means the first 24 bits are the network part and the remaining 8 bits are the host part. The 24 is called the prefix length, and it is the only number you need to work out the size of the network.
Eight host bits means two to the power of eight possible combinations, which is 256 addresses. That is the whole story of a /24: 256 addresses in total. Every prefix length works the same way. Subtract the prefix from 32 to get the host bits, then raise two to that power. A /25 has 7 host bits and 128 addresses. A /26 has 6 host bits and 64 addresses. A /27 has 5 host bits and 32 addresses. A /30 has 2 host bits and just 4 addresses.
The pattern is simple enough to do in your head: each time the prefix goes up by one, the network gets half as big. Each time it goes down by one, the network doubles. A /23 is 512 addresses. A /22 is 1,024. Going the other way, a /28 is 16 addresses and a /29 is 8.
Why 254 hosts, not 256
Here is the detail that trips up everyone on their first day. A /24 has 256 addresses, but only 254 of them can be given to devices. Two addresses in every subnet are reserved and can never be assigned to a host.
The first address in the range is the network address. It identifies the subnet itself — 192.168.1.0 is the name of the whole /24, not a device on it. The last address in the range is the broadcast address. Send a packet to 192.168.1.255 and every device on that subnet receives it. That is genuinely useful for things like asking "who has this address?", but it means the address itself cannot belong to one device.
So the rule is: usable hosts equals two to the power of the host bits, minus two. A /24 gives 256 minus 2, which is 254 usable hosts. A /26 gives 64 minus 2, which is 62. A /30 gives 4 minus 2, which is 2 — just enough for the two ends of a point-to-point link between routers, which is exactly what /30s are used for.
The subnet mask, decoded
The subnet mask is the same information as the CIDR prefix, written as an address. It is a row of ones for the network bits followed by zeros for the host bits. A /24 mask is 24 ones and 8 zeros, which written out is 255.255.255.0. A /26 mask is 255.255.255.192, because the last eight bits are 11000000 — two ones and six zeros — and 128 plus 64 is 192. A /25 is 255.255.255.128. A /27 is 255.255.255.224. A /28 is 255.255.255.240.
You do not need to memorise the whole table. The useful ones are the boundaries of the last octet: /25 is 128, /26 is 192, /27 is 224, /28 is 240, /29 is 248, /30 is 252. Notice that each step adds half of what is left. If you remember 128, 192 and 224, you can work out the rest on the spot.
Worked example: splitting a /24 into /26 subnets
Now let us do the whole thing. You have the network 192.168.1.0/24 and you want four subnets — perhaps one for the office, one for the warehouse, one for guests and one spare. A /26 gives 64 addresses per subnet, and four times 64 is 256, which is exactly the size of your /24. So you split it into four /26 subnets, and the boundaries fall every 64 addresses.
| Subnet | Network address | Usable hosts | Broadcast address |
|---|---|---|---|
| 1 | 192.168.1.0 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 |
| 2 | 192.168.1.64 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 |
| 3 | 192.168.1.128 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 |
| 4 | 192.168.1.192 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 |
Each subnet has 62 usable hosts, and the pattern is regular enough to see at a glance: the network addresses are 0, 64, 128 and 192, and each broadcast address is one less than the next network address. That regularity is the whole point. Once you know the block size — 64 for a /26 — you can find any boundary by counting in steps of 64.
Finding the network and broadcast address for a host
The question that comes up in real life is not "list all the subnets" but "this device has the address 192.168.1.100 — which subnet is it in?" The method is the same counting trick. The block size is 64, so the subnet boundaries are 0, 64, 128 and 192. The address 100 sits between 64 and 128, so it belongs to the subnet starting at 192.168.1.64. The network address is 192.168.1.64, the broadcast address is one less than the next boundary, which is 192.168.1.127, and the usable range is 192.168.1.65 to 192.168.1.126.
Try another one. The address 192.168.1.200, same /26 subnets. The boundaries are 0, 64, 128 and 192. The address 200 sits between 192 and 256, so it belongs to the subnet starting at 192.168.1.192. Network address 192.168.1.192, broadcast 192.168.1.255, usable hosts 192.168.1.193 to 192.168.1.254.
And one more, with a different prefix to prove the method travels. Take the network 10.0.0.0/27, which has a block size of 32. The boundaries are 0, 32, 64, 96 and so on. A host at 10.0.0.70 sits between 64 and 96, so its network address is 10.0.0.64, its broadcast is 10.0.0.95, and the usable hosts run from 10.0.0.65 to 10.0.0.94. The method never changes: find the block size, find the boundaries, see which pair of boundaries the address falls between.
Choosing the right size
The practical question is how big to make a subnet, and the answer is to count the hosts you need, add room for growth, and pick the smallest block that fits. Twenty devices need a /27, which holds 30 usable hosts. Forty devices need a /26, which holds 62. A hundred devices need a /25, which holds 126. Going one size bigger than you need is sensible — networks always grow — but going three sizes bigger wastes addresses and, more importantly, puts hundreds of devices in one broadcast domain, where every broadcast packet interrupts every device.
Three mistakes that trip people up
The first is counting 64 usable hosts in a /26 instead of 62. The network address and the broadcast address are reserved, and they are reserved in every subnet, no matter the size — the only exception is a /31 point-to-point link, which has no usable hosts at all under the old rules and two under the newer RFC 3021 treatment. The second mistake is mixing up the mask and the prefix: /26 is 255.255.255.192, not 255.255.255.64, and the confusion comes from reading the 64 as the mask instead of the block size. The third is assuming a subnet boundary falls wherever the addresses run out. Boundaries are always multiples of the block size, so a /26 starting at 192.168.1.64 ends at .127, and .128 belongs to the next subnet whether it looks tidy or not.
That is the real reason subnetting exists. It is not about saving addresses, although it does that. It is about keeping networks manageable: smaller broadcast domains, cleaner security boundaries, and faults that stay contained instead of taking the whole network down. The arithmetic is just the tool that makes it possible, and now you have it.
Frequently Asked Questions (FAQ)
How many usable hosts are in a /24 network?
A /24 has 8 host bits, giving 2 to the power of 8, or 256 addresses in total. Two are reserved — the network address and the broadcast address — leaving 254 usable hosts. The usable range of 192.168.1.0/24 is 192.168.1.1 to 192.168.1.254.
What does the number after the slash in CIDR notation mean?
It is the prefix length: how many of the 32 bits in the address are the network part. In 192.168.1.0/24, the first 24 bits identify the network and the remaining 8 bits identify hosts. A larger number means a smaller network.
How many addresses are in a /26 subnet?
A /26 has 6 host bits, so 2 to the power of 6, or 64 addresses, of which 62 are usable after removing the network and broadcast addresses. Four /26 subnets fit exactly into one /24, with boundaries at 0, 64, 128 and 192.
How do I find the broadcast address of a subnet?
Find the next subnet's network address and subtract one. For the /26 starting at 192.168.1.64, the next subnet starts at 192.168.1.128, so the broadcast address is 192.168.1.127. The broadcast is always the last address in the range.
What is the subnet mask for a /26?
It is 255.255.255.192. The mask has 26 ones followed by 6 zeros; in the last octet that is 11000000 in binary, and 128 plus 64 equals 192. Common masks to know are /25 = 255.255.255.128, /27 = 255.255.255.224 and /28 = 255.255.255.240.
This guide is general information only. It is not regulated financial, tax, legal or medical advice. Tax and benefit rules change — check the current GOV.UK guidance or speak to a qualified adviser, accountant or your GP before acting on it.


