Subnet & CIDR IP Range Calculator

Convert IP address ranges & subnet masks to CIDR notation, or calculate IPv4 network/broadcast addresses, usable host IPs & wildcard masks in your browser.

Network Architecture Presets:
IPv4 Class:Class C
Routing Scope:Private (RFC 1918)
Subnet Mask:255.255.255.0 (0xFFFFFF00)
Wildcard (Inverse) Mask:0.0.0.255
Network Address
192.168.1.0/24
Broadcast Address
192.168.1.255
Usable Hosts
254
Total IP Addresses: 256
Usable Host IP Range
192.168.1.1 — 192.168.1.254

32-Bit Binary Bitmask Architecture

IP Binary (192.168.1.100)
11000000101010000000000101100100
Mask Binary (255.255.255.0)
11111111111111111111111100000000
Network Binary (192.168.1.0)
11000000101010000000000100000000
Network / Subnet Bits: 24 bits
Host Bits: 8 bits

Subnet Hierarchical Division Matrix

/25 Subnets (2 subnets • 126 Usable Hosts / Subnet)
Subnet (CIDR)Usable Host RangeBroadcast
192.168.1.0/25192.168.1.1 - 192.168.1.126192.168.1.127
192.168.1.128/25192.168.1.129 - 192.168.1.254192.168.1.255
/26 Subnets (4 subnets • 62 Usable Hosts / Subnet)
Subnet (CIDR)Usable Host RangeBroadcast
192.168.1.0/26192.168.1.1 - 192.168.1.62192.168.1.63
192.168.1.64/26192.168.1.65 - 192.168.1.126192.168.1.127
192.168.1.128/26192.168.1.129 - 192.168.1.190192.168.1.191
192.168.1.192/26192.168.1.193 - 192.168.1.254192.168.1.255
/27 Subnets (8 subnets • 30 Usable Hosts / Subnet)
Subnet (CIDR)Usable Host RangeBroadcast
192.168.1.0/27192.168.1.1 - 192.168.1.30192.168.1.31
192.168.1.32/27192.168.1.33 - 192.168.1.62192.168.1.63
192.168.1.64/27192.168.1.65 - 192.168.1.94192.168.1.95
192.168.1.96/27192.168.1.97 - 192.168.1.126192.168.1.127
192.168.1.128/27192.168.1.129 - 192.168.1.158192.168.1.159
192.168.1.160/27192.168.1.161 - 192.168.1.190192.168.1.191
192.168.1.192/27192.168.1.193 - 192.168.1.222192.168.1.223
192.168.1.224/27192.168.1.225 - 192.168.1.254192.168.1.255

The Mathematics of CIDR & Bitwise Subnet Masking (VLSM)

Classless Inter-Domain Routing (CIDR), standardized in RFC 4632 and RFC 1519, replaced the legacy classful addressing architecture (Classes A, B, and C) to allocate IPv4 address space with mathematical precision.

An IPv4 address consists of exactly 32 bits divided into 4 octets. In CIDR notation (e.g. 192.168.1.0/24), the prefix length p specifies the number of contiguous leading bits assigned to the network identifier, while the remaining 32 − p bits identify individual hosts.

Bitwise Logic & Subnet Calculations

Network Address:    Network = IP & Netmask (bitwise AND)
Broadcast Address: Broadcast = Network | (∼Netmask) (bitwise OR with bitwise NOT of mask)
Wildcard Mask:      Wildcard = ~Netmask = 255.255.255.255 − Netmask
Total Addresses:   Total = 2(32 − p)
Usable Host Count:  Usable = 2(32 − p) − 2   (for p ≤ 30)

For a standard /24 network, p = 24 yields 28 = 256 total addresses, with 254 usable host addresses because the network ID (all host bits 0) and the broadcast address (all host bits 1) are reserved. Under RFC 3021, point-to-point links using /31 subnets allocate exactly 2 usable host addresses without broadcast overhead.

IPv4 Subnet Mask & Host Capacity Quick Reference Matrix

Engineers sizing cloud Virtual Private Clouds (VPCs) and corporate networks rely on standard CIDR prefix boundaries:

Prefix Subnet Mask Wildcard Mask Total IPs Usable Hosts Common Architecture Role
/16 255.255.0.0 0.0.255.255 65,536 65,534 Primary Cloud VPC Supernet (AWS, GCP, Azure)
/20 255.255.240.0 0.0.15.255 4,096 4,094 Large Kubernetes Pod CNI Network
/24 255.255.255.0 0.0.0.255 256 254 Standard Corporate LAN / Availability Zone Subnet
/26 255.255.255.192 0.0.0.63 64 62 Database Cluster / Private Tier
/28 255.255.255.240 0.0.0.15 16 14 Load Balancer (ALB) Management Tier
/29 255.255.255.248 0.0.0.7 8 6 ISP Small Office Static IP Block
/30 255.255.255.252 0.0.0.3 4 2 Legacy Router-to-Router Point-to-Point Link
/31 255.255.255.254 0.0.0.1 2 2 RFC 3021 Modern Point-to-Point (No Broadcast)
/32 255.255.255.255 0.0.0.0 1 1 Loopback Interface / Specific Host Route ACL

