CIDR IP Subnet Calculator – DataMorph
Determine IP address allocations using CIDR notation. View subnet ranges, host counts, and masks.
CIDR Calculator — IP Subnet Calculator
Enter any IP address with a CIDR prefix (e.g., 192.168.1.0/24) to instantly calculate the network address, broadcast address, usable host range, subnet mask, wildcard mask, and total host count. Supports IPv4 and IPv6, includes an RFC 1918 private range reference, and helps you plan subnets for AWS VPCs, Kubernetes networks, and on-premises infrastructure.
How CIDR Notation Works
CIDR (Classless Inter-Domain Routing) notation writes an IP address followed by a slash and the number of network bits. For example: 192.168.1.0/24
- 192.168.1.0 — The IP address (in binary: 11000000.10101000.00000001.00000000)
- /24 — The first 24 bits are the network portion (fixed)
- Remaining 8 bits — The host portion (identifies individual hosts)
- Host count: 2⁸ = 256 total addresses; 254 usable (subtract network + broadcast)
IPv4 CIDR Prefix Reference Table
| Prefix | Subnet Mask | Wildcard Mask | Total Addresses | Usable Hosts | Common Use |
|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | Large ISP / Class A |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | Large enterprise / Class B |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | AWS VPC default, large office |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | Medium enterprise network |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | Most common LAN segment |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | Split /24 into two halves |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | Small network segment |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | Small team network |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | AWS subnet minimum |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | Small network link |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | Point-to-point WAN links |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | Point-to-point (RFC 3021) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | Single host route / loopback |
RFC 1918 Private IP Address Ranges
RFC 1918 defines three IP ranges reserved for private networks. These are not routable on the public internet and require NAT to access the internet:
| Range | CIDR | Total Addresses | Common Use |
|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 | Large enterprise, cloud VPCs (AWS default: 10.0.0.0/16) |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 | Enterprise, Docker default (172.17.0.0/16) |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 | Home routers (192.168.0.0/24 or 192.168.1.0/24) |
Also reserved: 169.254.0.0/16 (APIPA/link-local), 127.0.0.0/8 (loopback), 100.64.0.0/10 (carrier-grade NAT, RFC 6598).
Cloud CIDR Planning Guide
AWS VPC Recommendations
- Use
/16for your VPC (65,534 addresses) — provides room to grow. - AWS reserves 5 IP addresses per subnet (network, VPC router, DNS, future, broadcast).
- Minimum subnet size in AWS:
/28(11 usable IPs after AWS reservations). - Common pattern:
10.0.0.0/16VPC →/24subnets per AZ per tier.
Example AWS 3-tier architecture:
VPC: 10.0.0.0/16
Public Subnets (per AZ):
us-east-1a: 10.0.1.0/24 (254 hosts)
us-east-1b: 10.0.2.0/24 (254 hosts)
us-east-1c: 10.0.3.0/24 (254 hosts)
Private App Subnets:
us-east-1a: 10.0.11.0/24
us-east-1b: 10.0.12.0/24
us-east-1c: 10.0.13.0/24
Private Data Subnets:
us-east-1a: 10.0.21.0/24
us-east-1b: 10.0.22.0/24
us-east-1c: 10.0.23.0/24Subnetting Example: Splitting a /24
To divide 192.168.1.0/24 (254 hosts) into 4 equal subnets, borrow 2 bits from the host portion → /26:
| Subnet | Network Address | Host Range | Broadcast | Hosts |
|---|---|---|---|---|
| 1st /26 | 192.168.1.0 | .1 – .62 | 192.168.1.63 | 62 |
| 2nd /26 | 192.168.1.64 | .65 – .126 | 192.168.1.127 | 62 |
| 3rd /26 | 192.168.1.128 | .129 – .190 | 192.168.1.191 | 62 |
| 4th /26 | 192.168.1.192 | .193 – .254 | 192.168.1.255 | 62 |
Frequently Asked Questions
What does /24 mean in CIDR notation?
/24 means the first 24 bits of the 32-bit IPv4 address are the network portion, leaving 8 bits for host addresses. This equals subnet mask 255.255.255.0, giving 2⁸ = 256 total addresses and 254 usable hosts (network address and broadcast are reserved).
How do I calculate the number of usable hosts?
Usable hosts = 2^(32 − prefix_length) − 2. The −2 accounts for the network address (first) and broadcast address (last). For /24: 2^8 − 2 = 254 hosts. Exception: /31 and /32 use special rules per RFC 3021.
What is a broadcast address?
The broadcast address is the last address in a subnet (all host bits set to 1). Any packet sent to this address is delivered to all hosts on the subnet. For 192.168.1.0/24, the broadcast address is 192.168.1.255.
What is the difference between subnet mask and wildcard mask?
A subnet mask uses 1s for network bits and 0s for host bits (e.g., 255.255.255.0 for /24). A wildcard mask is the bitwise inverse — 0s for network bits and 1s for host bits (0.0.0.255 for /24). Wildcard masks are used in Cisco ACLs and some firewall rules.
Can I use this calculator for IPv6?
Yes. IPv6 uses the same CIDR prefix notation (e.g., 2001:db8::/32). Common IPv6 prefixes: /48 per site, /64 per subnet, /128 for a single host. Our calculator handles both IPv4 and IPv6 calculations.
Related Tools
- Subnet Calculator — Advanced subnet planning and VLSM calculations.
- IP Range Generator — Generate sequential IP address lists from a range.
- IP Lookup — Find geolocation and ASN data for any public IP address.
- DNS Lookup — Query DNS records for any domain.
- IPv4 to IPv6 Converter — Convert IPv4 addresses to IPv6 mapped format.
- Bandwidth Calculator — Plan network throughput for your subnets.