DataMorphDEVELOPER TOOLKIT
Tools🔗 PipelinesAI MCPAll Tools

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

PrefixSubnet MaskWildcard MaskTotal AddressesUsable HostsCommon Use
/8255.0.0.00.255.255.25516,777,21616,777,214Large ISP / Class A
/16255.255.0.00.0.255.25565,53665,534Large enterprise / Class B
/20255.255.240.00.0.15.2554,0964,094AWS VPC default, large office
/22255.255.252.00.0.3.2551,0241,022Medium enterprise network
/24255.255.255.00.0.0.255256254Most common LAN segment
/25255.255.255.1280.0.0.127128126Split /24 into two halves
/26255.255.255.1920.0.0.636462Small network segment
/27255.255.255.2240.0.0.313230Small team network
/28255.255.255.2400.0.0.151614AWS subnet minimum
/29255.255.255.2480.0.0.786Small network link
/30255.255.255.2520.0.0.342Point-to-point WAN links
/31255.255.255.2540.0.0.122Point-to-point (RFC 3021)
/32255.255.255.2550.0.0.011Single 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:

RangeCIDRTotal AddressesCommon Use
10.0.0.0 – 10.255.255.25510.0.0.0/816,777,216Large enterprise, cloud VPCs (AWS default: 10.0.0.0/16)
172.16.0.0 – 172.31.255.255172.16.0.0/121,048,576Enterprise, Docker default (172.17.0.0/16)
192.168.0.0 – 192.168.255.255192.168.0.0/1665,536Home 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 /16 for 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/16 VPC → /24 subnets 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/24

Subnetting 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:

SubnetNetwork AddressHost RangeBroadcastHosts
1st /26192.168.1.0.1 – .62192.168.1.6362
2nd /26192.168.1.64.65 – .126192.168.1.12762
3rd /26192.168.1.128.129 – .190192.168.1.19162
4th /26192.168.1.192.193 – .254192.168.1.25562

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