Subnet Calculator · Networking
Subnet any IPv4 or IPv6 block at a glance.
Enter any IPv4 or IPv6 address with a CIDR prefix like 192.168.1.0/24 — or an address plus netmask like 192.168.1.0 255.255.255.0 — to get the network address, broadcast address, netmask, wildcard mask, usable host range and address counts — all computed in your browser, no signup required.
Subnet Calculator playground
IPv4 or IPv6, with or without a prefix — 10.0.0.0/8, 2001:db8::/48, or a dotted netmask like 192.168.1.0 255.255.255.0. A bare address means one host (/32 or /128).
Results update as you type — press Enter to run now.
Type an address — with a prefix or a netmask — or tap an example to see its network, range and host counts here.
Verify an AI's answer
Paste what ChatGPT or Claude told you — this recomputes it exactly, locally. Why AI needs checking →
Enter an address above, then paste in what an AI told you to check it.
| Field | Claimed | Actual | Verdict |
|---|
The Gap
One off-by-one bit, a whole wrong network.
Subnetting is mental binary arithmetic done under pressure — and the failure mode is silent. Pick the wrong prefix and your firewall rule covers the wrong hosts, your route blackholes traffic, or two networks quietly overlap. The maths is simple but unforgiving.
This free subnet calculator turns a CIDR into the concrete facts you actually need — network address, broadcast address, netmask, wildcard and the exact usable host range — for IPv4 and IPv6 alike, so you can confirm a block before it lands in a config. Entirely in-browser, with nothing to install and no data ever leaving your device.
Asking an AI for subnet maths is the risky shortcut: a language model generates likely-looking numbers, and an off-by-one broadcast address reads exactly like the right one. This calculator computes the real bit boundaries with exact BigInt arithmetic — numbers you can verify an AI’s answer against, not more plausible text.
Working with a list of blocks? Try the CIDR / Subnet Checker to aggregate them and find overlaps.
The Pipeline
How it works.
Four deterministic steps run on every keystroke — all inside your browser tab, with exact BigInt arithmetic.
-
Parse the address.
The address is split from its /prefix — or its dotted netmask is converted to one — and read as a 32-bit IPv4 or 128-bit IPv6 number.
-
Build the mask.
The prefix becomes a contiguous netmask; its complement is the wildcard mask used by ACLs.
-
Derive the bounds.
Masking yields the network address; setting the host bits yields the broadcast / last address.
-
Count the hosts.
The host bits fix the total and usable counts, with /31 and /32 handled as special cases.
Prefix Reference
How big is each prefix?
Each bit added to the prefix halves the block. A quick reference for the common IPv4 prefixes, and how an IPv6 site prefix breaks down.
IPv4 prefixes
Total addresses are 2^(32 − prefix); usable is total minus the network and broadcast.
prefix addresses usable typical use
/30 4 2 point-to-point link
/29 8 6 tiny subnet
/28 16 14
/27 32 30
/26 64 62
/25 128 126
/24 256 254 a classic LAN
/23 512 510
/22 1,024 1,022
/16 65,536 65,534
/8 16,777,216 16,777,214 a large private block An IPv6 prefix
IPv6 has no broadcast; the whole range is addressable. A site /48 holds 65,536 of the standard /64 subnets.
2001:db8::/48
network 2001:db8::
last 2001:db8:0:ffff:ffff:ffff:ffff:ffff
subnets 65,536 /64s
addresses 2^80 per /48 Next Step
Got a list of subnets? Check them for overlaps.
Once individual blocks read correctly, the CIDR / Subnet Checker takes a whole list and finds overlaps and containment, then aggregates everything into the minimal covering set — handy before you write a firewall rule or a route table.
192.168.0.0/24
192.168.1.0/24 → 192.168.0.0/22
192.168.2.0/24
192.168.3.0/24 FAQ
Questions, answered.
Tap a question to expand the answer.
What does the Subnet Calculator do?
Enter an IPv4 or IPv6 address with a prefix — for example 192.168.1.0/24 or 2001:db8::/48 — and it computes the network address, broadcast / last address, netmask, wildcard mask, the usable host range, and how many addresses the block holds. Everything is calculated in your browser; nothing is uploaded.
Can I enter a subnet mask instead of a CIDR prefix?
Yes. Type the address and mask together — 192.168.1.0 255.255.255.0 or 192.168.1.0/255.255.255.0 — and it is converted to the /24 prefix automatically. The mask must be contiguous (255.0.255.0 is rejected with an explanation), and if you paste a Cisco wildcard mask like 0.0.0.255 the calculator tells you the equivalent netmask and prefix.
Does my address ever leave my browser?
No. Parsing and all the maths run 100% client-side in your tab — there is no server, no account and no logging. You can safely paste internal network ranges.
Does it support IPv6 as well as IPv4?
Yes. IPv6 is handled with full 128-bit precision using BigInt, so prefixes like /48, /56 and /64 report the correct first and last addresses and total counts (shown as a power of two for very large blocks). IPv4 reports the classic network, broadcast, netmask and wildcard.
How are usable hosts counted, and what about /31 and /32?
For an IPv4 block of /30 or larger, the network and broadcast addresses are reserved, so usable hosts = total − 2. A /31 is treated as a 2-address point-to-point link (RFC 3021) and a /32 as a single host route. IPv6 has no broadcast address, so the whole range is addressable.
What is the wildcard mask for, and how is it calculated?
The wildcard mask is the bitwise complement of the netmask — for /24 the netmask is 255.255.255.0, giving a wildcard of 0.0.0.255. It is the form Cisco IOS ACLs and OSPF or EIGRP network statements expect: a 0 bit means must-match and a 1 bit means do not care. The calculator shows the wildcard mask alongside the netmask so you can copy it straight into a config.
Can I paste a host address instead of the network address?
Yes. Give any address in the block with its prefix — 192.168.1.73/24 works fine — and the calculator masks it down to the network for you, so you do not have to find the network address first.
How many IP addresses and usable hosts are in a /24?
A /24 has 8 host bits, so 2^8 = 256 total addresses and 254 usable hosts after reserving the network and broadcast addresses. Each bit added to the prefix halves the block: a /25 has 128 total and 126 usable, a /26 has 64 total and 62 usable, and so on. Enter any prefix into the calculator to see the exact counts instantly.
How does the calculator derive the network and broadcast addresses from a CIDR?
The address portion is read as a 32-bit integer (IPv4) or 128-bit integer (IPv6). A bitwise AND with the netmask zeroes the host bits and gives the network address; setting all host bits to 1 gives the broadcast or last address. The CIDR to IP range result — first address, last address and total count — is shown for every prefix you enter.
New to this? Read our guide on Networking for DevOps Engineers.
More free, private DevOps tools.
The Subnet Calculator is one tool in OpsCanopy — a growing canopy of browser-based validators, converters and testers that never touch a server.
More in Networking
New to AWS? Read the AWS guide →
29 free tools, every one offline-capable — opscanopy.com works with no signup and nothing uploaded.
More networking: the IP Address Converter, the CIDR / Subnet Checker and the Subnet Splitter, or browse the full tools directory.
Provided as-is for convenience; always confirm critical network changes against your own authority. OpsCanopy is free and open.