Subnet Calculator
Calculate the network, host range and mask of any IPv4 or IPv6 subnet, and split a network into smaller ones.
Subnet Calculator for IPv4 and IPv6
Type an address with its prefix and get everything a network plan needs: the network and broadcast addresses, the range of usable host addresses, how many hosts fit, the subnet mask and the wildcard mask. The same box takes IPv6, and a second tab splits a network into smaller subnets of equal size and lists each one.
It also tells you what kind of address you typed: private, public, carrier-grade NAT, loopback, link-local, multicast or one of the ranges reserved for documentation. That alone explains many "why can't I reach it" questions.
How to use it
- Type an address with a prefix (
192.168.1.10/24), with a mask (10.0.0.1 255.255.0.0) or with a wildcard mask (172.16.5.4 0.0.15.255). - Or type the address alone and choose the prefix in Prefix / mask.
- Read the results; Copy next to a value copies it.
- Open Split into subnets and choose the new prefix to divide the network.
Reading the results
| Result | Meaning | Example for 192.168.1.10/24 |
|---|---|---|
| Network address | The first address; it names the subnet and is not given to a device | 192.168.1.0 |
| Broadcast address | The last address; a packet sent to it reaches every host in the subnet | 192.168.1.255 |
| Usable host range | The addresses you can assign to devices | 192.168.1.1 to 192.168.1.254 |
| Subnet mask | The prefix written as four numbers | 255.255.255.0 |
| Wildcard mask | The mask inverted, as used by Cisco access lists and OSPF | 0.0.0.255 |
The binary view under the results shows why: the network part of the address is highlighted, and the host part is whatever is left. A /24 means the first 24 bits are the network, leaving 8 bits, or 256 addresses, for hosts.
Common prefixes
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
/16 | 255.255.0.0 | 65,536 | 65,534 |
/20 | 255.255.240.0 | 4,096 | 4,094 |
/24 | 255.255.255.0 | 256 | 254 |
/26 | 255.255.255.192 | 64 | 62 |
/28 | 255.255.255.240 | 16 | 14 |
/30 | 255.255.255.252 | 4 | 2 |
/31 | 255.255.255.254 | 2 | 2 (point-to-point link) |
/32 | 255.255.255.255 | 1 | 1 (single host) |
The subnet mask cheat sheet lists every prefix from /0 to /32.
Private and special ranges
10.0.0.0/8,172.16.0.0/12and192.168.0.0/16are private (RFC 1918): usable inside any network, never routed on the internet.100.64.0.0/10is used by internet providers for carrier-grade NAT. A router whose WAN address is in it has no public IPv4 address of its own.169.254.0.0/16is link-local: a device gives itself such an address when it gets no answer from a DHCP server.192.0.2.0/24,198.51.100.0/24and203.0.113.0/24are for documentation and examples only.
IPv6
IPv6 subnets are nearly always /64, because address autoconfiguration (SLAAC) fills in the last 64 bits itself. What varies is how many of them you get: a home connection usually receives a /56 (256 subnets) or a /48 (65,536). The calculator shows the compressed and the expanded form, the address range, the type (global, unique local fc00::/7, link-local fe80::/10 and others) and how many /64 subnets fit.
Splitting a network
In Split into subnets, choose a longer prefix and the tool lists every resulting subnet with its host range and broadcast address, for example the four /24 networks inside 10.0.0.0/22. Up to 256 subnets are listed; the total is always shown.
Related tools
To convert an address or a mask between decimal, binary and hex, use the number base converter. The task pages open this tool for one job: CIDR to IP range, subnet mask cheat sheet and IPv6 subnet calculator.