← Back to DevKit

IPv4 Subnet Calculator

SUBNET CALC · DEV TOOLS

Feed a CIDR to get network and broadcast addresses, usable host range and count, subnet mask, IP class and public/private scope; slice finer subnets by a new prefix.

Computed locally — nothing is uploaded.
CIDR input
CIDR is the core IPv4 addressing notation: /24 means the top 24 bits are network and the last 8 are host, usable hosts = 2^hostbits − 2 (/31 leaves 2 for point-to-point, /32 is a single host). A/B/C are legacy classes (retired but handy for rough sizing); private ranges are 10/8, 172.16–31/12 and 192.168/16.

>_ USAGE GUIDE

CIDR is unavoidable when planning networks, VLANs or troubleshooting IP assignments. Enter one CIDR or an IP range and get every network fact instantly.

Typical steps:

  1. Enter a CIDR: in "Single CIDR" mode type 192.168.1.0/24 to get network/broadcast addresses, usable host range and count, subnet mask, prefix, IP class and public/private scope
  2. Range query: switch to "Range query" and type 10.0.0.1 - 10.0.0.50 to get the smallest CIDR covering that interval and its facts
  3. Subnet split: in the subnet box enter a finer prefix (e.g. 26) to list the sub-blocks sliced from the network (up to 256 shown)
  4. IPv6: currently a disabled placeholder — IPv6 math is not yet open

>_ FAQ

Q1 · Why is usable hosts total minus 2?

Each subnet sacrifices the network address (all host bits 0) and the broadcast address (all host bits 1), so usable hosts = 2^hostbits − 2. Exceptions: /31 keeps 2 for point-to-point, /32 is a single host (1).

Q2 · How to tell public from private?

By RFC1918: 10/8, 172.16–31/12 and 192.168/16 are private; 127/8 is loopback, 169.254/16 link-local, 224/4 multicast, 240/4+ reserved, everything else is public.

Q3 · Do IP classes A/B/C still matter?

A/B/C are legacy classes superseded by CIDR, shown only for a rough size estimate, never used in actual routing.

Q4 · Does the range query fit exactly?

The tool prefers the smallest CIDR with capacity ≥ the interval and an aligned start; if the interval cannot be neatly covered (crossing a boundary), the returned CIDR may be larger than your interval — watch the actual coverage.

Q5 · How many subnets are shown?

Up to 256 sub-blocks at once (/24→/30 = 64, /24→/32 = 256 exactly; finer splits show only the first 256), enough for almost any planning scenario.

Embed code

Paste the code below into your page to embed this tool as an iframe (nav and footer auto-hidden).

Heightpx
This tool runs entirely in your browser — input never leaves your device. Press Ctrl K to switch tools anytime.