You see 10.0.0.0/24 on a config and need to know: how many addresses is that? Where does the range start and end? What's the subnet mask? Is 10.0.0.5 inside the subnet?
You can do the math in your head if you do it daily. If you don't, a subnet calculator answers in under a second and never makes a bit-counting error. This guide covers the workflow and the maths behind it, so you understand what the calculator is actually telling you.
What CIDR notation means
CIDR (Classless Inter-Domain Routing) notation is the standard way to describe an IPv4 subnet: an address, a slash, and a number.
10.0.0.0/24
The number after the slash is the prefix length, how many of the IP's 32 bits are the network portion. The remaining bits are the host portion.
For /24:
- 24 bits = network
- 8 bits = host (32 − 24 = 8)
- 2^8 = 256 addresses total
- First address = network address
- Last address = broadcast
- 254 usable for hosts
Memorise that one pattern and the rest of subnetting follows.
Step 1. Open the subnet calculator
Open the Subnet Calculator tool. One field: the CIDR.
Step 2. Enter the CIDR
Type the full CIDR including the slash and prefix:
10.0.0.0/24
192.168.1.0/26
172.16.0.0/12
A few things to note:
- The IP portion doesn't have to be the network address.
10.0.0.5/24is treated as "an address within the 10.0.0.0/24 network". The calculator will compute the actual network address (10.0.0.0) from your input. - IPv4 only. IPv6 subnet maths is the same concept but the calculator handles 32-bit addresses.
- The prefix can be anywhere from
/0(the whole internet, all addresses) to/32(a single address).
Step 3. Read the result
Click Calculate. The result table fills in:
| Field | Example for 10.0.0.0/24 | What it means |
|---|---|---|
| Network address | 10.0.0.0 | The first address. All host bits are zero. |
| Broadcast address | 10.0.0.255 | The last address. All host bits are one. |
| First usable host | 10.0.0.1 | Network address + 1. The first IP you can assign to a host. |
| Last usable host | 10.0.0.254 | Broadcast − 1. The last IP you can assign. |
| Subnet mask | 255.255.255.0 | The same as /24, written in dotted-decimal. |
| Wildcard | 0.0.0.255 | The inverse of the mask. Used in Cisco ACLs and OSPF area definitions. |
| Total addresses | 256 | 2^(host bits). |
| Usable hosts | 254 | Total − 2 (network and broadcast addresses are reserved). |
| Prefix length | /24 | The slash notation. |
| Binary mask | 11111111.11111111.11111111.00000000 | The mask in binary, useful when teaching subnetting. |
Step 4. Verify your understanding
A few quick sanity checks the calculator helps with:
Is this IP inside the subnet?
For 10.0.0.0/24, anything starting 10.0.0. is inside. 10.0.0.5 ✓. 10.0.1.5 ✗.
For 192.168.0.0/22, the network covers 192.168.0.0 through 192.168.3.255 (1,024 addresses). 192.168.2.5 ✓. 192.168.4.5 ✗.
If you're unsure, compute the first and last usable host range and check whether your IP is in it.
Does my CIDR fit my requirements?
Working backwards from a count of needed hosts:
- 250 hosts →
/24(254 usable) - 60 hosts →
/26(62 usable) - 30 hosts →
/27(30 usable) - 14 hosts →
/28(14 usable) - 2 hosts (point-to-point link) →
/30(2 usable) or/31(RFC 3021, 2 usable on point-to-point only)
Always add headroom. A /27 (30 hosts) for a network you expect to grow to 28 is going to bite you in six months.
Are these subnets overlapping?
You can't tell from CIDR notation alone whether two ranges overlap, but the calculator's "first/last usable" output makes it obvious. If 10.0.0.0/22 covers 10.0.0.0 to 10.0.3.255, and you also have 10.0.2.0/24 (which covers 10.0.2.0 to 10.0.2.255), the second is a subset of the first. They overlap. Routing will become non-deterministic.
Step 5. Match the maths to real config
When you write a firewall rule, a Cisco ACL, or a routing table, you'll use one of these forms:
- CIDR:
10.0.0.0/24- concise, modern, most ops tools accept it. - Subnet mask:
10.0.0.0 255.255.255.0- older syntax, still common in Windows and some Cisco configs. - Wildcard mask:
10.0.0.0 0.0.0.255- Cisco ACLs use this. It's the bitwise inverse of the subnet mask.
The calculator shows all three so you can copy whichever the target system expects. The Binary mask field is useful when teaching or debugging. You can visually count the 1s and 0s.
Common subnet calculation mistakes
Subnet boundaries don't align. A /24 must start at an address ending in .0. There's no such thing as 10.0.0.128/24. The math doesn't work. If you need a /24 that starts at .128, you actually want a /25 (10.0.0.128/25, 128 addresses, half of a /24).
Off-by-two on host counts. Total addresses minus two (for network and broadcast) equals usable hosts, except for /31 and /32:
/31(RFC 3021) - both addresses are usable on point-to-point links. No broadcast./32- single address. Used for loopback interfaces, anycast points, or specific host routes.
Forgetting class boundaries don't exist anymore. Classful addressing (/8 for Class A, /16 for Class B, /24 for Class C) is dead. Has been since CIDR introduced in 1993. You can subnet any address with any valid prefix.
Off-by-one on broadcast. The broadcast address is the last address in the range, not "the network address plus the total count." For 10.0.0.0/24, broadcast is 10.0.0.255, not 10.0.1.0.
Quick reference
Memorise these prefix lengths:
| Prefix | Total addresses | Usable hosts | Typical use |
|---|---|---|---|
| /30 | 4 | 2 | Point-to-point router links |
| /29 | 8 | 6 | Small VLAN, IoT cluster |
| /28 | 16 | 14 | Small office subnet |
| /27 | 32 | 30 | Floor of a building |
| /26 | 64 | 62 | Mid-sized department |
| /24 | 256 | 254 | Classic office subnet |
| /22 | 1,024 | 1,022 | Branch office |
| /16 | 65,536 | 65,534 | Whole datacenter |
Pattern: each step down doubles total addresses. Each step up halves.
Related tools
- DNS Lookup - once you've designed a subnet, set up reverse DNS for it.
- Hash Generator - unrelated, but useful when generating subnet-related identifiers.
There's a longer field-notes piece on subnetting covering the bigger-picture design considerations.
TL;DR
- Open the Subnet Calculator.
- Type the CIDR (e.g.
10.0.0.0/24). - Read Network, Broadcast, First / Last usable host, Subnet mask, Wildcard, Total / Usable.
- For a quick "is this IP inside the subnet" check, the IP must fall between First usable and Last usable.
- Subnet boundaries must align with the prefix. A
/24starts at.0. A/25starts at.0or.128. A/26starts at.0,.64,.128, or.192. And so on, halving each time.
