Cryptography & Security ToolsUpdated: September 2026

IPv4 & IPv6 Subnet CIDR Calculator

Calculate network address, broadcast, usable host ranges, wildcard masks, and binary bitmasks for IPv4 (/0 to /32) and IPv6 prefix blocks client-side.

Research: LocalTooldeck Financial & Engineering Team
Audit: Verified for Mathematical Accuracy
Advertisement
Reserved 728×90 Top Responsive LeaderboardCLS Guard: Strict Layout Reservation (min-height: 250px)

100% Secure & Client-Side: Network IP topology and private routing schemes never leave your browser.

Presets:
Network Address192.168.1.0
Directed Broadcast192.168.1.255
Subnet Netmask255.255.255.0
Usable Host Range (Min - Max)192.168.1.1 — 192.168.1.254
Wildcard Mask (Cisco ACL)0.0.0.255
Total IP Addresses256
Usable Hosts ($2^h - 2$)254
IP Scope & ClassRFC 1918 Private (Class C)

Binary Bitmask Decomposition

IP Binary:11000000.10101000.00000001.01100100
Mask Binary:11111111.11111111.11111111.00000000
Network Bit:11000000.10101000.00000001.00000000

The Architecture of Classless Inter-Domain Routing (CIDR) and Subnet Masking

In Internet Protocol Version 4 (IPv4), an IP address is a 32-bit unsigned integer typically written in dotted-decimal notation as four 8-bit octets separated by periods (e.g. 192.168.1.1). In the early Internet era (RFC 791, 1981), addresses were organized into rigid "classes" (Class A, B, and C). Class A networks allocated 16 million addresses (/8), Class B allocated 65,536 addresses (/16), and Class C allocated 256 addresses (/24).

Because organizations requiring 500 addresses were forced to take an entire Class B block, the global IPv4 routing table threatened to collapse under massive address exhaustion. In 1993, the IETF standardized Classless Inter-Domain Routing (CIDR) under RFC 1519 (superseded by RFC 4632). CIDR decoupled address allocation from rigid boundaries, permitting arbitrary bitmask lengths from /0 to /32.

Mathematical Logic of Bitwise Subnet Masking

A network router determines whether an incoming packet belongs to a local subnet by performing a bitwise logical AND operation between the destination IP address and the subnet mask:

Network_Address = Destination_IP AND Subnet_Mask

For any prefix length $P$, the number of host bits $H$ equals $32 - P$. The total number of addresses in the block is $2^H$, and the usable host capacity is $(2^H) - 2$.

Complete CIDR Subnet Reference Table

PrefixSubnet MaskTotal IP AddressesUsable HostsTypical Deployment
/32255.255.255.25511 (Host route)Loopback, single device firewall rule
/31255.255.255.25422 (RFC 3021)Point-to-point router links
/30255.255.255.25242Traditional point-to-point router interconnect
/29255.255.255.24886Small business public static IP block
/28255.255.255.2401614Small DMZ or server cluster
/24255.255.255.0256254Standard LAN, AWS VPC subnet, home router
/16255.255.0.065,53665,534Corporate VPC root network, university campus
/8255.0.0.016,777,21616,777,214IANA Tier 1 regional allocation

RFC 1918 Private Address Allocations

Certain IP ranges are designated by the IANA exclusively for private intranet usage and cannot be routed across the public Internet:

  • 10.0.0.0/8 (10.0.0.0 — 10.255.255.255): 16,777,216 addresses, commonly deployed in enterprise intranets and cloud VPCs.
  • 172.16.0.0/12 (172.16.0.0 — 172.31.255.255): 1,048,576 addresses, frequently used for container orchestration (Docker bridge networks, Kubernetes pods).
  • 192.168.0.0/16 (192.168.0.0 — 192.168.255.255): 65,536 addresses, standard default for residential Wi-Fi gateways and SOHO routers.
  • 127.0.0.0/8: Loopback interfaces (localhost).
  • 169.254.0.0/16: Automatic Private IP Addressing (APIPA / Link-Local) when DHCP servers are unreachable.
Advertisement
Reserved 336×280 In-Content RectangleCLS Guard: Strict Layout Reservation (min-height: 280px)

Frequently Asked Questions (US Standards)

How does Classless Inter-Domain Routing (CIDR) notation work?
CIDR notation (e.g. 192.168.1.0/24) specifies an IP address followed by a forward slash and a prefix length representing the number of contiguous leading bits set to 1 in the subnet mask. A /24 prefix indicates 24 network bits and 8 host bits (32 - 24 = 8), yielding 2^8 = 256 total addresses.
Why are two addresses subtracted when calculating usable IPv4 hosts?
In standard IPv4 subnets (/30 and larger), the first address in the block (where all host bits are binary 0) is reserved as the Network Identifier, and the last address (where all host bits are binary 1) is reserved as the Directed Broadcast Address. Hence, Usable Hosts = (2^(32 - prefix)) - 2. Under RFC 3021, point-to-point /31 subnets represent an exception where 2 usable addresses are permitted without broadcast.
What is a wildcard mask and where is it used in network engineering?
A wildcard mask is the exact bitwise inverse of a subnet mask (Wildcard = 255.255.255.255 - SubnetMask). For example, a /24 subnet mask of 255.255.255.0 yields a wildcard mask of 0.0.0.255. Wildcard masks are used extensively in Cisco IOS Access Control Lists (ACLs) and OSPF routing configurations to match IP address ranges.
How does IPv6 subnetting differ from IPv4?
IPv6 uses 128-bit addresses represented in 8 hexadecimal quartets. Rather than conserving scarce address space through variable-length subnetting, IPv6 standardizes on /64 as the canonical single subnet size for Stateless Address Autoconfiguration (SLAAC). Standard enterprise allocations receive a /48 site prefix, providing 65,536 individual /64 subnets.
Advertisement
Reserved Responsive Bottom PlacementCLS Guard: Strict Layout Reservation (min-height: 250px)
Advertisement
Reserved 320×100 Mobile Anchor