Skip to content
OpsAtlas

CIDR calculator and subnet splitter

Network

Enter an IPv4 block to see its network, broadcast, usable range and masks, then split it into equal subnets for VPCs, VLANs or Kubernetes pod ranges.

Runs entirely in your browser — your input is never uploaded.

Examples: 10.0.0.0/16, 192.168.1.37/24, 172.16.0.1 255.255.240.0

Result

Enter a CIDR block or load the sample to see the network details.

Split into subnets

How CIDR notation works

An IPv4 address is 32 bits. The number after the slash, the prefix length, says how many of those bits identify the network; the remaining bits identify hosts inside it. 10.20.0.0/16 therefore fixes the first 16 bits (10.20) and leaves 16 bits, or 65,536 addresses, for hosts.

The calculator derives everything else from those two numbers:

  • Subnet mask: the prefix written as dotted bits, /16 → 255.255.0.0.
  • Network address: the address with all host bits cleared.
  • Broadcast address: the address with all host bits set.
  • Usable range: everything between the two, except for /31 and /32 (see the FAQ).

If you type an address with host bits set, such as 192.168.1.37/24, the calculator shows the network it belongs to (192.168.1.0/24) and tells you so. Cloud consoles and ip route reject such blocks, so the warning is worth reading.

Splitting a block into subnets

Splitting borrows host bits for the network. Each extra bit doubles the number of subnets and halves their size:

From 10.20.0.0/16SubnetsUsable hosts each
/17232,766
/20164,094
/24256254
/261,02462

Choose Number of subnets when you know how many tiers, zones or VLANs you need; the calculator rounds up to the next power of two. Choose Hosts per subnet when you know the largest workload; it picks the smallest subnet that still fits. Large splits show the first 256 rows, and the CSV download contains the same rows.

Example: a VPC across three availability zones

You have 10.20.0.0/16 and need a public and a private subnet in each of three zones, so six subnets. Asking for 6 subnets gives /19 (eight subnets of 8,190 usable hosts), which leaves two spare blocks for later:

10.20.0.0/19    public  a
10.20.32.0/19   public  b
10.20.64.0/19   public  c
10.20.96.0/19   private a
10.20.128.0/19  private b
10.20.160.0/19  private c
10.20.192.0/19  spare
10.20.224.0/19  spare

Common mistakes

  • Overlapping ranges. Peered VPCs, VPN sites and Kubernetes pod/service CIDRs must not overlap. Plan them together before you create anything; most of them cannot be changed later.
  • Forgetting provider reservations. AWS and Azure keep five addresses per subnet, GCP four. A /28 on AWS has 11 usable addresses, not 14.
  • Sizing for today. Kubernetes with the AWS VPC CNI gives every pod a VPC address, so node subnets fill up far faster than the node count suggests.

Frequently asked questions

Why does a /24 have 254 usable hosts instead of 256?
The first address identifies the network and the last is the broadcast address, so neither can be assigned to a host. That leaves 2^(32 − prefix) − 2 usable addresses.
How many hosts does a /31 or /32 have?
A /32 is a single address (used for host routes and loopbacks). A /31 has two usable addresses because RFC 3021 allows point-to-point links to skip the network and broadcast addresses.
What is a wildcard mask?
The bitwise inverse of the subnet mask (255.255.255.0 → 0.0.0.255). Cisco ACLs and OSPF use it to say which bits of an address may vary.
Why are octets with leading zeros rejected?
Some libraries and tools such as ping read 010 as octal (8), others as decimal (10). Rejecting the ambiguity avoids silently calculating the wrong network.
How many usable IPs does AWS give me in a VPC subnet?
AWS reserves five addresses per subnet (network, VPC router, DNS, future use and broadcast), so subtract three more from the usable host count shown here. Azure also reserves five; GCP reserves four.
  • Kubernetes YAML validator and visualizer

    Paste Kubernetes manifests to get a resource diagram and a security and best-practice review: privileged pods, root, probes, limits, deprecated APIs.

    KubernetesBeta
  • Reserved instance break-even calculator

    Compare a reserved instance or savings plan with on-demand pricing: total savings, break-even utilisation and the month the commitment pays off.

    Cloud cost
  • docker run to Docker Compose converter

    Convert docker run commands into a clean compose.yaml: ports, volumes, env, networks, healthchecks and limits. Runs in your browser.

    Docker

Last updated · More Network tools