← Home / IP Subnet Calculator & CIDR Notation (/24, /16, /28)
100% Client-Side In-Browser Calculation (Zero Latency & Total Privacy)

IPv4 Subnet Calculator & CIDR Range Inspector

Compute subnet mask, network IP, broadcast, first/last usable host, and total addresses for IPv4 networks.

IPv4 Subnetting & CIDR Notation Fundamentals (RFC 4632)

In modern computer networking, IPv4 addressing utilizes 32-bit binary integers grouped into four 8-bit octets separated by dots (from 0.0.0.0 to 255.255.255.255). Subnetting and CIDR (Classless Inter-Domain Routing - RFC 4632) revolutionized address allocation by eliminating legacy Class A, B, and C rigid boundaries in favor of variable-length prefix masks.

1. Anatomy of a Subnet Mask: Network vs Host Bits

Every IPv4 subnet mask divides the 32 bits into two segments:

  • Network Prefix (CIDR Bits): The leading contiguous sequence of binary 1s that specifies the network routing prefix. For example, /24 means 24 ones followed by 8 zeros, representing dotted decimal 255.255.255.0.
  • Host Identifier: The trailing sequence of binary 0s that uniquely identifies interfaces within that particular sub-network.

2. Frequently Used CIDR Subnet Masks Reference

CIDR Dotted Mask Total IPs Usable Hosts Common Use Case
/30 255.255.255.252 4 2 Point-to-point router links
/28 255.255.255.240 16 14 Small DMZ or isolated microservice clusters
/24 255.255.255.0 256 254 Standard office LANs and Kubernetes pod subnets
/16 255.255.0.0 65,536 65,534 Cloud VPCs (AWS VPC, GCP Virtual Networks)

The Two Reserved Addresses Rule: In standard IPv4 subnets, exactly two addresses cannot be allocated to endpoints: the first IP serves as the Network Wire Address, and the final IP is reserved as the Directed Broadcast Address.

Frequently Asked Questions (FAQ)

What are the RFC 1918 private IPv4 address ranges?+
RFC 1918 reserves three non-routable address spaces for private networking: 10.0.0.0/8 (large enterprises), 172.16.0.0/12 (medium-to-large environments), and 192.168.0.0/16 (home routers and small offices).
What is a Wildcard Mask and where is it used?+
A wildcard mask is the bitwise inverse of a subnet mask (e.g., 255.255.255.0 becomes 0.0.0.255). It is used primarily in routing protocols like OSPF and in Cisco IOS Access Control Lists (ACLs) to specify ranges of IP addresses to match.
Are /31 and /32 subnets usable for host addressing?+
Under RFC 3021, /31 subnets (which contain 2 IPs) can be used on point-to-point links without wasting network or broadcast addresses. A /32 subnet represents a single host route (255.255.255.255) commonly used for loopback interfaces and firewall rule definitions.

Popular Developer Tools

URL Parser & Inspector

Inspect protocols, ports, pathnames, and query parameters.

HTTP Status Codes

Comprehensive REST API error code catalog and specs.

Cron Expression Generator

Create cron expressions with plain English human translation.

JSON Formatter

Format, validate, and beautify JSON payloads client-side.