Subnet Calculator

IPv4 & IPv6 subnetting — network address, broadcast, host range, binary view, and subnet split

/1/8/16/24/32
Results

Enter an IP address and prefix, then click Calculate.

Supports full, compressed, and mixed notation
/1/32/48/64/128
Results

Enter an IPv6 address and prefix, then click Calculate.

Frequently Asked Questions

Subnetting divides a large IP network into smaller, more manageable sub-networks (subnets). It improves security (isolating network segments), reduces broadcast traffic, optimises IP address usage, and makes routing more efficient. Both IPv4 and IPv6 use subnetting via prefix lengths (CIDR notation).

CIDR (Classless Inter-Domain Routing) notation appends a slash and prefix length to an IP address, e.g. 192.168.1.0/24 (IPv4) or 2001:db8::/32 (IPv6). The prefix length specifies how many leading bits identify the network. For IPv4, it replaces the older Class A/B/C system. For IPv6, /64 is the standard prefix for a LAN segment.

IPv4: Usable hosts = 2(32-prefix) - 2. The -2 removes the network address and broadcast address. A /24 gives 254 usable hosts. A /30 gives 2 (point-to-point).

IPv6: Total addresses = 2(128-prefix). A /64 gives 264 ~18.4 quintillion addresses. IPv6 has no broadcast - it uses multicast instead. There is no subtraction for IPv6 hosts.

IPv4 uses 32-bit addresses (e.g. 192.168.1.1), supporting ~4.3 billion addresses - nearly exhausted globally. It uses dotted-decimal notation and has broadcast.

IPv6 uses 128-bit addresses (e.g. 2001:db8::1), supporting 3.4x1038 addresses - effectively unlimited. It uses colon-hexadecimal notation, supports auto-configuration (SLAAC), has no broadcast (replaced by multicast), and has built-in IPsec support.

  • Unicast - one-to-one communication (Global: 2000::/3, Link-local: fe80::/10, Unique-local: fc00::/7)
  • Multicast - one-to-many (ff00::/8), replaces IPv4 broadcast
  • Anycast - one-to-nearest of a group (same address on multiple devices)
  • Loopback - ::1/128 (equivalent to 127.0.0.1 in IPv4)
  • Unspecified - ::/128 (equivalent to 0.0.0.0 in IPv4)

RFC 1918 defines three private IPv4 ranges (not routed on the public internet):
  • 10.0.0.0/8 - 10.0.0.0 to 10.255.255.255 (~16.7M addresses)
  • 172.16.0.0/12 - 172.16.0.0 to 172.31.255.255 (~1M addresses)
  • 192.168.0.0/16 - 192.168.0.0 to 192.168.255.255 (~65K addresses)

/64 is the standard prefix length for an IPv6 LAN segment. The first 64 bits identify the network (network prefix) and the last 64 bits identify the host (interface identifier). The host portion is often auto-configured using the device's MAC address (EUI-64) or a random value (SLAAC with privacy extensions). A single /64 contains 264 ~18.4 quintillion addresses.

A wildcard mask is the bitwise inverse of the IPv4 subnet mask. Used in Cisco ACLs and OSPF - bits set to 0 must match, bits set to 1 are ignored. For 255.255.255.0 the wildcard is 0.0.0.255. IPv6 does not use wildcard masks; prefix-based matching is used instead.

About This Subnet Calculator

This free online Subnet Calculator supports both IPv4 and IPv6 subnetting. For IPv4, enter any address and drag the CIDR prefix slider (or type the subnet mask directly) to instantly calculate the network address, broadcast address, usable host range, subnet mask, wildcard mask, total hosts, IP class, and binary representation. The subnet split tool shows all sub-subnets at any larger prefix.

For IPv6, enter any address in full, compressed, or mixed notation, select a prefix length (typically /48, /56, /64), and instantly see the network prefix, full expanded/compressed forms, interface ID range, address type (Global, Link-local, Unique-local, Multicast, Loopback), and total addresses in the subnet.

IPv4 Subnet Reference

CIDRSubnet MaskHosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522

IPv6 Common Prefixes

PrefixUsage
2000::/3Global unicast
fc00::/7Unique local (RFC 4193)
fe80::/10Link-local unicast
ff00::/8Multicast
::1/128Loopback
::/128Unspecified
2001:db8::/32Documentation (RFC 3849)
64:ff9b::/96IPv4-mapped IPv6