Skip to content
tecuy
Developer & Data

Subnet Calculator (IPv4 & IPv6)

Calculate the network, host range, mask and address count for any IPv4 or IPv6 CIDR block, and split it into smaller subnets.

Try:

Calculated entirely in your browser — no address you enter is sent to a server or looked up.

How to use it

Enter an address in CIDR notation, such as 192.168.1.10/24 or 2001:db8::/48. For IPv4 you can type the prefix or a dotted subnet mask (255.255.255.0) in the second field instead. An address without a prefix is treated as a single address (/32 for IPv4, /128 for IPv6). To plan a network, enter a longer prefix under "Split" to list the smaller subnets inside the block.

IPv4: networks, broadcast and usable hosts

A /24 such as 192.168.1.0/24 has 28 = 256 addresses. The first (192.168.1.0) identifies the network and the last (192.168.1.255) is the broadcast address, leaving 254 usable hosts. Two prefixes are exceptions: a /31 is used for point-to-point links and both of its addresses are usable (RFC 3021), and a /32 is a single host.

The wildcard mask is the inverse of the subnet mask (0.0.0.255 for a /24); it is used by access lists and some routing configurations.

IPv6 works differently

  • There is no broadcast address and no "subtract two" rule, so this calculator reports the first and last address of the block rather than a usable-host count.
  • A /64 is the standard size for a single network segment; the calculator shows how many /64s fit in larger blocks, such as the 65,536 in a /48.
  • Addresses are shown in the compressed form defined by RFC 5952 (lowercase, longest run of zeros replaced by ::) and fully expanded.
  • Zone IDs such as %eth0 identify a local interface, not part of an address, so they are rejected.