Subnet calculator for IPv4 and IPv6
Network, broadcast, usable hosts, masks, binary and reverse DNS zone for any IPv4 or IPv6 block, plus tools to split a network, plan VLSM subnets, summarize CIDR lists and check two lists for overlaps. Exact math, in your browser.
By using these tools you accept the Terms and the Privacy page.
How the subnet calculator works
This subnet calculator works out everything about one IPv4 or IPv6 network, and has five more tools for working with many: split, VLSM, summarize, overlap and IPv4 to IPv6. It is for network engineers planning address space, students learning CIDR, and anyone reading a firewall rule or an allow list. All math is exact: every address is a whole number of 32 or 128 bits, so a /0 of IPv6 shows all 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses, not a rounded figure.
What you can type
- A CIDR block or an address with its prefix length:
192.168.1.10/24,2001:db8::/48. - An IPv4 address with a netmask or a wildcard mask:
10.0.0.1 255.255.240.0or10.0.0.1 0.0.15.255. - A range:
10.0.0.0 - 10.0.3.255. If it is exactly one block you get that block; otherwise the exact list of CIDR blocks that make it up. - A single address, read as a /32 or /128.
What the result shows
For IPv4: network and broadcast addresses, the first and last usable host, the host count (/31 and /32 follow RFC 3021), netmask, wildcard mask, a binary view with the network bits marked, hex and decimal forms, the legacy class, the reverse DNS zone under in-addr.arpa (with the RFC 2317 name for blocks smaller than a /24) and the previous and next block of the same size. It also gives the IPv4-mapped, NAT64 and 6to4 forms of the block.
For IPv6: network and last address in RFC 5952 short form and fully expanded, the address count as a power of two, how many /64 and /48 networks fit, the ip6.arpa nibble zone, and any IPv4 address carried inside an IPv4-mapped, NAT64, 6to4 or Teredo address.
Every result names the IANA special-purpose block it falls in, such as Private-Use (RFC 1918), Shared Address Space (RFC 6598) or Documentation, with the registry’s answers on whether it is forwardable and globally reachable. The table follows the IANA IPv4 and IPv6 Special-Purpose Address Registries as updated on 2025-10-09, plus multicast from the address space registries.
The other tabs
- Split: a network into blocks of a given prefix length or into a number of equal blocks. The page lists the first 1,024 and counts the rest, so splitting a /8 into /32s answers at once; CSV downloads hold up to 65,536 rows.
- VLSM: a list of host needs, such as
Sales 100, Office 50, Link 2, becomes the smallest fitting subnets, placed largest first. - Summarize: a pasted list becomes the fewest CIDR blocks that cover exactly the same addresses.
- Overlap: two lists, such as two firewall rule sets, compared entry by entry (same, inside, partly or not at all), with the addresses in both and in only one of them.
- IPv4 ↔ IPv6: an IPv4 address embedded under a NAT64 prefix of any RFC 6052 length, its IPv4-mapped and 6to4 forms, and the way back from IPv6.
Privacy and limits
The page does every calculation itself and sends nothing. Your last six networks stay in this browser for the Recent buttons; Clear removes them. Lists are capped at 100,000 entries and 2,000,000 characters so the page stays responsive. To learn who runs an address, use the ASN lookup; to check a mail server’s PTR record, the reverse DNS check.
Updated · Maintained by Liviu Tanase
Questions
How many usable hosts are in a /24, /30, /31 or /32?
A /24 has 256 addresses and 254 usable hosts: the first is the network address and the last the broadcast address. A /30 has 4 addresses and 2 hosts. A /31 has 2 hosts and no network or broadcast address, because RFC 3021 lets point-to-point links use both. A /32 is a single host. IPv6 has no broadcast address, so the calculator counts every address of an IPv6 block, as an exact power of two.
What is the difference between a netmask and a wildcard mask?
A netmask is ones then zeros in binary: 255.255.240.0 is /20. A wildcard mask is the inverse, zeros then ones (0.0.15.255 is also /20), as Cisco ACLs and OSPF write it. Type either after the address. A mask that mixes ones and zeros, such as 255.0.255.0, isn’t one network and is refused. 0.0.0.0 and 255.255.255.255 are read as netmasks (/0 and /32), and the result says so.
How does the VLSM planner choose subnets?
Each need gets the smallest block that fits its hosts plus the network and broadcast addresses, so 50 hosts get a /26 (62 usable). Blocks are placed largest first, which keeps every block on its own boundary with no overlaps and no gaps. Needs that don’t fit are listed, and the space left over is shown as CIDR blocks. Tick the /31 option to give 2-host links a /31 and 1-host needs a /32 (RFC 3021).
How do I summarize or aggregate a list of CIDR blocks?
Paste the list in the Summarize tab: CIDR blocks, single addresses, ranges or an address with a netmask, IPv4 and IPv6 mixed, up to 100,000 entries. Overlapping and touching blocks are merged into the fewest CIDR blocks that cover exactly the same addresses, never more. The tab also shows the smallest single block that holds them all and how many extra addresses that would add.
Why is my input refused?
To avoid a wrong answer. A leading zero (192.168.01.1) means octal to some systems, an IPv4 address written inside IPv6 (::ffff:192.0.2.1) is ambiguous with a prefix length, and a zone ID (fe80::1%eth0) names an interface, not a network. The error says what to type instead. Domain names aren’t accepted: find a domain’s address and its owner with the ASN lookup.
Is anything sent to a server?
No. Every calculation runs in your browser, with exact whole-number math for IPv4 and IPv6. The page puts the network in the address bar (?q=) so you can share it, and opening such a link requests the page with that query, like any link. To see who runs an address, use the ASN lookup; to check your own address, What’s my IP; for its PTR record, the reverse DNS check; for blocklists, the blacklist check.