Subnet & CIDR Calculator (IPv4 and IPv6)
Free IPv4/IPv6 subnet calculator and CIDR calculator: network, broadcast, usable hosts, mask and wildcard, plus a subnet splitter. Runs in your browser.
Updated 2026-10-21
Calculated in your browser; nothing is sent anywhere. Copy link to this result
Result
What is a subnet calculator?
DNSVerdict's subnet calculator is a free CIDR calculator that turns an address with a prefix or mask, such as 192.168.1.10/24 or 2001:db8::/48, into its network, broadcast address, first and last usable host, mask, wildcard mask and binary form. It treats /31 as an RFC 3021 point-to-point link and /32 as a single host, labels private and reserved ranges, and splits a network into smaller subnets.
What this checks
A subnet is a block of consecutive IP addresses that share a prefix. In CIDR notation (RFC 4632) the number after the slash says how many leading bits are the network part: 192.168.1.0/24 fixes 24 bits and leaves 8 for hosts, so it holds 2^8 = 256 addresses. The calculator ANDs the address with the mask to get the network address, sets all host bits to get the last address, and shows the subnet mask, the wildcard mask (the mask inverted, as used in router access lists) and the binary form.
Hosts. In IPv4 the first address of a subnet is the network address and the last is the broadcast address, so a /24 has 254 usable hosts. Two sizes are special: a /31 has two addresses and no broadcast, and RFC 3021 lets both be used on a point-to-point link; a /32 is one host. If you enter a host address such as 192.168.1.10/24, the tool shows the network it belongs to and says so. Masks can be typed as prefix lengths or in dotted form; a mask whose 1 bits are not contiguous, or a wildcard mask such as 0.0.0.255, is reported instead of being guessed. Octets with leading zeros such as 010 are rejected because some software reads them as octal (RFC 6943 §3.1.1).
Ranges. The result names the special-purpose block the network falls in, following the IANA registries behind RFC 6890: private-use space (RFC 1918: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), shared address space for carrier-grade NAT (RFC 6598: 100.64.0.0/10), documentation ranges (RFC 5737), loopback, link-local and multicast. A network large enough to span several blocks lists the ones it contains. The address class (A to E) is shown for reference only: classful addressing was replaced by CIDR.
IPv6. For IPv6 the tool shows the network prefix, the first and last address, the number of addresses as a power of two, how many /64 networks fit inside, and the ip6.arpa zone when the prefix is a multiple of four bits. IPv6 has no broadcast address, so every address in the range can be assigned; a /64 is the standard size of a LAN (RFC 4291 §2.5.4). Unique local addresses (RFC 4193, fc00::/7) and the documentation prefixes (RFC 3849, RFC 9637) are labelled. To normalise an IPv6 address first, use the IPv6 tools.
Splitting. Add “split /26” to the input, or use the links under the result, to list the smaller subnets a network divides into, with their usable ranges. Long lists stop at 64 rows and say how many there are. Everything is calculated in your browser and nothing is sent anywhere. To find out who holds a public network, use IP whois; to publish an address range in SPF, see the SPF setup guide.
If it fails
- “Not a valid IPv4 address”: check for four numbers separated by dots, each from 0 to 255, with no leading zeros.
- “Not a valid subnet mask”: use a prefix length such as /26 or a mask such as 255.255.255.192. A mask like 255.0.255.0 is not valid because its 1 bits are not contiguous.
- “Looks like a wildcard mask”: 0.0.0.255 is the wildcard of a /24. Type /24 or 255.255.255.0 instead.
- The network address differs from the one you typed: you entered a host address, so the result shows the network it belongs to.
- A /31 or /32 shows no broadcast address: that is correct (RFC 3021 for /31, a single host for /32).
- For IPv6 errors the message says which part of the address is wrong; the IPv6 tools explain the text forms in detail.
FAQ
How many usable hosts are in a /24 subnet?
A /24 has 256 addresses. The first is the network address and the last is the broadcast address, so 254 can be assigned to hosts. The general rule for IPv4 is 2^(32 − prefix) − 2, with two exceptions: a /31 has two usable addresses (RFC 3021) and a /32 has one. The calculator applies this rule to every prefix length.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask has 1 bits for the network part and 0 bits for the host part, for example 255.255.255.0. A wildcard mask is its inverse, 0.0.0.255, and some router access lists use it to say which bits may differ. They carry the same information. The calculator shows both and rejects a wildcard mask typed where a subnet mask is expected.
Why can a /31 be used on a point-to-point link?
On a link with only two routers, a network address and a broadcast address would waste half of the block. RFC 3021 lets both addresses of a /31 serve as host addresses on such links, which halves the space used compared with a /30. Some older equipment does not support it, so check your devices before you renumber.
How many addresses does an IPv6 /64 contain?
A /64 has 2^64 addresses, about 18.4 quintillion, which is why it is the standard size for one LAN (RFC 4291 §2.5.4). IPv6 has no broadcast address, so subnets are not sized by host count. You plan how many /64 networks you need instead; a /48 contains 65,536 of them.