# CIDR and subnets: what /24, /26 and /20 really mean

> The number after the slash in an address like 192.168.1.0/24 counts how many of the 32 bits belong to the network. The rest are for hosts. A /24 holds 256 addresses, a /26 holds 64 and a /20 holds 4,096. This guide shows how to read, split and size a subnet.

Published 2026-10-08 by Toolcloak. 4 minute read. Original: https://toolcloak.pages.dev/articles/cidr-and-subnets-what-slash-24-slash-26-and-slash-20-really-mean
Related free tool: [IP Subnet Calculator](https://toolcloak.pages.dev/tools/ip-subnet-calculator)

Every device on a network has an address, and every address has two parts: which network it belongs to and which device it is on that network. CIDR notation is a compact way to say where the line between the two parts falls. Once that clicks, subnet masks stop looking like magic.

> **In short**
> - An IPv4 address has **32 bits**. In `192.168.1.0/24`, the **/24** means the first 24 bits name the network and the last 8 name the host.
> - Addresses in a subnet = **2 ^ (32 − prefix)**. So /24 = 256, /26 = 64, /20 = 4,096.
> - Two addresses are reserved in most subnets: the **network address** (first) and the **broadcast address** (last). Usable hosts = addresses − 2.
> - A bigger number after the slash means a **smaller** subnet.

## An address is 32 bits

An IPv4 address such as 192.168.1.10 is four numbers from 0 to 255. Each number is 8 bits, so the whole thing is 32 bits. The slash number says how many of those 32 bits, counted from the left, are fixed for the network.

**The 32 bits of a /24 network**

| Group | Count |
| --- | --- |
| Network bits (fixed) | 24 bits |
| Host bits (free to change) | 8 bits |

With 8 host bits there are 2⁸ = 256 different host values, from 0 to 255. Those 256 addresses are the whole /24 subnet.

## How big is each prefix?

Each step up in the prefix halves the subnet. Each step down doubles it. Here are the common sizes, with the subnet mask that goes with each:

| Prefix | Subnet mask | Addresses | Usable hosts |
| --- | --- | --- | --- |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |

*A /31 has 2 addresses and is used for point-to-point links. A /32 is a single host.*

**Usable hosts, by prefix length**

|  | Value |
| --- | --- |
| /30 | 2 |
| /29 | 6 |
| /28 | 14 |
| /27 | 30 |
| /26 | 62 |
| /25 | 126 |
| /24 | 254 |

*Each step to the right doubles the hosts (minus the two reserved addresses). The columns grow quickly, which is why the choice of prefix matters.*

Try it: [IP Subnet Calculator](https://toolcloak.pages.dev/tools/ip-subnet-calculator). Enter an address and prefix to see the network, broadcast, mask and usable range.

## Reading one subnet in full

Take 192.168.1.0/26. The host part is the last 6 bits, so there are 64 addresses.

**192.168.1.0/26**

|  | Value | Note |
| --- | --- | --- |
| Network address | 192.168.1.0 | First address, names the subnet |
| Usable hosts | .1 – .62 | 62 devices |
| Broadcast address | 192.168.1.63 | Last address, talks to all |

The subnet mask 255.255.255.192 is the same idea written in decimal: 26 ones followed by 6 zeros. The last number is 192 because the first two bits of the last byte are ones (128 + 64 = 192).

## Splitting a /24 into four /26 subnets

Say you have 192.168.1.0/24 and want four separate groups, such as staff, guests, cameras and servers. Borrow two bits from the host side and you get four /26 blocks of 64 addresses.

**192.168.1.0/24 split into four /26 blocks (last number of the address)**

|  | 0–63 | 64–127 | 128–191 | 192–255 |
| --- | --- | --- | --- | --- |
| The /24 | .0–.63 | .64–.127 | .128–.191 | .192–.255 |

*Each block has its own network and broadcast address, for example 192.168.1.64 and 192.168.1.127 for the second one.*

**How to size a subnet in four steps**

1. **Count the devices.** Include servers, phones, printers and room to grow.
2. **Add 2.** The network and broadcast addresses are not usable.
3. **Round up to a power of 2.** Subnet sizes are 4, 8, 16, 32, 64 and so on.
4. **Find the prefix.** Prefix = 32 minus the number of host bits. For 64 addresses, 6 host bits, so /26.

## Private ranges you will see everywhere

Three blocks are reserved for private use inside homes and companies. They are not routed on the public internet.

| Block | Range | Addresses | Often used for |
| --- | --- | --- | --- |
| 10.0.0.0/8 | 10.0.0.0 – 10.255.255.255 | 16,777,216 | Large companies and cloud networks |
| 172.16.0.0/12 | 172.16.0.0 – 172.31.255.255 | 1,048,576 | Medium networks and containers |
| 192.168.0.0/16 | 192.168.0.0 – 192.168.255.255 | 65,536 | Home routers and small offices |

## Common mistakes

- **Forgetting the two reserved addresses.** A /30 has 4 addresses but only 2 usable hosts, which is why it is used for links between two routers.
- **Choosing a subnet that is too tight.** A /27 holds 30 hosts. If you have 28 devices today, you have no room for growth.
- **Overlapping subnets.** 10.0.0.0/16 and 10.0.5.0/24 overlap, because the second sits inside the first. Overlaps cause routing trouble, especially when joining two networks by VPN.
- **Reading the mask as a number to add.** The mask is a pattern of ones and zeros. 255.255.255.192 is 26 ones, not a number you subtract.
- **Mixing it up with IPv6.** IPv6 uses 128 bits and prefix lengths like /64, but the idea of network bits and host bits is the same.

> **A shortcut for the last number:** In a /26 the block size is 64, so subnets start at 0, 64, 128 and 192. For a prefix that falls inside the last byte, block size = 256 minus the last number of the mask (256 − 192 = 64). If the address you are checking is 192.168.1.100/26, it belongs to the block that starts at 64.

## Frequently asked questions

### What does /24 mean in an IP address?

It means the first 24 bits are the network part and the last 8 bits are for hosts. That gives 256 addresses, of which 254 are usable.

### How many hosts are in a /26?

A /26 has 64 addresses and 62 usable hosts, because the first and last addresses are reserved.

### What is the subnet mask for /20?

255.255.240.0. It has 20 ones followed by 12 zeros and covers 4,096 addresses.

### What is a broadcast address?

It is the last address in a subnet. A message sent to it is delivered to every device in that subnet.

### Is a bigger prefix number a bigger network?

No, the opposite. A bigger prefix means more network bits and fewer host bits, so the subnet is smaller.

### Which IP ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They are for use inside private networks and are not routed on the public internet.

