MikroTik field tools · Addressing expertise · free · in-browser

The subnet calculator, visual

Every subnet calculator I've used takes a prefix and prints a table of mask, range and hosts, and none of them show where those numbers come from. When I learned subnetting, I could do the arithmetic long before I could picture the boundary moving. Here you drag one cut across a single /24 and watch it split into named subnets in real time. Then you can open the last octet as eight place-value bits, with the bits left of your cut counting subnets and the bits right of it counting hosts. It's the same math as any calculator, and you watch it happen instead of trusting the output.

One network. 254 hosts. · /24

The subnet lab — drag the cut and watch hosts trade for subnets. A subnet is a place, not a list.

Drag the cut and watch one network split into named, addressable slices — the same lab, now yours to share.

How to read a subnet by hand

Read the prefix

The number after the slash — /24, /26, /30 — is a bit-count, not a size category. It tells you how many of the 32 bits are fixed as the network portion. Everything after that number is free for hosts.

The cut is the boundary

Whether you drag it, type a prefix, or write a dotted-decimal mask, you're placing the same single boundary across the 32 bits. Move it right (a bigger prefix number) and you shrink each block while making more of them; move it left and you get the opposite trade.

Borrowed bits become subnets

Every bit you move the cut past — taken from the host side, given to the network side — doubles the subnet count. Borrow b bits from a /24 and you get 2^b subnets: 1 bit → 2, 2 bits → 4, 3 bits → 8, and so on.

Host bits become addresses

Whatever bits remain right of the cut set the size of each subnet: h host bits give 2^h addresses per block. That count includes the two walls, so it overstates usable hosts by exactly two — until the next step.

Network and broadcast are the walls, not hosts

The first address in each block (all host bits 0) names the network; the last (all host bits 1) is the broadcast address that reaches every host in it. Neither is assignable, which is why usable hosts = 2^h − 2.

Know the /31 exception

At exactly 1 host bit, RFC 3021 drops the network/broadcast reservation: both of the /31's two addresses are usable, purpose-built for point-to-point links where there's no broadcast domain to reserve one for.

The questions people actually search

What is a subnet mask, really?

It's the same boundary as the prefix, just written a different way. A /26 and 255.255.255.192 mean exactly one thing: the first 26 bits are fixed (the network), the remaining 6 bits are free (the hosts). The mask is dotted-decimal notation for a run of 1-bits followed by a run of 0-bits — nothing more. If you can read the prefix, you already know the mask; they're the same cut.

Why does a /26 give 62 hosts, not 64?

A /26 leaves 6 host bits, and 6 bits count 2^6 = 64 possible values — but two of those 64 addresses are reserved as walls, not hosts: the all-zeros value is the network address (identifies the block itself) and the all-ones value is the broadcast address (reaches every host in it). 64 − 2 = 62 usable. The same subtraction applies at every prefix except /31 and /32.

Is .0 always the network address?

No — only when it's the first address in its block. .0 is the network address of 192.168.1.0/24 because /24 blocks start on a multiple of 256. But inside a /23 block like 192.168.6.0/23, the address 192.168.7.0 is an ordinary host, not a network address — the block started at .6.0, not .7.0. What matters is position in the block, not the digit.

Is .255 always the broadcast address?

No — same rule as .0, mirrored. .255 is broadcast only when it's the last address in its block. 192.168.1.255 is broadcast for 192.168.1.0/24. But 10.7.0.255 is a normal, assignable host inside 10.7.0.0/23, because that block runs from 10.7.0.0 to 10.7.1.255 — .255 lands in the middle, not at the end.

What is a /31 and why doesn't it have a broadcast address?

A /31 leaves exactly 1 host bit, so the block has only 2 addresses total. RFC 3021 made both of them usable for point-to-point links — no network address, no broadcast address reserved, because a link with exactly two ends has no need for either. A /32 goes one step further: zero host bits, a single address, used to identify one specific host or route.

How many subnets does a /26 make out of a /24?

Four. Going from /24 to /26 borrows 2 bits from the host portion for the network portion, and 2 borrowed bits count 2^2 = 4 subnets. Each of those four /26 subnets holds 64 addresses (2^6, since 6 host bits remain) minus the 2 reserved, so 4 subnets × 62 usable hosts each.

What's the actual difference between a prefix and a subnet mask?

None mathematically — only the notation differs. The prefix /26 is a bit-count: 26 fixed bits. The mask 255.255.255.192 is the same 26 fixed bits (11111111.11111111.11111111.11000000) written as four dotted-decimal octets. Every prefix has exactly one corresponding mask and vice versa; picking one over the other is a style choice most vendors and RFCs make for you.

Why subnet at all instead of leaving one big network?

A single flat network means every device shares one broadcast domain and one failure domain — one loop, one broadcast storm, or one misconfigured host affects everyone. Cutting a /24 into /26s or /27s gives you smaller, separately-routable blocks: a broadcast on one subnet never crosses into another, and you can assign, firewall, and troubleshoot each slice independently.

How do I read a subnet by hand without a calculator?

Subtract the prefix length from 32 to get the host-bit count, h. The block size is 2^h addresses, and every block starts on a multiple of that size. Usable hosts = 2^h − 2; the network address is the first address in the block (all host bits 0) and the broadcast is the last (all host bits 1). Once you have the block size, you count to its edges.

This lab also runs on the addressing expertise page. It has a page of its own here so you can send someone a link to the lab alone. Read IP addressing & subnetting — where the cut lives.

Bring me the addressing plan that doesn’t add up

Also on the bench: RouterBOARD reset simulator, Recursive failover simulator, Interactive packet-flow diagram, Diffie-Hellman key-exchange visualizer