How to use the subnet calculator
Enter an IPv4 address followed by a prefix length, for example 192.168.1.10/24. The calculator shows the network and broadcast addresses, the first and last usable host, the subnet and wildcard masks, and how many hosts fit in the block. If you type a host address, it also tells you which network that host belongs to.
Planning subnets for AWS, Azure and Google Cloud
- Give the VPC a large private block such as
10.0.0.0/16so you can add subnets later. - Create separate public and private subnets in each availability zone, typically
/20to/24. - AWS reserves 5 addresses per subnet and Azure reserves 5; Google Cloud reserves 4. Plan for that overhead.
- Never overlap CIDR blocks between VPCs you might later peer or connect over VPN.
Quick CIDR reference
| Prefix | Subnet mask | Addresses |
|---|---|---|
| /16 | 255.255.0.0 | 65,536 |
| /20 | 255.255.240.0 | 4,096 |
| /24 | 255.255.255.0 | 256 |
| /26 | 255.255.255.192 | 64 |
| /28 | 255.255.255.240 | 16 |
| /30 | 255.255.255.252 | 4 |