IPv4 CIDR Subnet Mask Calculator

Network, broadcast & usable range · /31 RFC 3021 & /32 aware · Wildcard & binary

Ready
Ctrl+Enter Compute · 100% Local
Advertisement
Reserved fixed-height slot (CLS = 0.00) 728×90 320×100 300×50

CIDR Bitmath, Wildcard Masks, and RFC 3021 /31 Edge Cases

Classless Inter-Domain Routing (RFC 4632) replaces obsolete Class A/B/C boundaries with a variable prefix length /n (0–32). Applying bitwise AND between any IPv4 address and its /n mask yields the network ID, while bitwise OR with the inverted wildcard mask yields the broadcast address. For standard prefixes (/0–/30), total addresses equal 2^(32-n) and usable hosts equal 2^(32-n) - 2.

Two prefixes break the standard minus-2 formula: a /32 mask represents a single host route (1 usable address, e.g., loopback or firewall allowlist), and per RFC 3021 a /31 subnet allocates both addresses to point-to-point router interfaces (2 usable hosts, zero broadcast waste). Always verify whether your cloud provider reserves additional IPs beyond network and broadcast.

  • CIDR Prefix RangeFull IPv4 /0 through /32 support including RFC 3021 /31 (2 usable P2P hosts) and /32 single-host routes.
  • Computed FieldsNetwork ID, Broadcast IP, First/Last Usable Host, Total & Usable Count, Dotted Subnet Mask, Cisco Wildcard Mask.
  • Address Scope AuditFlags RFC 1918 private space, RFC 6598 CGNAT (100.64.0.0/10), Loopback (127.0.0.0/8), and Link-Local (169.254.0.0/16).
How many usable IPs are in a /24, /26, and /28 subnet?

On standard LANs, /24 has 254 usable hosts (256 total), /26 has 62 usable hosts (64 total), and /28 has 14 usable hosts (16 total). In AWS VPCs, subtract 3 more reserved IPs (giving 251, 59, and 11).

What is a Cisco wildcard mask?

A wildcard mask is the bitwise inverse of the subnet mask (255.255.255.255 minus subnet mask), used in OSPF network statements and Cisco/Juniper ACLs—for example, /24 mask 255.255.255.0 has wildcard 0.0.0.255.

Why does 192.168.1.42/24 normalize to network 192.168.1.0/24?

Host bits in the final octet (.42) are cleared to zero when computing the canonical CIDR network base address.