Home › Math & Science Calculators › IP Subnet
🌐 Math & Science Calculators

IP Subnet Calculator (IPv4 & IPv6)

Enter an IPv4 or IPv6 address in CIDR notation and get everything a network admin needs: the network and broadcast addresses, subnet mask and wildcard, usable host range, total and usable host counts, address class, and public/private scope — with a full details table.

What it calculates

For IPv4, the tool derives the network address, broadcast address, subnet mask, wildcard mask, first and last usable host, total and usable host counts, the address class (A–E), and whether the address is public, private (RFC 1918), loopback, or link-local. For IPv6 it expands and compresses the address, finds the network prefix, first and last address in the block, and the total number of addresses.

CIDR notation

CIDR (Classless Inter-Domain Routing) writes a subnet as an address followed by a slash and the number of network bits — for example 192.168.1.0/24. The prefix length sets the mask: /24 = 255.255.255.0. A larger prefix means a smaller subnet with fewer hosts; each bit borrowed halves the host count.

Usable hosts vs. total addresses

In IPv4, the network address and broadcast address are reserved, so usable hosts = total addresses − 2. Exceptions: a /31 is used for point-to-point links (2 usable) and a /32 is a single host. IPv6 does not reserve a broadcast address, so all addresses in the prefix are usable.

Frequently asked questions

What is the difference between the subnet mask and the wildcard mask?

The subnet mask marks the network bits (255.255.255.0 for /24). The wildcard mask is its inverse (0.0.0.255) and is used in ACLs and OSPF to match the host bits.

How many hosts are in a /24?

A /24 has 256 total addresses and 254 usable hosts (256 minus the network and broadcast addresses).

Why does a /64 IPv6 subnet have so many addresses?

A /64 leaves 64 host bits, which is 2^64 — about 18 quintillion addresses. It is the standard size for a single IPv6 LAN.

What counts as a private IP address?

IPv4 private ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 (RFC 1918). The calculator flags these, plus 127.0.0.0/8 loopback and 169.254.0.0/16 link-local.

Related tools