Subnet calculator — CIDR, masks and hosts cheat sheet
A subnet calculator turns an IP address and a CIDR prefix like /24 into everything you need: the subnet mask, the network and broadcast addresses, the usable host range and the host count. Carbide's free subnet calculator does that math instantly in your browser — nothing is sent to any server.
This post is the cheat sheet to keep alongside it: what CIDR notation means in plain words, a /8-to-/30 reference table, and a worked example you can solve by hand — the exact skill CCNA and IT exams test.
What does CIDR notation like /24 mean?
Every IPv4 address is 32 bits long. CIDR notation — the slash number in 192.168.1.0/24 — simply says how many of those bits, counting from the left, name the network. In a /24, the first 24 bits identify the network and the remaining 8 bits are left for hosts; in a /16, only 16 bits name the network, leaving 16 for hosts — a much bigger block. The rule of thumb: the bigger the number after the slash, the smaller the network.
Each prefix maps to exactly one subnet mask: /24 is 255.255.255.0 and /16 is 255.255.0.0 — a mask is just the prefix written as four octets, with every network bit set to 1. So "/24" and "mask 255.255.255.0" are the same statement in two dialects. Type any IP with a prefix into the subnet calculator and it shows the mask, the ranges and the counts side by side as you type.
The CIDR cheat sheet — masks and host counts from /8 to /30
One formula generates the whole table: usable hosts = 2^(32 − prefix) − 2. You subtract 2 because the first address of every subnet is the network address and the last is the broadcast — neither can be assigned to a device. Here are the prefixes you will actually meet, from ISP-scale blocks down to the tiny /30 links between routers:
- /8 — mask 255.0.0.0 — 16,777,214 usable hosts (classic class A scale).
- /12 — mask 255.240.0.0 — 1,048,574 hosts (the private 172.16.0.0/12 range).
- /16 — mask 255.255.0.0 — 65,534 hosts (campus scale; 192.168.0.0/16 is private).
- /20 — mask 255.255.240.0 — 4,094 hosts; /22 — mask 255.255.252.0 — 1,022 hosts.
- /24 — mask 255.255.255.0 — 254 hosts (the everyday home and office LAN).
- /25 — 126 hosts; /26 — 62 hosts; /27 — 30 hosts; /28 — 14 hosts.
- /29 — mask 255.255.255.248 — 6 hosts; /30 — mask 255.255.255.252 — 2 hosts (point-to-point router links).
How to calculate a subnet by hand (worked example)
Take 192.168.10.130/26 — an exam classic. You can solve it in four steps with no calculator:
- Find the mask: /26 → 255.255.255.192 (26 ones = three full octets plus 2 bits).
- Find the block size in the interesting octet: 256 − 192 = 64, so subnets start at .0, .64, .128 and .192.
- Place the address: 130 falls between 128 and 192, so the network address is 192.168.10.128.
- Derive the rest: broadcast = next block − 1 = 192.168.10.191; usable range = .129 to .190; hosts = 62.
Network address vs broadcast address vs usable range
Three addresses trip up beginners more than anything else in subnetting. The network address is the first address of the block — all host bits set to 0. It names the subnet itself in routing tables and can never be assigned to a device. The broadcast address is the last — all host bits set to 1; a packet sent there reaches every host on the subnet, so it cannot belong to one machine either. Everything in between is the usable range, and by convention the router (default gateway) usually takes the first usable address.
The classic exam trap: 192.168.10.191 from the example above looks like an ordinary address, but under /26 it is a broadcast — assign it to a PC and the network misbehaves. This is exactly why the subnet calculator labels every value explicitly — network, broadcast, first usable, last usable — instead of leaving you to infer which is which.
Subnetting on your phone — for CCNA and IT students
Subnetting practice happens on the bus, between lectures and in the exam-week panic — not at a desk. The subnet calculator is built for that: the math runs entirely client-side in your browser, nothing is sent to a server, results update as you type, and there is no sign-up and no install. It works the same on a phone as on a laptop, in English and Arabic.
It also slots into a full student toolkit. IP Info shows your public address and ISP — that data comes from live lookup services, and what your IP reveals explains the numbers. DNS Lookup resolves A, MX and TXT records (walkthrough in the DNS and WHOIS guide), and Ping measures latency and jitter (see the speed test guide). The network tools guide ties the whole kit together.
Frequently asked questions
How many usable hosts are in a /24?
254. A /24 has 8 host bits, giving 2^8 = 256 addresses; subtract the network address and the broadcast address and 254 remain for devices. That is why a typical home router hands out addresses like 192.168.1.2 through 192.168.1.254.
What is a wildcard mask?
The inverse of a subnet mask, written with the bits flipped: a /24 mask of 255.255.255.0 becomes a wildcard of 0.0.0.255. Cisco ACLs and OSPF network statements use wildcards instead of masks — the quick trick is to subtract each mask octet from 255.
Does the subnet calculator work for IPv6?
The calculator focuses on IPv4, which is what subnetting exams and everyday LAN planning use. IPv6 works differently: a standard LAN is simply a /64, there is no broadcast address, and host-count math is rarely needed in practice.
Is my IP address uploaded when I use the subnet calculator?
No. The subnet calculator is pure client-side math — the page loads once and every calculation happens on your own device. The address you type is never sent anywhere, so practicing with real company addresses is safe.
Is the subnet calculator free? Are there limits?
Yes, completely free — no sign-up, no daily cap and no feature paywall. Because the calculation runs in your browser, there is no server cost to recover, so there is nothing to limit.
Keep the cheat sheet for the exam hall and the subnet calculator for everywhere else: solve by hand first, verify in the browser second — free, instant and private. When a question goes beyond subnets, the network tools guide covers the rest of the kit.