Developer 🔒 Runs in your browser — no data sent to servers

Subnet Calculator

Calculate the network, host range and mask of any IPv4 or IPv6 subnet, and split a network into smaller ones.

IPv4 or IPv6; a prefix or mask typed after the address wins.

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

  1. 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).
  2. Or type the address alone and choose the prefix in Prefix / mask.
  3. Read the results; Copy next to a value copies it.
  4. Open Split into subnets and choose the new prefix to divide the network.

Reading the results

ResultMeaningExample for 192.168.1.10/24
Network addressThe first address; it names the subnet and is not given to a device192.168.1.0
Broadcast addressThe last address; a packet sent to it reaches every host in the subnet192.168.1.255
Usable host rangeThe addresses you can assign to devices192.168.1.1 to 192.168.1.254
Subnet maskThe prefix written as four numbers255.255.255.0
Wildcard maskThe mask inverted, as used by Cisco access lists and OSPF0.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

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/24255.255.255.0256254
/26255.255.255.1926462
/28255.255.255.2401614
/30255.255.255.25242
/31255.255.255.25422 (point-to-point link)
/32255.255.255.25511 (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/12 and 192.168.0.0/16 are private (RFC 1918): usable inside any network, never routed on the internet.
  • 100.64.0.0/10 is 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/16 is 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/24 and 203.0.113.0/24 are 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.