Subnet Calculator
Calculate subnet mask, network address, broadcast address, and usable host range from an IP address and CIDR prefix.
Calculate total and usable IP addresses for any CIDR range. Plan IP allocation for VPCs, subnets, and networks.
| CIDR | Subnet Mask | Total IPs | Usable | Typical Use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216.00 | 16,777,209.00 | Class A |
| /10 | 255.192.0.0 | 4,194,304.00 | 4,194,297.00 | Large ISP |
| /12 | 255.240.0.0 | 1,048,576.00 | 1,048,569.00 | ISP block |
| /16 | 255.255.0.0 | 65,536.00 | 65,529.00 | Class B / large org |
| /18 | 255.255.192.0 | 16,384.00 | 16,377.00 | Data center |
| /20 | 255.255.240.0 | 4,096.00 | 4,089.00 | AWS VPC default |
| /22 | 255.255.252.0 | 1,024.00 | 1,017.00 | Medium subnet |
| /24 | 255.255.255.0 | 256.00 | 249.00 | Standard LAN |
| /25 | 255.255.255.128 | 128.00 | 121.00 | Half /24 |
| /26 | 255.255.255.192 | 64.00 | 57.00 | Small office |
| /27 | 255.255.255.224 | 32.00 | 25.00 | Tiny subnet |
| /28 | 255.255.255.240 | 16.00 | 9.00 | AWS minimum |
| /29 | 255.255.255.248 | 8.00 | 1.00 | Micro subnet |
| /30 | 255.255.255.252 | 4.00 | 0.00 | Point-to-point |
| /31 | 255.255.255.254 | 2.00 | 0.00 | RFC 3021 p2p |
| /32 | 255.255.255.255 | 1.00 | 0.00 | Single host |
IP address planning is fundamental to network architecture. Every device, container, load balancer, and service endpoint consumes an IP address. Running out of addresses in a subnet forces disruptive resizing operations.
This calculator helps planners determine how many IP addresses are available in a given CIDR range and how many subnets can be carved from a larger network block. It accounts for reserved addresses (network, broadcast, and cloud provider reservations) to show the truly usable count.
Cloud providers reserve additional addresses beyond the standard network and broadcast addresses. AWS reserves 5 addresses per subnet (.0, .1, .2, .3, and .255). Understanding these reservations is critical for accurate capacity planning.
Running out of IP addresses forces costly network reconfiguration. This calculator helps plan address allocation with sufficient headroom for growth.
Total Addresses = 2^(32 โ prefix)
Standard Reserved = 2 (network + broadcast)
Cloud Reserved = provider_reserved_count
Usable = Total โ Standard Reserved โ Cloud ReservedResult: 251 usable out of 256 total
A /24 has 256 total addresses. AWS reserves 5 addresses (.0 network, .1 VPC router, .2 DNS, .3 future use, .255 broadcast). Usable: 256 โ 5 = 251 addresses for your resources.
Cloud providers reserve addresses for infrastructure services. AWS reserves 5 per subnet for routing, DNS, and future use. Azure reserves 5 for gateway, DNS, and broadcast. GCP reserves 4. These reservations reduce usable addresses, especially in small subnets.
Network architects typically plan for 3โ5 years of growth. If you currently need 50 IPs, choose a subnet supporting 200+ to accommodate growth without reshuffling. For dynamic environments (auto-scaling, Kubernetes), planning is even more critical because IP consumption fluctuates.
Monitor IP utilization with cloud provider tools (VPC Flow Logs, IPAM services). Set alerts at 70% utilization. When approaching capacity, plan migration to larger subnets during maintenance windows to avoid emergency resizing.
Last updated:
AWS reserves 5 addresses: .0 (network), .1 (VPC router), .2 (DNS server), .3 (reserved for future use), and .255 (broadcast). A /24 subnet therefore has 251 usable addresses, not 254.
In VPC-CNI mode (AWS), each pod gets its own IP. A cluster with 100 nodes and 30 pods per node needs 3,000+ IPs. Use /20 (4,091 usable) or /19 (8,187 usable) subnets for Kubernetes workloads.
New pods, instances, and services fail to launch with 'InsufficientFreeAddresses' errors. Resolution requires either migrating to a larger subnet (disruptive), adding secondary CIDR blocks, or reducing IP consumption.
In most cloud providers, you cannot resize an existing subnet. You must create a new larger subnet, migrate resources, and delete the old one. This is why planning for growth upfront is critical.
A /16 contains 65,536 addresses. It can be divided into 256 /24 subnets (254 hosts each), 16 /20 subnets (4,094 hosts each), or any other combination that fits without overlap.
Use private IPs (RFC 1918) for internal resources and public IPs only for internet-facing endpoints. NAT gateways allow private resources to access the internet. This conserves public IP address space and improves security.
Calculate subnet mask, network address, broadcast address, and usable host range from an IP address and CIDR prefix.
Convert CIDR notation to first and last IP addresses, total host count, and subnet mask. Supports all IPv4 prefixes.
Calculate VLAN capacity and plan broadcast domain sizing based on host count, traffic patterns, and performance targets.