IPv4 Subnet Calculator

Work out ranges, masks and hosts from any CIDR block.

Runs locallyWorks offlineShare link carries settings, never your data
Send output toQR Code ReaderBarcode GeneratorSlug / URL EncoderBuild a workflow from thisOutput stays on this page until you send it.

Frequently asked questions

What does the /24 in an address actually mean?

The number of bits fixed as the network portion. A /24 fixes the first 24 bits, leaving 8 for hosts — 256 addresses, of which 254 are usable. Smaller numbers mean bigger networks, which trips people up at first.

Why are two addresses always unusable?

The first identifies the network itself and the last is the broadcast address. That is why a /24 gives 254 usable hosts rather than 256, and why a /30 — often used for point-to-point links — yields only two.

Which ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, reserved by RFC 1918. They are not routable on the public internet, which is why almost every home router hands out addresses from 192.168.

Pro tips

  • Plan subnets from the largest requirement down. Allocating small blocks first fragments the range and forces a renumber later.
  • Leave headroom — a /24 that is 90% full on day one is a migration waiting to happen, and renumbering a live network is far more expensive than reserving space.
  • Check the wildcard mask when writing access control lists; several vendors expect it rather than the subnet mask, and the two are inverses.
  • Use the split view to confirm that child subnets tile the parent exactly, with no overlap and no gap, before configuring anything.
  • Write allocations down in CIDR rather than as ranges. '10.0.4.0/22' is unambiguous where '10.0.4.0 to 10.0.7.255' invites an off-by-one.

About Subnet Calculator

Usable hosts always come to two below the total: the first address names the network and the last is the broadcast address, and neither can be assigned. That arithmetic is why a /30 yields only two usable addresses.

Enter an IPv4 address and CIDR prefix to get the network and broadcast address, usable host range, host count, netmask and wildcard, then split it into subnets. All the bitwise maths runs in your browser.

A subnet calculator turns an IPv4 address and its CIDR prefix (or netmask) into everything you need to plan or troubleshoot a network: the network and broadcast addresses, the first and last usable host, the total and usable host counts, the wildcard mask and the address class. Enter something like 192.168.1.10/24 — or a netmask such as 255.255.255.0 — and every value updates instantly.

It also splits a block into equal subnets, which is the core of VLSM (variable-length subnet masking) design. Slide to a longer prefix to see how a /24 divides into /26s or /30s, complete with each child network's usable range and broadcast address.

Prefix length is the whole game, and the pattern is worth internalising: every bit added to the prefix halves the range. A /24 holds 254 usable addresses, a /25 holds 126, a /26 holds 62, and a /30 holds exactly two — which is why point-to-point links between routers are conventionally allocated a /30. Reading a prefix as 'how many halvings from a full octet' is faster than counting addresses.

Which range you allocate from is a decision worth making deliberately, because it is expensive to revisit. Three ranges are reserved for internal use — 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 — and home routers overwhelmingly default into the same corner of the last one. The consequence shows up the day two networks have to talk: a VPN between two sites that both chose 192.168.1.0/24 cannot route, because each end believes that range is local. Picking something unfashionable from 10.0.0.0/8 costs nothing now and avoids a renumber later.

Common use cases

  • Planning address ranges before configuring a network
  • Checking whether two hosts share a subnet while debugging
  • Sizing a VPC or VLAN without over-allocating addresses
How it comparesCommand-line tools such as ipcalc and sipcalc give the same numbers and assume a terminal and a memorised flag set. Compared with other web calculators, the split view is the part that earns its place — seeing a /24 divide into its children is the step where hand arithmetic usually goes wrong.