What the slash actually means
Everything on this page follows from one idea. An address is a string of bits — 32 of them in
IPv4, 128 in IPv6 — and a prefix length says how many of those bits identify the network.
Whatever is left identifies a host inside it. In 192.168.1.10/24 the first
24 bits are the network and the last 8 are the host, which is why that network holds 256
addresses and why every address from 192.168.1.0 to 192.168.1.255 belongs
to it.
This notation replaced the old system of address classes in 1993, and the class system is worth
mentioning only because its vocabulary survives in places it should not. There is no such thing as
a "class C network" any more; there are prefixes, and a prefix can be any length. The persistence
of the habit is why so many people assume every network is a /24 and are then
surprised by a /22.
Two things follow immediately, and they explain most subnetting mistakes:
- Every prefix is a power of two, aligned to itself. A
/26holds 64 addresses and can only start at a multiple of 64. There is no such network as192.168.1.50/26— that address is inside192.168.1.0/26, and the calculator will say so. - A longer prefix means a smaller network. A
/25is half a/24, not double it. The number counts fixed bits, not size, and the inversion trips up nearly everyone at first.
The fields, and what each one is good for
- Network address
- The first address in the block, with all host bits zero. It names the network rather than any machine on it, which is why it is not assigned to a device on ordinary IPv4 subnets.
- Netmask and wildcard mask
- Two ways of writing the same prefix. The netmask (
255.255.255.0) is what an operating system asks for; the wildcard mask (0.0.0.255) is its bitwise inverse and is what Cisco access lists and some routing configurations expect. Confusing the two produces a rule that silently matches the wrong traffic — which is worse than a rule that fails. - Broadcast address
- The last address, all host bits set. Traffic sent to it goes to every host on the segment. It exists in IPv4 only; IPv6 removed broadcast entirely and uses multicast groups instead.
- First and last usable host
- The range you can actually assign — everything between network and broadcast. In practice one more is taken by the router, so the count of addresses available to your machines is usually two fewer than the arithmetic suggests, then one fewer again.
- Host count
- 2 raised to the number of host bits, minus the network and broadcast addresses. The subtraction is where the exceptions live, immediately below.
- Binary form
- Worth looking at once. Seeing the prefix boundary land inside an octet is what makes subnetting stop being a memorised table and start being obvious.
The two exceptions to "minus two"
A /31 has no usable hosts at all by the standard arithmetic — two addresses, both
consumed by network and broadcast. Since 2000 it has nevertheless been legitimate and normal to
use a /31 on a point-to-point link between two routers, where both addresses are
assigned and the concepts of network and broadcast are meaningless because there are exactly two
participants. This saves two addresses per link, which across a large network is a substantial
amount of increasingly expensive IPv4 space.
A /32 is a single address: one host, no network, no broadcast. You will meet it as
a loopback address on a router, in a firewall rule that matches exactly one machine, and in
routing tables as the most specific possible route.
Ranges you should recognise on sight
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16- Private space. Reusable inside any network, never routed across the internet. Note the middle one carefully: it is
172.16through172.31, not all of172.x— a boundary that has caused a great many accidental collisions. 100.64.0.0/10- Shared address space for carrier-grade NAT. If your router reports an address in this range on its outside interface, you are behind your provider's NAT and no incoming connection will reach you — which is the answer to a large share of "why can I not open a port" questions.
169.254.0.0/16- Link-local, self-assigned when DHCP fails. An address here almost always means "I could not reach a DHCP server", and diagnosing anything else before fixing that is wasted effort.
127.0.0.0/8- Loopback. The whole block, not just
127.0.0.1— the entire range never leaves the machine. 192.0.2.0/24,198.51.100.0/24,203.0.113.0/24- Reserved for documentation and examples. Use these when writing instructions instead of inventing an address that belongs to somebody real.
Splitting a network without making a mess
Dividing a block is the calculator's main job. Each extra prefix bit halves the network: a
/24 becomes two /25s, four /26s, eight /27s.
The rule that keeps the result sane is that every subnet must start on its own boundary — a
/26 at a multiple of 64, a /28 at a multiple of 16.
Where people go wrong is sizing. Allocate for what a segment will hold in a few years, not what
it holds today, but resist the reflex of giving everything a /24 because it is
familiar: a point-to-point link needs two addresses, a management network for a dozen switches does
not need 254, and space handed out generously at the start is what forces a painful renumbering
later. Use variable sizes deliberately — a /30 or /31 for links, a
/28 for a small server segment, a /24 where users actually live.
And check for overlap before you commit. Two subnets overlap whenever the shorter prefix contains the longer one, which is easy to miss when the numbers are written in decimal and obvious the moment you look at the binary form. An overlap does not announce itself; it produces traffic that reaches its destination sometimes.
IPv6 arithmetic is a different habit
The mathematics is identical and the instincts are not, because IPv6 removes the reason to be frugal. The rules that matter in practice:
- A
/64is one subnet, always. Not a recommendation — automatic address configuration is built around a 64-bit interface identifier, and a longer prefix on a normal segment breaks it. Do not subnet below /64 to "save" addresses; there is nothing to save. - A single
/64holds 18 quintillion addresses. Host counts stop being a meaningful field. Nobody fills a subnet; they organise them. - Sites get a
/48or a/56from their provider. That is 65,536 or 256 separate/64subnets to hand out internally — enough that the design question becomes which numbering scheme is readable, not how to fit. - No broadcast address exists. The last address in an IPv6 subnet is an ordinary usable address. Multicast groups do the job broadcast used to.
Once a network is planned, the useful next step is checking that it actually works over both protocols — that is what the IPv6 test answers from a client's point of view, and what a DNS lookup tells you about whether names publish the AAAA records to make it reachable at all.
Nothing you type here leaves your browser
The arithmetic runs entirely in JavaScript on your own machine. There is no form submission, no request to us, and nothing in our logs: we do not know which prefixes you calculated. This is not a privacy policy so much as a description of the mechanism — the page could not send us your internal addressing plan even if we wanted it, and once loaded it works with the network disconnected.