What your result means
An IPv4 address is 32 bits, and a prefix says how many of those bits name the network rather than the machine. Everything left over is host space. The network address is that block with every host bit set to zero, and the broadcast address is the same block with every host bit set to one.
Neither of those two can be given to a machine, which is why usable hosts is always two fewer than the block size. The subnet mask is the same prefix written as four octets, and the wildcard mask is that inverted — the form Cisco access lists and OSPF statements ask for.
Why this one is different
Network and broadcast addresses, the usable range between them, the subnet mask and its wildcard all come from one prefix, and the subnets it divides into are listed as rows you can pick through. The wildcard mask matters because access lists want that form, and working it out by hand is where the mistakes happen.
How it works
Subnetting is borrowing. You take bits from the host part and promote them to network duty, and every bit you borrow doubles the number of networks while halving the size of each one. Borrow four bits from a /16 and you have sixteen /20s; borrow a fifth and you have thirty-two /21s. That trade is the whole of it, and it is why the bit strip at the top of the simulator is the honest picture of what is happening.
The arithmetic is pure bit masking. The mask for a prefix is that many ones followed by zeros; ANDing an address with it clears the host bits and leaves the network address; ORing with the inverted mask sets them all and gives the broadcast. Subnet n of the split starts n block-sizes above the parent, and a block size is two to the power of the remaining host bits. Everything on this page comes out of those four operations, computed in your browser.
How to use this simulator
- Type the base address of the block you have been given — it is snapped to its network boundary automatically.
- Set the network prefix you actually own, then drag split into to the size you need.
- Watch the borrowed bits light up amber in the strip, and the parent bar divide underneath.
- Step through the subnets, or click any row in the table, to see that one expanded with its usable range.
- Use share calculation to hand someone the exact split — the address, both prefixes and the selected subnet all travel in the link.
Formula
network address: net = address AND mask
broadcast: bcast = net OR ( NOT mask )
block size: size = 2³²⁻ˢ
subnets created: count = 2⁽ˢ⁻ᵖ⁾
nth subnet: netₙ = base + n × size
usable hosts: size − 2
- p — the prefix of the parent block, the network bits you started with
- s — the prefix you are splitting to; s minus p is the number of bits borrowed
- size — total addresses in one subnet, network and broadcast included
- n — which subnet, counted from zero at the base address
Example calculation
You are handed 10.0.0.0/16 and asked to carve it into /20 networks. What is the third one?
block size: 2³²⁻²⁰ = 4,096 addresses
subnet 3 (n=2): 10.0.0.0 + 2 × 4096 = 10.0.32.0/20
broadcast: 10.0.32.0 + 4096 − 1 = 10.0.47.255
usable range: 10.0.32.1 – 10.0.47.254 (4,094 hosts)
mask / wildcard: 255.255.240.0 / 0.0.15.255
Those are the simulator's starting values and the panel shows exactly these figures. The jump of 32 in the third octet is the giveaway: with four bits borrowed the subnets step in sixteens, so they land on .0, .16, .32, .48 and so on.
Prefix cheat sheet
The four prefixes that come up most in practice. A /30 was the traditional choice for a router-to-router link and wastes half its addresses on network and broadcast; RFC 3021 made the /31 legal for that job and this tool counts it as two usable hosts.
Frequently asked questions
Why does a /24 have 254 usable hosts and not 256?
A /24 leaves 8 host bits, which is 256 addresses, but two of them are reserved. The all-zeros host address names the network itself and the all-ones host address is the broadcast address for that network, so neither can be assigned to a machine. That leaves 254. The same subtraction applies at every prefix length from /0 to /30.
What is a wildcard mask for?
It is the subnet mask with every bit inverted, and it is what Cisco access control lists and OSPF network statements expect instead of a mask. A /20 has the mask 255.255.240.0 and the wildcard 0.0.15.255. A zero in a wildcard means the bit must match; a one means the bit is free to be anything.
Can a subnet ever have only two addresses?
Yes. A /31 has exactly two addresses and RFC 3021 allows both to be used as hosts on a point-to-point link, because a link with only two ends has no need of a broadcast address. This calculator follows that rule and reports two usable hosts for a /31. A /32 is a single address, used for loopbacks and host routes.
Related tools
Prefixes, hosts and splits in numbers
Every row uses the page's arithmetic: block size 232 − prefix, usable hosts size − 2 (a /31 counts both addresses and a /32 counts one), mask = 232 − 232 − prefix and wildcard = NOT mask.
| Prefix | Addresses | Usable hosts | Subnet mask | Wildcard mask |
|---|---|---|---|---|
| /8 | 16,777,216 | 16,777,214 | 255.0.0.0 | 0.255.255.255 |
| /16 | 65,536 | 65,534 | 255.255.0.0 | 0.0.255.255 |
| /20 | 4,096 | 4,094 | 255.255.240.0 | 0.0.15.255 |
| /22 | 1,024 | 1,022 | 255.255.252.0 | 0.0.3.255 |
| /24 | 256 | 254 | 255.255.255.0 | 0.0.0.255 |
| /25 | 128 | 126 | 255.255.255.128 | 0.0.0.127 |
| /26 | 64 | 62 | 255.255.255.192 | 0.0.0.63 |
| /27 | 32 | 30 | 255.255.255.224 | 0.0.0.31 |
| /28 | 16 | 14 | 255.255.255.240 | 0.0.0.15 |
| /29 | 8 | 6 | 255.255.255.248 | 0.0.0.7 |
| /30 | 4 | 2 | 255.255.255.252 | 0.0.0.3 |
| /31 | 2 | 2 | 255.255.255.254 | 0.0.0.1 |
| /32 | 1 | 1 | 255.255.255.255 | 0.0.0.0 |
Each bit borrowed halves the block and doubles the subnets. A /24 holds 254 usable hosts, a /25 126 and a /26 62. The jump from /30 to /31 is where the rule changes: a /30 has 2 usable hosts out of 4 addresses, and a /31 has 2 usable out of 2.
The cost of splitting
| Split into | Subnets | Addresses each | Usable each | Usable in total | Lost to the split |
|---|---|---|---|---|---|
| /25 | 2 | 128 | 126 | 252 | 2 |
| /26 | 4 | 64 | 62 | 248 | 6 |
| /27 | 8 | 32 | 30 | 240 | 14 |
| /28 | 16 | 16 | 14 | 224 | 30 |
| /29 | 32 | 8 | 6 | 192 | 62 |
| /30 | 64 | 4 | 2 | 128 | 126 |
Every subnet loses its network and broadcast addresses, so splitting costs hosts. Four /26 subnets give 248 usable hosts against 254 for the single /24, six fewer. Cutting a /24 into /30 links leaves 128 usable addresses from 254, because 64 subnets each lose two.
Walking a split
| Subnet | Network | Usable range | Broadcast |
|---|---|---|---|
| #1 | 10.0.0.0/20 | 10.0.0.1 – 10.0.15.254 | 10.0.15.255 |
| #2 | 10.0.16.0/20 | 10.0.16.1 – 10.0.31.254 | 10.0.31.255 |
| #3 | 10.0.32.0/20 | 10.0.32.1 – 10.0.47.254 | 10.0.47.255 |
| #4 | 10.0.48.0/20 | 10.0.48.1 – 10.0.63.254 | 10.0.63.255 |
| #5 | 10.0.64.0/20 | 10.0.64.1 – 10.0.79.254 | 10.0.79.255 |
| #6 | 10.0.80.0/20 | 10.0.80.1 – 10.0.95.254 | 10.0.95.255 |
The page's default is 10.0.0.0/16 into /20 networks. Each /20 is 4,096 addresses and subnet 3 is 10.0.32.0/20, with a broadcast of 10.0.47.255 and 4,094 usable hosts. The step of 16 in the third octet follows from four borrowed bits.
| Subnet | Network | Usable range | Broadcast | Usable hosts |
|---|---|---|---|---|
| #1 | 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 | 62 |
| #2 | 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 | 62 |
| #3 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 | 62 |
| #4 | 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 | 62 |
The four /26 subnets of 192.168.1.0/24 start at .0, .64, .128 and .192. Their usable ranges leave out each subnet's first and last address, which is why the second one starts at .65 and not .64.
Six mistakes when subnetting
- Giving out the network or broadcast address. In every subnet except a /31 or /32 the first and last addresses are reserved. In 192.168.1.64/26, .64 and .127 cannot be assigned to a machine.
- Counting 2n hosts. A /24 is 256 addresses and 254 hosts. The page reports usable hosts, and the difference is two at every prefix except /31 and /32.
- Forgetting what splitting costs. Smaller subnets waste more in proportion. A /30 gives away half its addresses to network and broadcast, which is why a /31 is allowed for point-to-point links.
- Mixing up mask and wildcard. A /20 mask is 255.255.240.0 and its wildcard is 0.0.15.255. Access lists ask for the wildcard, and typing the mask there reverses the meaning.
- Using an address that is not on a boundary. The page snaps the address to its network boundary. 10.0.20.7/20 is in 10.0.16.0/20, not 10.0.20.0.
- Expecting IPv6 to work the same way. The page covers IPv4 only. IPv6 uses the same prefix idea over 128 bits, but its host counts and conventions differ.
Embed this calculator on your site
You can put this tool on your own page, blog or lesson site for free. Copy the code below and paste it into your page. Please keep the credit line under the tool. The embedded version shows no ads, loads no analytics and sets no cookies.
<iframe src="https://toolcorner.net/embed/subnet-cidr-visualiser" title="Subnet Calculator & CIDR Visualiser" width="100%" height="1620" style="border:0;max-width:760px" loading="lazy"></iframe> <p style="font-size:13px">Calculator by <a href="https://toolcorner.net/labs/subnet-cidr-visualiser">Tool Corner</a></p>
Cite this page
If you use this tool in a report, assignment or article, you can cite it like this.
Tool Corner. (2026). Subnet Calculator & CIDR Visualiser [Online calculator]. https://toolcorner.net/labs/subnet-cidr-visualiser Subnet Calculator & CIDR Visualiser. Tool Corner. https://toolcorner.net/labs/subnet-cidr-visualiser. Retrieved [date].
For teachers
A printable classroom activity for this simulator, with a student sheet and an answer key: open the Subnet Calculator & CIDR Visualiser activity.
Assumptions & limitations
- IPv4 only. IPv6 uses the same prefix idea over 128 bits, but none of the host-count arithmetic here transfers, so it is not offered rather than offered wrongly.
- Fixed-length subnetting. The split divides a block into equal parts. Variable-length subnetting, where different departments get different sizes out of one block, means applying this repeatedly to the leftovers.
- The split is capped at 4,096 subnets. Twelve borrowed bits is the limit, so that the table and the address bar stay readable rather than trying to render a million rows.
- No address-type warnings. The tool will happily subnet multicast or reserved space; it does not check your block against the IANA special-purpose registry.
- Educational and planning use. Check any split against your own hardware and addressing policy before it goes near production.
Further reading
Our guide to subnetting by hand covers the block-size method, the magic-number shortcut and a full VLSM split — the paper skills this visualiser is showing you. For the other place bit-level thinking trips people up, see encoding versus hashing.
Sources & references
The addressing rules, the host-count convention and the /31 exception all come from the primary standards rather than second-hand summaries.
- RFC 4632 — Classless Inter-Domain Routing, the prefix notation this tool is built on
- RFC 3021 — using 31-bit prefixes on point-to-point links, the reason a /31 reports two usable hosts
- RFC 1918 — the private address blocks 10/8, 172.16/12 and 192.168/16 that the examples here use
- IANA IPv4 Special-Purpose Address Registry — the ranges that are reserved rather than assignable