Subnet calculator (IPv4 and IPv6)
Enter an IP address with a prefix or mask - we'll show the network, address range, mask and number of hosts, and split the network into subnets.
You can type: 10.0.0.5/8, 172.16.4.1 255.255.240.0 or 2001:db8::1/48
Click a value to copy it
Subnetting
Everything is calculated in your browser, addresses are not sent anywhere.
How to calculate a subnet
- 1Enter an addresswith a prefix after a slash, or pick a mask from the list
- 2Get the resultnetwork, broadcast address, host range, mask and address type
- 3Split the networkpick a new prefix and a table of subnets appears
What a prefix and a mask are
An IP address has two parts: the network number and the device number within it. The prefix /24 means the first 24 of 32 bits are the network and the remaining 8 bits are device addresses. The mask 255.255.255.0 is the same thing written differently: the ones in binary mark the network bits.
A /24 network has 256 addresses in total. The first (network address) and the last (broadcast) are not given to devices, so 254 hosts remain. Each step down in the prefix doubles the network, each step up halves it.
Private and public addresses
The ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private: they are used inside home and office networks and are not visible on the internet. ISPs hand out 100.64.0.0/10 addresses behind a shared IP (CGNAT). Everything else, except special-purpose ranges, is public.
IPv6
An IPv6 address is 128 bits long, so there are so many networks and addresses that nobody saves them. A home network usually gets a /56 or /64, and a single /64 holds 4 billion times more addresses than the entire IPv4 internet. IPv6 has no broadcast address.
FAQ
Didn't find an answer? Message us and we'll help.
A part of a larger network with its own address range. Networks are split into subnets to separate, for example, the office from guest Wi-Fi or servers from work computers.
Pick a prefix in the list next to the field, the mask is shown next to each option. For example, /24 is 255.255.255.0, /16 is 255.255.0.0, /30 is 255.255.255.252.
The first address stands for the network itself and the last one is the broadcast address: a packet sent to it reaches every device in the network. The exceptions are /31 (two addresses for a point-to-point link) and /32 (a single address).
A mask turned inside out: zeros for the network bits and ones for the host bits. For /24 it's 0.0.0.255. It is used in access lists (ACL) on routers and in OSPF settings.
Pick a new prefix in the "Subnetting" block. Each prefix step splits the network in two: /24 into /26 gives 4 subnets of 64 addresses. The table shows each subnet with its host range.
No. The calculator runs entirely in your browser, the server receives and stores nothing.
Try also
Also free, no sign-up