IPv4 Subnet Calculator
Calculate IPv4 subnets, CIDR, and network ranges
Table of Contents
Calculate IP subnets, CIDR notation, network addresses, and available host ranges. Essential for network planning and troubleshooting.
Calculate Subnet
Common Use Cases
- Network Planning: Design IP address schemes for new networks
- Subnet Division: Split networks into smaller subnets
- VLAN Configuration: Calculate IP ranges for VLANs
- Troubleshooting: Verify if IPs are in the correct subnet
- Documentation: Generate network documentation
- Cloud Networking: Plan VPC/subnet configurations in AWS, Azure, GCP
Common Subnet Masks
| CIDR | Subnet Mask | Hosts | Typical Use |
|---|---|---|---|
| /30 | 255.255.255.252 | 2 | Point-to-point links |
| /29 | 255.255.255.248 | 6 | Small office networks |
| /28 | 255.255.255.240 | 14 | Small subnets |
| /27 | 255.255.255.224 | 30 | Department networks |
| /26 | 255.255.255.192 | 62 | Medium networks |
| /25 | 255.255.255.128 | 126 | Large department networks |
| /24 | 255.255.255.0 | 254 | Standard Class C |
| /23 | 255.255.254.0 | 510 | Two Class C networks |
| /22 | 255.255.252.0 | 1022 | Four Class C networks |
| /21 | 255.255.248.0 | 2046 | Eight Class C networks |
| /20 | 255.255.240.0 | 4094 | 16 Class C networks |
| /16 | 255.255.0.0 | 65534 | Class B network |
| /8 | 255.0.0.0 | 16M | Class A network |
Private IP Ranges (RFC 1918)
- 10.0.0.0/8 - 10.0.0.0 to 10.255.255.255 (16,777,216 IPs)
- 172.16.0.0/12 - 172.16.0.0 to 172.31.255.255 (1,048,576 IPs)
- 192.168.0.0/16 - 192.168.0.0 to 192.168.255.255 (65,536 IPs)
Subnet Calculation Tips
- Network address has all host bits set to 0
- Broadcast address has all host bits set to 1
- First usable host = Network address + 1
- Last usable host = Broadcast address - 1
- Total hosts = 2^(host bits) - 2 (minus network and broadcast)
- /32 represents a single IP address
- /31 is used for point-to-point links (RFC 3021)