
You are setting up a VLAN, a VPC, or a firewall rule, and the form wants a subnet mask. You know you need room for about 50 devices. Is that a /26 or a /25? And what is a /26 in dotted form again?
This page is the lookup table for that moment. Every IPv4 prefix from /16 to /32, with its subnet mask, wildcard mask, address count and usable hosts, followed by worked examples for the masks people search for most and the commands to find the mask on your own machine.
If you want the theory first, start with our subnetting guide and the CIDR explainer. If you just need the number, it is below.
The subnet mask table
| CIDR | Subnet mask | Wildcard mask | Addresses | Usable hosts | Size vs a /24 |
|---|---|---|---|---|---|
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 256 × /24 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 128 × /24 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 64 × /24 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 32 × /24 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 16 × /24 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 8 × /24 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 4 × /24 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 2 × /24 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 1 × /24 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 2 per /24 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 4 per /24 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 8 per /24 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 16 per /24 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 32 per /24 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 64 per /24 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (point-to-point) | 128 per /24 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (single host) | 256 per /24 |
How to read it:
- Addresses is the size of the block: 2 to the power of (32 minus the prefix).
- Usable hosts is addresses minus two, because the first address names the network and the last is the broadcast address. The exceptions are /31, which RFC 3021 allows on point-to-point links with both addresses usable, and /32, which identifies one host.
- Wildcard mask is the subnet mask inverted. Cisco ACLs and OSPF network statements use it, which is why it is also called a reverse subnet mask.
Quick answers for the common masks
/29 (255.255.255.248). 8 addresses, 6 usable. The standard size for a small block of public IPs from an ISP, or a tiny management segment. A /24 holds 32 of them.
/26 (255.255.255.192). 64 addresses, 62 usable. Four /26 networks fit in a /24, which makes it a common way to split one office range into departments or floors. There are 64 IPs in a /26.
/25 (255.255.255.128). 128 addresses, 126 usable. Half of a /24.
/23 (255.255.254.0). 512 addresses, 510 usable. Two /24 networks joined, useful when a single floor or Wi-Fi network outgrows 254 devices.
/22 (255.255.252.0). 1,024 addresses, 1,022 usable. Four /24s. A typical size for a campus Wi-Fi pool or a cloud subnet with room to grow.
/21 and /20 (255.255.248.0 and 255.255.240.0). 2,048 and 4,096 addresses. Common for VPC subnets and container networks that hand out many addresses.
/16 (255.255.0.0). 65,536 addresses. The size of AWS's default VPC (172.31.0.0/16), and the whole of 192.168.0.0/16.
Worked example: which mask fits 50 devices?
Find the smallest block whose usable hosts cover what you need, then leave some headroom.
- 50 devices need at least 50 usable addresses.
- A /27 gives 30 usable. Too small.
- A /26 gives 62 usable. It fits, with 12 spare.
- If the group will grow past 62, take a /25 (126 usable) now. Renumbering later costs more than a few unused addresses.
Worked example: the boundaries of a /26
Take 192.168.10.64/26. A /26 is 64 addresses long, so /26 networks start at multiples of 64 in the last octet: .0, .64, .128 and .192.
- Network address: 192.168.10.64
- First usable host: 192.168.10.65
- Last usable host: 192.168.10.126
- Broadcast address: 192.168.10.127
The next /26 starts at 192.168.10.128.
Worked example: the boundaries of a /23
Take 10.20.0.0/23. A /23 covers two /24s, so it must start on an even third octet.
- Network address: 10.20.0.0
- First usable host: 10.20.0.1
- Last usable host: 10.20.1.254
- Broadcast address: 10.20.1.255
Note that 10.20.0.255 and 10.20.1.0 are ordinary host addresses inside a /23. Some older software treats them as invalid, which is worth knowing when a single host with one of them misbehaves.
Default subnet masks and private ranges
Classful addressing is long retired, but the old defaults still show up in documentation and setup screens.
| Class | Prefix | Default mask | Private range (RFC 1918) |
|---|---|---|---|
| Class A | /8 | 255.0.0.0 | 10.0.0.0/8 |
| Class B | /16 | 255.255.0.0 | 172.16.0.0/12 (a /12 made of 16 Class B blocks) |
| Class C | /24 | 255.255.255.0 | 192.168.0.0/16 (256 Class C blocks) |
The Class C subnet mask, 255.255.255.0, is still the default on most home routers, which is why so many home networks are 192.168.0.0/24 or 192.168.1.0/24.
How to find your subnet mask
Windows. Open Command Prompt and run:
ipconfig
Look for Subnet Mask under your active adapter.
macOS. In Terminal, for the Wi-Fi interface (usually en0):
ipconfig getoption en0 subnet_mask
Linux. Run:
ip -4 addr show
Linux prints the prefix length rather than the dotted mask, for example inet 192.168.1.42/24. Use the table above to convert it.
When the subnet math stops being the problem
Subnet masks are easy to look up. The hard part arrives when separate networks need to talk: two offices that both chose 192.168.1.0/24, a cloud VPC that overlaps a home lab, or a device behind someone else's router. Then the work becomes NAT rules, VPN tunnels and careful renumbering. Our guide to fixing IP address overlaps walks through the manual route.
noBGP takes a different approach. Each machine runs the noBGP agent and joins a private noBGP network, and machines in the same network reach each other by name. Their local subnets can overlap, because nothing routes between those subnets directly. You keep whatever addressing each site already uses.
Frequently asked questions
What is the subnet mask for /24?
255.255.255.0. It gives 256 addresses and 254 usable hosts.
How many usable hosts are in a /29?
Six. A /29 has 8 addresses, minus the network and broadcast addresses.
What is a reverse subnet mask?
Another name for the wildcard mask: the subnet mask with every bit flipped. The wildcard for 255.255.255.0 is 0.0.0.255.
Can I use a /31?
Yes, on point-to-point links between two routers, as defined in RFC 3021. Both addresses are usable because a two-host link needs no broadcast address. Avoid it on ordinary LANs.
What is the difference between a subnet mask and CIDR notation?
They describe the same thing. 255.255.255.192 and /26 both say the first 26 bits are the network portion. CIDR is shorter and is what cloud consoles and most modern tools use.
Keep the table, skip the renumbering
Bookmark this page for the next VLAN or VPC. When the question changes from "how big is this subnet" to "how do these networks reach each other", see how noBGP connects machines across networks without route tables or VPN tunnels.