IPDatum

IPv4 & IPv6 CIDR Subnet Calculator

Compute exact network boundaries, netmasks, wildcard masks, usable host ranges, and binary bitmasks instantaneously using client-side BigInt math.

— IPv4 —
Geolocate Start IP →

CIDR Network Boundaries

Canonical CIDR
—
Network Address
—
Broadcast / Last
—
First Usable IP
—
Last Usable IP
—

Masks & Capacity

Subnet Mask
—
Wildcard Mask
—
Total Addresses
—
Usable Hosts
—
Reverse DNS Zone
—

Binary Bitmask & Address Breakdown

—
Have a list of IPs from this subnet to enrich? Run Bulk IP Lookup → 100% client-side calculation — zero data leaves your browser

CIDR Masking, VLSM & IPv6 Prefix Design

Classless Inter-Domain Routing (CIDR) & VLSM

Replaced legacy Class A/B/C boundaries (RFC 4632). A prefix length /n fixes the leading n network bits of a 32-bit IPv4 or 128-bit IPv6 address and assigns the remaining host bits cleanly:

  • Variable Length Subnet Masking (VLSM): slice one cloud VPC (10.0.0.0/16) into /24 application subnets, /27 bastion subnets, and /31 router links without wasting space.
  • Special Host Exceptions: standard subnets reserve network + broadcast (2^(32-n) - 2 hosts), whereas RFC 3021 /31 links use both IPs and /32 is a loopback or host route.
  • Reserved Ranges: RFC 1918 private blocks (10/8, 172.16/12, 192.168/16) and CGNAT (100.64/10) are non-routable on the public internet.

IPv6 Allocation Boundaries (/48, /56, /64)

IPv6 eliminates tight address conservation in favor of fixed hexadecimal boundaries on 4-bit nibbles:

  • /48 Site Assignment: enterprise campus or ISP business allocation giving 65,536 individual /64 VLANs.
  • /56 Broadband Customer: standard home gateway delegation offering 256 separate /64 subnets for guest, IoT, and LAN isolation.
  • /64 LAN Subnet: universal minimum SLAAC (RFC 4862) broadcast domain — verify your active prefix live using our IPv6 Dual-Stack Test or IP WHOIS.

Complete IPv4 & IPv6 CIDR Cheat Sheet

CIDRSubnet MaskWildcard MaskTotal AddressesUsable HostsCommon Allocation Role
/32255.255.255.2550.0.0.011Loopback, BGP host route, single firewall ACL
/31255.255.255.2540.0.0.122 (RFC 3021)Point-to-point router interconnect
/30255.255.255.2520.0.0.342Legacy point-to-point link
/29255.255.255.2480.0.0.786Small business static fiber block
/28255.255.255.2400.0.0.151614Cloud subnet / dedicated hosting rack
/27255.255.255.2240.0.0.313230Small office LAN or DMZ segment
/26255.255.255.1920.0.0.636462Department VLAN or NAT pool
/25255.255.255.1280.0.0.127128126Half of a legacy Class C block
/24255.255.255.00.0.0.255256254Minimum globally routable IPv4 BGP prefix
/22255.255.252.00.0.3.2551,0241,022Campus or broadband access gateway pool
/20255.255.240.00.0.15.2554,0964,094Regional ISP customer pool or cloud AZ slice
/16255.255.0.00.0.255.25565,53665,534Cloud VPC default CIDR / RIR end-user allocation
/8255.0.0.00.255.255.25516,777,21616,777,214RFC 1918 10.0.0.0/8 private space / legacy allocation
/48 (IPv6)48 network bits—2^8065,536 /64sStandard enterprise site & BGP minimum IPv6 route
/56 (IPv6)56 network bits—2^72256 /64sTypical residential FTTH/cable CPE delegation
/64 (IPv6)64 network bits—2^64SLAAC LANStandard single IPv6 LAN subnet

IPv4 CIDR Reference Table & Special-Use Reserved Ranges (IANA / RFC)

Quick engineering cheat sheet mapping common CIDR prefix lengths to subnet masks, wildcard masks for Cisco/ACL rules, usable host counts, and IANA special-purpose blocks:

IPv4 CIDR Subnet Mask & Capacity Reference

CIDRSubnet MaskWildcard MaskTotal IPsUsable HostsCommon Network Role
/8255.0.0.00.255.255.25516,777,21616,777,214Historical Class A / RIR legacy allocations
/16255.255.0.00.0.255.25565,53665,534Large university, enterprise campus, or VPC supernet
/20255.255.240.00.0.15.2554,0964,094Regional ISP broadband aggregation pool
/22255.255.252.00.0.3.2551,0241,022Minimum ARIN/RIPE/APNIC IPv4 member delegation
/24255.255.255.00.0.0.255256254Smallest prefix universally accepted in global BGP tables
/27255.255.255.2240.0.0.313230Branch office LAN, small Kubernetes node subnet
/30255.255.255.2520.0.0.342Legacy point-to-point router interconnect (4 IPs total)
/31255.255.255.2540.0.0.122Modern RFC 3021 point-to-point link (zero wasted broadcast)
/32255.255.255.2550.0.0.011Single host route, BGP loopback, or firewall allowlist entry

Special-Use & Reserved IPv4 Blocks (IANA / RFC)

Reserved CIDRAddressesRFCScope & Operational Purpose
10.0.0.0/816,777,216RFC 1918Private internal corporate, VPC, and datacenter networks (non-routable)
100.64.0.0/104,194,304RFC 6598Shared Address Space used for ISP & mobile Carrier-Grade NAT (CGNAT)
127.0.0.0/816,777,216RFC 1122Local host loopback interface traffic (127.0.0.1 default)
169.254.0.0/1665,536RFC 3927Link-local APIPA & cloud instance metadata endpoints (169.254.169.254)
172.16.0.0/121,048,576RFC 1918Private internal networks and default container bridge ranges (172.16–172.31)
192.0.2.0/24256RFC 5737TEST-NET-1 documentation prefix for code examples and guides
192.168.0.0/1665,536RFC 1918Private home router, SMB LAN, and guest Wi-Fi DHCP pools
198.18.0.0/15131,072RFC 2544Inter-network device benchmarking & lab stress testing
224.0.0.0/4268,435,456RFC 5771IPv4 Multicast routing group range (224.0.0.0–239.255.255.255)

Frequently Asked Questions

How many usable IPv4 addresses are in a /24 or /22 subnet?

A /24 CIDR block contains 256 total IPv4 addresses (254 usable host IPs after reserving the network ID and broadcast address). A /22 contains 1,024 addresses (1,022 usable hosts).

What is the difference between a /31 link subnet and larger IPv4 subnets?

Under RFC 3021, /31 subnets eliminate network and broadcast reservations so both addresses serve directly on router-to-router point-to-point links, saving half the IPv4 space compared to /30.

What is a wildcard mask and where is it used?

A wildcard mask is the bitwise complement of the subnet mask (255.255.255.0 becomes 0.0.0.255). Router OSPF network statements and switch ACLs use 0 bits for exact matching and 1 bits for don't-care bits.

Why is /24 the smallest prefix announced on public BGP?

Global transit networks filter IPv4 prefixes longer than /24 (and IPv6 longer than /48) to prevent route explosion across core router TCAM tables.

Why do IPv6 LANs almost universally use /64?

IPv6 SLAAC (RFC 4862) mandates a 64-bit host interface identifier. Subdividing a LAN smaller than /64 breaks stateless autoconfiguration, neighbor discovery security assumptions, and mobile OS tethering.