Subnet Calculator — IPv4 & IPv6

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.

CIDR (Classless Inter-Domain Routing) notation combines an IP address with a prefix length, written as 192.168.1.0/24. The number after the slash tells you how many leading bits are the network portion. A /24 means 24 bits are network, leaving 8 bits for hosts (28 = 256 addresses, 254 usable). A smaller prefix (e.g. /16) gives more hosts; a larger prefix (e.g. /30) gives fewer. CIDR replaced the old Class A/B/C system and allows flexible, efficient IP allocation. Example: 10.0.0.0/8 is the entire Class-A private range; 192.168.1.64/26 is a 64-address subnet of the 192.168.1.x network.

RFC 1918 defines three private IPv4 ranges that are not routed on the public internet and are reserved for internal networks:
  • 10.0.0.0/8 — 10.0.0.0 to 10.255.255.255 (~16.7 million addresses). Used by large enterprises and ISPs.
  • 172.16.0.0/12 — 172.16.0.0 to 172.31.255.255 (~1 million addresses). Often used by mid-size networks and Docker.
  • 192.168.0.0/16 — 192.168.0.0 to 192.168.255.255 (~65,000 addresses). The most common home and small office range.
Additionally, 169.254.0.0/16 is the link-local (APIPA) range assigned automatically when DHCP fails, and 127.0.0.0/8 is the loopback range (127.0.0.1 = localhost).

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

Related Articles

View all articles
Subnetting Math: Why /24 Gives 254 Hosts, How VLSM Works, and What the Slash Actually Means

Subnetting Math: Why /24 Gives 254 Hosts, How VLSM Works, and What the Slash Actually Means

A /24 gives 254 usable hosts, not 256 — because subnetting always reserves the first address (network) and last address (broadcast). Here's the 2^n−2 formula across all prefix lengths, VLSM (Variable Length Subnet Masking) for efficiently dividing address space into different-sized subnets, why route summarization (supernetting) is the reverse operation, and what the slash number in CIDR notation actually means in binary.

Jun 16, 2026
IPv6 Address Types: Why One Interface Has Link-Local, ULA, and Global Addresses All at Once

IPv6 Address Types: Why One Interface Has Link-Local, ULA, and Global Addresses All at Once

A single IPv6 interface normally has 3-4 different addresses simultaneously — link-local, unique local (ULA), and one or more global unicast addresses, each with different scope and purpose. Here's what each address type does, why ULAs exist alongside global addresses unlike IPv4's NAT model, and why privacy extensions cause global addresses to rotate.

Jun 12, 2026
Cloud VPC Design: Public vs Private Subnets, NAT Gateways, and the Three-Tier Architecture

Cloud VPC Design: Public vs Private Subnets, NAT Gateways, and the Three-Tier Architecture

AWS VPCs, GCP VPCs, and Azure VNets follow the same three-tier pattern — public subnets for internet-facing resources, private subnets for application and data tiers. Here's the terminology across providers, NAT Gateway mechanics, VPC peering, and the four most common cloud network design mistakes.

Jun 9, 2026
Subnetting Explained: CIDR Notation, Host Counts, and Practical Network Design

Subnetting Explained: CIDR Notation, Host Counts, and Practical Network Design

CIDR notation and subnetting make more sense once you see the pattern: each /1 increase halves the subnet. Here's how prefix lengths translate to host counts, common use cases from cloud VPCs to point-to-point links, and IPv6 subnetting philosophy.

Jun 9, 2026
Subnet Calculator — IPv4 & IPv6 Network Address, Host Range & CIDR

Subnet Calculator — IPv4 & IPv6 Network Address, Host Range & CIDR

Learn how IPv4 subnetting works, what CIDR notation means, how to calculate network addresses, host ranges, and usable hosts, with real examples — plus an IPv6 intro and a free subnet calculator.

Jun 6, 2026