Back to guides

IPv4 Subnet Calculator|Plan Docker and VPC CIDRs without spreadsheet drift

Type `192.168.x.x/24` and get network, broadcast, mask, and usable host bounds in the browser—no server round trip.

By WGinit · November 28, 2026 · 6 min read · 6 views

Why CIDR math still blocks releases

Security groups ask for 10.0.0.0/24 while tickets paste 10.0.0.15/24. Docker Compose fails with pool overlap. You need network vs host bits clarified before opening a spreadsheet.

IPv4 Subnet Calculator accepts one line A.B.C.D/n, masks to the true network, and lists CIDR, network, broadcast, netmask, first/last host, total addresses, and usable hosts—all client-side.

It does not replace your cloud console’s Create Subnet wizard; it is the quick sanity check before IaC merges and on-call ACL edits.

How to read each output row

Input 192.168.1.50/24 normalizes to 192.168.1.0/24 because the tool ANDs with the mask instead of treating your typed host as the network.

Network labels routes and segments; broadcast is the legacy L2 upper bound; netmask mirrors /24 for old firewall forms.

First/last host excludes network and broadcast for prefixes below /31, which is why /24 often shows 254 usable hosts. Total is 2^(32-prefix)—not the same as your cloud IP quota.

For /31 and /32, RFC 3021 point-to-point rules apply; the app skips the minus-two adjustment when prefix>=31, matching ipv4Subnet.ts. Always reconcile with your switch or VPC product doc.

Invalid octets or prefix outside 0–32 surface an error. Dotted masks like 255.255.255.0 are out of scope—use CIDR notation only.

Wire into Docker, VPC, and tickets

Before pinning ipv4_address in Compose, confirm the custom bridge range—see docker run to Compose—and use this calculator so static IPs do not land on broadcast.

Splitting a VPC across AZs often means 10.0.0.0/24 public plus 10.0.1.0/24 data. Paste both rows here and verify no overlap; the second network must sit entirely outside the first.

For outbound debugging, IP Lookup shows your public exit; URL Parser still splits host, port, and path on staging URLs.

When staging APIs need auth, pair with HTTP Request and Basic Auth headers; this tool only answers whether an address fits an allowed CIDR string.

Planning flow (figure)

From CIDR input to host bounds and policy

Order of operations: architect hands you a coarse block → compute here → paste into SG or Compose networks → document first/last host in the ticket. Do not discover a /28 only has 14 usable addresses on launch night.

Triage when numbers disagree (figure)

Format, /31 /32, and overlap branches

Teams sometimes request 10.0.0.0/24 and 10.0.0.128/25 thinking they are disjoint—the /25 lives inside the /24. Re-carve before Terraform apply.

Cluster service CIDRs overlapping office 172.16.0.0/12 VPN routes create silent blackholes—list broadcasts here before editing manifests.

Limits and safety

IPv4 only—no IPv6. Private RFC1918 math here does not prove public reachability; NAT, ACLs, and provider SNAT still rule.

Inputs stay local, but CIDR screenshots can leak topology—redact internal ranges in public tickets.

No reverse DNS, WHOIS, or quota requests—usable host math is not elastic NIC limits.

FAQ

Q10.0.0.5/24 vs 10.0.0.0/24?

ASame normalized network.

QIs gateway always first host?

AOften .1 in clouds; follow vendor docs.

QWhy /32?

AHost routes; counts differ from /24.

QExtra whitespace?

ATrimmed; one CIDR per line.

Worked example (step by step)

1. Plan Docker network 172.30.0.0/24 in IPv4 Subnet Calculator; note lastHost 172.30.0.254.

2. Assign container 172.30.0.10; verify between first and last host.

3. Repeat for 172.30.1.0/24 to prove no overlap.

4. If Compose still conflicts, reconcile default bridge settings per the Compose guide.

5. Paste normalized CIDR into security group ingress—avoid hand-editing the last octet.

6. Staging HTTPS auth stays orthogonal; CIDR only bounds which pools may call the VIP.

7. Archive mask and usable counts in the change ticket for the next expansion.

Design reviews that benefit from quick math

During design review, paste proposed pod, service, and node CIDRs side by side before anyone draws ASCII topology on a whiteboard.

When peering two VPCs, both sides must prove mutual routes are summarized and non-overlapping—this calculator is faster than arguing from memory.

Windows Hyper-V and WSL2 default switches ship with baked-in ranges; if corporate VPN uses the same private space, compute overlaps before enabling full tunnel.

Load balancer health checks sometimes come from a management subnet outside the app CIDR—do not assume health traffic shares the application network without reading the LB doc.

On-call patterns that save time

When a partner insists their IP is in your allow list but you still see timeouts, paste both their claimed host /32 and your SG CIDR here—half the arguments collapse once both sides agree on the normalized network line.

Terraform plans that only show a /24 string without first/last host encourage operators to guess gateway placement. Copy tool output into the PR description so reviewers see usable bounds without running Python.

Hybrid setups with Direct Connect or ExpressRoute often advertise summarized prefixes; verify whether the summary still covers the subnet you just carved for Kubernetes nodes before approving the BGP advertisement ticket.

Office DHCP ranges that accidentally include your lab Docker bridge lead to bizarre ARP behavior; compare the calculator broadcast with your Wi‑Fi lease scope before blaming application bugs.

Incident retrospectives improve when you attach the exact CIDR rows that changed during the cutover, not only a screenshot of the cloud console list view.

Database replicas advertised on 10.x while applications still point at the old /28 VIP is a classic cutover mistake—the calculator helps prove whether the new replica lives inside or outside the old summary route.

Split-horizon DNS sometimes returns private A records for a public hostname; knowing the CIDR boundary tells you whether traffic should hairpin through the VPN tunnel or exit directly to the internet.

Spreadsheet fallacies to avoid

Adding one to the last octet in Excel to find broadcast fails once you leave /24 comfort zones; let the tool compute broadcast from bitwise math instead.

Mixing decimal subnet masks typed as dates (10-1-192) has ruined more cutover spreadsheets than any cloud outage—stick to /n strings when collaborating.

Rounding down usable hosts to «about 250» is fine for elevator pitches, not for IPAM tickets that must reserve jump boxes and appliances at fixed addresses.

Color-coding rows does not prove non-overlap; paste each proposed CIDR back through the calculator and compare normalized network integers mentally or in a quick script.

Exporting cloud console subnets to CSV often drops the prefix length column; always paste the combined network/prefix form here before comparing with on-prem advertisements.

References

RFC 4632 describes CIDR aggregation semantics that underpin /n notation in cloud consoles.

RFC 3021 documents /31 IPv4 inter-router links where traditional broadcast semantics do not apply.

Your cloud provider VPC guide remains authoritative for reserved addresses (e.g., AWS .0/.255 quirks) beyond pure math.

RFC 1918 defines private address blocks (10/8, 172.16/12, 192.168/16) that most VPC designs start from.

Copy-paste reference

Paste CIDR strings into IPv4 Subnet Calculator to see host bounds before editing security groups.

172.18.0.0/16 # docker bridge pool
10.0.32.0/24 # staging k8s nodes

Related tools

Related guides