Tools › Developer
Subnet Calculator
The network, netmask, broadcast address and usable host range of an IPv4 or IPv6 address with a CIDR prefix or a netmask, the network split into smaller subnets or listed address by address, a list of addresses grouped by network, and random IPv6 unique local prefixes and MAC addresses.
About this tool What it's for, how to use it and an example
What it's for
Work out the details of an IPv4 or IPv6 subnet: which network an address belongs to, its netmask and broadcast address, and which addresses are free for devices (hosts). The tool also says what kind of address it is, such as private or link-local, and can split a network into smaller subnets.
For example, when you’re setting a static address on a server or router, check that it sits in the right network and isn’t the network or broadcast address. Or, when you’re planning a network, split a /24 into four /26 subnets, one for each VLAN.
How to use it
Type an address with a CIDR prefix (192.168.1.10/24 or 2001:db8::1/64), or an IPv4 address with a netmask after
a space (192.168.1.10 255.255.255.0). A wildcard mask, as Cisco access lists use (0.0.0.255), works in place of
the netmask, and an address on its own is taken as a single host. IPv6 addresses can be shortened with :: and can
end in an IPv4 address (::ffff:192.0.2.1). The results update as you type, each with a Copy button.
To split the network, type a longer prefix in Split into subnets of, such as /26. The subnets are listed below
the results, one per line, ready to copy. An IPv4 address is also shown as a plain number, in hex and in binary.
List every address lists the network’s addresses (the first 65,536 of a bigger one).
Group addresses by network takes a list of addresses, one per line (anything after the address, such as a host
name, is ignored), and sorts them into networks of the prefix you choose, such as /24 for IPv4 and /64 for IPv6.
Make a random… gives an IPv6 unique local prefix (a private fd…/48 range, as RFC 4193 recommends) or a
random MAC address marked as locally administered, so it can’t clash with a real network card’s.
Example
Type this in the address box:
10.20.30.40 255.255.252.0
The network is 10.20.28.0/22, the broadcast address 10.20.31.255, and the usable hosts run from 10.20.28.1
to 10.20.31.254: 1022 of them, out of 1024 addresses. The address type is Private (RFC 1918). Type /24 in
Split into subnets of to get the four subnets from 10.20.28.0/24 to 10.20.31.0/24.
Good to know
IPv6 networks have no broadcast address, so for them the tool shows the whole range of addresses instead of the usable hosts. An IPv4 /31 is counted as two usable hosts with no broadcast address, as on point-to-point links (RFC 3021), and a /32 as one. A split lists at most the first 256 subnets, and says how many there are in all.
Group addresses by network
Make a random…
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.