IP Subnet CIDR Calculator
Calculate subnet specifications, network masks, usable IP ranges, hosts count, and binary structures instantly.
âī¸ IP Configurations
đ Subnetting Outputs
IPv4 Addressing, Subnet Masks & Classless Inter-Domain Routing (CIDR)
Internet Protocol version 4 (IPv4) addresses are 32-bit binary numbers typically written in human-readable dot-decimal notation (e.g. 192.168.1.1). To partition networks efficiently and prevent routing table explosion, the Internet Engineering Task Force (IETF) introduced Classless Inter-Domain Routing (CIDR) via RFC 1518 and RFC 1519, replacing obsolete Class A, B, and C networks.
CIDR notation appends a slash followed by a prefix length (e.g. /24) indicating how many contiguous leading bits of the 32-bit address represent the network identifier. The remaining bits designate specific hosts on that subnetwork.
Calculating subnet boundaries requires bitwise Boolean logic: performing a bitwise AND operation between the IPv4 address and the subnet mask computes the network address, while inverting the mask (wildcard) and performing a bitwise OR computes the broadcast address. Our CIDR Subnet Calculator automates these bitwise transformations instantly in your browser.
RFC 1918 Private Address Spaces & Cloud VPC Architectures
In modern cloud engineering (AWS VPC, Google Cloud VPC, Azure Virtual Network), private subnet planning is crucial. RFC 1918 establishes three reserved private address blocks that are non-routable on the public internet:
- 24-bit block (
10.0.0.0/8):10.0.0.0to10.255.255.255(16,777,216 addresses) - Standard for large enterprise architectures. - 20-bit block (
172.16.0.0/12):172.16.0.0to172.31.255.255(1,048,576 addresses) - Commonly used in Docker container bridges and Kubernetes pods. - 16-bit block (
192.168.0.0/16):192.168.0.0to192.168.255.255(65,536 addresses) - Ubiquitous in consumer Wi-Fi routers and home lab environments.
Subnet Mask Reference Table (/24 to /30)
Understanding common subnet prefix lengths and their capacity:
| CIDR Prefix | Subnet Mask | Total IPs | Usable Hosts | Primary Use Case |
|---|---|---|---|---|
/24 | 255.255.255.0 | 256 | 254 | Standard office or web tier subnet |
/26 | 255.255.255.192 | 64 | 62 | Microservice cluster partition |
/28 | 255.255.255.240 | 16 | 14 | Database replica pair / small DMZ |
/30 | 255.255.255.252 | 4 | 2 | Point-to-point router links |
/32 | 255.255.255.255 | 1 | 1 | Single host route / firewall rule |
Why Usable Hosts Equal (2^(32 - prefix) - 2)
In standard IPv4 networking, two IP addresses are strictly reserved in every subnet: the Network Address (all host bits set to 0) used by routers to identify the subnet itself, and the Broadcast Address (all host bits set to 1) used to send packets to all hosts on the subnet simultaneously. Therefore, a /24 subnet with 256 total addresses yields exactly 256 - 2 = 254 usable host IPs. Note that cloud providers like AWS reserve 5 addresses per subnet (network, router, DNS, future use, broadcast).
CIDR Prefix Bitmasking, VLSM & RFC 1918 Private Address Spaces
Classless Inter-Domain Routing (CIDR), introduced in RFC 1519, replaced legacy classful networking (Class A, B, C) with flexible variable-length subnet masks (VLSM). An IPv4 address comprises 32 binary bits divided into a Network Identifier prefix and a Host Identifier suffix by the subnet mask.
Bitwise operations determine network boundaries: performing a bitwise AND between the IP and subnet mask yields the Network Address (the first unassignable address in the block), while bitwise OR with the inverted mask yields the Broadcast Address (the final unassignable address). The remaining addresses represent assignable client host IPs (calculated as 2^(32 - prefix) - 2).
RFC 1918 Private IP Address Ranges
- 10.0.0.0/8: 16,777,216 addresses (Large enterprise intranets and cloud VPCs).
- 172.16.0.0/12: 1,048,576 addresses (Medium enterprise networks and Docker bridge subnets).
- 192.168.0.0/16: 65,536 addresses (Standard residential and small-office LAN routers).
Frequently Asked Questions
A wildcard mask is the exact inverted bitwise counterpart of a subnet mask (calculated as 255.255.255.255 minus the subnet mask). Wildcard masks are widely used in Cisco ACLs and OSPF configurations.
RFC 3021 specifies that /31 subnets (with only 2 addresses) can be used for point-to-point links between routers, eliminating the standard 2-address reservation penalty to preserve IPv4 space.
No. Overlapping CIDR blocks in a routing table cause non-deterministic routing conflicts and packet drops. Always plan your VPC CIDR blocks hierarchically.
It consists of 24 contiguous ones followed by 8 zeros: 11111111.11111111.11111111.00000000, which is why it is denoted as /24.
No. All calculations are executed locally in your browser using 32-bit unsigned bitwise integer arithmetic. Your network architecture remains completely confidential.