RFC Special-Use Address Blocks, Private Ranges & CGNAT

The Internet Assigned Numbers Authority (IANA) reserves specific IPv4 address blocks for private routing, internal testing, and telecommunication infrastructure:

  • RFC 1918 Private Ranges (Non-Routable on Public Internet):
    • 10.0.0.0/8 (10.0.0.0 – 10.255.255.255) — 16,777,216 addresses for enterprise networks.
    • 172.16.0.0/12 (172.16.0.0 – 172.31.255.255) — 1,048,576 addresses commonly used in container runtimes (Docker, Podman).
    • 192.168.0.0/16 (192.168.0.0 – 192.168.255.255) — 65,536 addresses ubiquitous in consumer Wi-Fi routers.
  • RFC 6598 Carrier-Grade NAT (CGNAT): 100.64.0.0/10 (100.64.0.0 – 100.127.255.255) provides 4,194,304 addresses deployed by Internet Service Providers (ISPs) to multiplex residential subscribers behind shared public IPv4 gateways.
  • RFC 3927 Link-Local (APIPA): 169.254.0.0/16 is automatically assigned when a host fails to acquire a lease from a DHCP server.
  • RFC 1122 Loopback: 127.0.0.0/8 routes traffic internally back to the local host operating system.

Subnetting Traps: Cloud Reserved Addresses & Wildcard Masks

Network engineers and DevOps professionals must guard against two critical architectural gotchas:

  • The Cloud 5-IP Reservation Rule (AWS & Azure): While on-premise RFC 4632 subnets reserve only 2 addresses (Network ID and Broadcast), public cloud providers (such as AWS VPC) reserve 5 IP addresses in every subnet:
    • .0: Network address
    • .1: VPC router gateway
    • .2: DNS resolver (AmazonProvidedDNS)
    • .3: Future AWS internal service use
    • .255: Network broadcast address
    A /28 cloud subnet (16 total IPs) provides only 11 usable IP addresses, not 14!
  • ACL Wildcard Masks (Inverted Netmasks): Cisco and firewall Access Control Lists (ACLs) use wildcard bitmasks where binary 0 signifies "must match exactly" and 1 signifies "ignore / wildcard". For instance, a /24 subnet mask 255.255.255.0 translates to the wildcard mask 0.0.0.255.

Practical Real-World Use Cases

1. Cloud VPC & Multi-Tier Subnet Planning (AWS, GCP, Azure):

Partition a primary cloud VPC block (e.g., 10.0.0.0/16) into isolated public web tiers (/24), private microservice tiers (/22), and database clusters (/26) with zero IP overlap across availability zones.

2. Point-to-Point Router Interconnects (RFC 3021):

Configure ultra-efficient /31 subnets for dedicated point-to-point router-to-router links, conserving public IPv4 allocations without wasting 50% of the block on unused network and broadcast addresses.

3. Kubernetes Pod CIDR & CNI Overlay Allocation:

Plan cluster pod CIDR ranges (such as 10.244.0.0/16) and assign deterministic /24 subnets per worker node, ensuring sufficient IP capacity for auto-scaling container workloads without IP exhaustion.

4. Firewall Security Rule & Routing Table Hardening:

Derive exact network boundaries and broadcast ranges when creating ingress firewall rules, avoiding accidental over-permissioning of adjacent internal networks.

Absolute Privacy & Zero Server Upload

Internal enterprise IP schemes, VPC topology plans, and subnet boundaries represent sensitive infrastructure configuration. OmniTools runs 100% locally in your browser using pure client-side bitwise arithmetic:

  • Zero Network Transmissions: Your IP addresses, CIDR masks, and internal host counts never leave your local machine or touch a remote server.
  • Zero Logging or Telemetry: No external analytics capture your network designs, keeping your enterprise topologies confidential.
  • Instant Offline Operation: Fully functional offline without internet access, making it safe for air-gapped data centers and security audit environments.

Frequently Asked Questions

How do I convert a subnet mask to CIDR notation or calculate CIDR IP ranges?

Count the number of continuous leading 1-bits in the 32-bit binary subnet mask. For example, 255.255.255.0 has 24 leading 1-bits (/24) with 256 total IPv4 addresses (254 usable hosts), while 255.255.0.0 equals /16 with 65,536 total addresses. Enter any IPv4 address and prefix length above to compute the network address, broadcast address, wildcard mask, and usable host IP range.

How many usable IP addresses are in a /24 vs /28 subnet?

Under standard RFC 4632 networking, a /24 subnet provides 256 total IPs and 254 usable host IPs (reserving network and broadcast addresses), while a /28 subnet provides 16 total IPs and 14 usable hosts. In cloud VPCs like AWS, Azure, and GCP, 5 IPs are reserved per subnet, leaving 251 usable IPs in a /24 and 11 usable IPs in a /28.

What is the difference between a subnet mask and a wildcard mask?

A subnet mask uses binary 1s to identify the network prefix and 0s for the host portion (e.g., 255.255.255.0 for /24). A wildcard mask is the bitwise inverse (255.255.255.255 minus the subnet mask, e.g., 0.0.0.255), used in Cisco ACLs and OSPF routing rules.