Subnet Calculator

Calculates everything a network address tells you for IPv4 and IPv6, and splits a block into smaller subnets by prefix length, the number of subnets you need, or the number of hosts each must hold. Handles /31 point-to-point links and /32 host routes the way the RFCs define them.

Subnet calculator

Everything a network address tells you, for IPv4 and IPv6 — and how to cut it into smaller pieces.

Write it as 192.168.1.10/24, 192.168.1.10 255.255.255.0 or 2001:db8::1/64. The prefix can also be set below.

/24

—

A /31 is a real point-to-point link with two usable addresses and no broadcast address, and a /32 is a single host. The old “two to the power of n, minus two” rule does not apply to either, so this page does not pretend they have no usable addresses.

IPv6 has no broadcast address at all. Only the all-zeros host is reserved, as the Subnet-Router anycast address, so an IPv6 subnet loses one address rather than two.

The class letter here comes from the leading bits of the address, which is what defines it, not from the prefix length. Classful addressing was replaced by CIDR in 1993 and is shown only because exams still ask.