Skip to content
gl.tools

Subnet calculator that shows its working

Enter an address with a prefix. You get not just the result but the working in binary as well – so it stays verifiable instead of something you have to take on trust.

  • Free
  • No sign-up
  • Runs in your browser
  • Nothing is transmitted

IPv4 or IPv6, with a prefix or a netmask. Everything is calculated as you type.

Examples

Did this help you? Buy me a coffee

Common questions

Why do I need to see the working?
Because subnets are easy to get wrong and a bare result proves nothing. Anyone checking whether 172.16.5.4/12 really sits in 172.16.0.0 needs to see the bitwise AND – and anyone still learning needs it even more. So both are here: the result, and how it comes about.
What is the wildcard mask?
The netmask inverted: where the mask has 255, the wildcard has 0, and the other way round. Cisco equipment and some access lists expect it in that form. It is also handy arithmetically, because the broadcast address is exactly the bitwise OR of the network address and the wildcard.
Why does the calculator refuse leading zeros?
Because 010 is ambiguous: some programs read it as the octal number 8, others as 10. It is a well-known source of error that has produced security holes. Better a clear message than a wrong result you believe to be right.
What does /31 mean – surely nothing is left?
Under the old rule, nothing: two addresses minus network and broadcast leaves zero. RFC 3021 changed that for point-to-point links – there is neither a network nor a broadcast address there, and both addresses are usable. That is why this says 2 and not 0.
How many addresses does an IPv6 network hold?
More than you want to count. An ordinary /64, which is what every connection gets, holds 18,446,744,073,709,551,616 addresses – more than the entire IPv4 internet. That is why nobody counts usable hosts in IPv6, and why there is no broadcast address.
Is the historical class still meaningful?
Not as a scheme. Routing has been classless since 1993 (CIDR); the prefix says everything. The class appears here only because curricula and exams still ask for it – nobody needs it in operation.
Is anything I type transmitted?
No. This only does arithmetic, and your browser does it. There is no request to a server and no DNS lookup either – the reverse lookup zone is derived from the address, not resolved.

The prefixes you actually meet

/32 – a single address, in other words a host route.

/31 – two addresses, both usable, for point-to-point links.

/30 – four addresses, two usable; once the standard for link networks.

/29 to /25 – small networks for servers or segments, 6 to 126 devices.

/24 – the classic “class C network”, 254 devices, the normal case at home.

/16 – 65,534 devices; 192.168.0.0/16 and 172.16.0.0/12 are private ranges.

/8 – 16.7 million addresses; 10.0.0.0/8 is the largest private range.

Related tools

All tools of this kind: Network tools