Skip to main content
GARGLOO

Subnet Calculator

Every address in the subnet, worked out.

Runs on your device

At a glance

Input:
Text / data you paste
Processing:
Runs locally in your browser
Privacy:
Nothing you type is sent to a server

Last updated: 2026-11-09

Common use cases

  • Splitting 192.168.1.0/24 into smaller subnets for VLANs
  • Checking how many usable hosts a /26 gives before assigning addresses
  • Finding the broadcast address of a point-to-point /31 link
  • Sizing an IPv6 /64 allocation for a new network

About this tool

Enter an IPv4 address and a CIDR prefix — or a dotted netmask — and get the whole subnet at once: network and broadcast addresses, subnet and wildcard masks, first and last usable hosts, total and usable address counts, the binary IP, and whether the address is private or public. An IPv6 mode covers network and range size for any prefix up to /128. Everything runs locally in your browser, nothing is uploaded. Results are for planning — check your network's own configuration before relying on them.

How to use it

  1. Pick IPv4 or IPv6.
  2. Enter the address and the prefix — a whole number like 24, or a dotted netmask like 255.255.255.0 for IPv4.
  3. Read the network, broadcast, masks, first and last usable hosts, and the usable-host count.
  4. Tap a preset to check a common subnet, or Copy summary for the one-line result.

Worked examples

Input: 192.168.1.10/24

Output: Network 192.168.1.0 · Broadcast 192.168.1.255 · 254 usable of 256

The .10 is a host address — the network is .0, the broadcast .255, the first usable host .1 and the last .254.

Input: 10.0.0.1/8

Output: Network 10.0.0.0 · Broadcast 10.255.255.255 · 16,777,214 usable of 16,777,216

A /8 holds 16.7 million addresses — the whole 10.x.x.x private range in one subnet.

Input: 192.168.1.0/31

Output: Network 192.168.1.0 · Broadcast 192.168.1.1 · 2 usable of 2

The /31 point-to-point exception (RFC 3021): both addresses are usable, so there is no network/broadcast subtraction — the naive total−2 rule would wrongly give 0.

Practical tips

  • Use the presets to sanity-check a subnet before typing your own address.
  • A longer prefix is a smaller subnet: each extra bit halves the addresses — /25 is 128, /26 is 64, /30 is 4.
  • For IPv6, remember the range size doubles with every bit you remove from the prefix — a /64 holds 2^64 addresses.

Common mistakes

  • Reading the broadcast address as a usable host — on a /24 the .255 is the broadcast, not a host.
  • Applying total−2 to /31 and /32 — both are special cases, and this calculator handles them explicitly.
  • Entering a netmask with non-contiguous 1 bits (like 255.0.255.0) — a valid mask is a run of 1s then 0s; the tool names the problem instead of guessing.

How this compares

Most subnet calculators online show a wall of numbers and stop there, or get /31 and /32 wrong with the total−2 rule. This one names its edge cases (RFC 3021 for /31, single-address /32), accepts a netmask as well as CIDR, explains invalid input instead of failing silently, and covers IPv6 range size — all locally, with no account. The tradeoff: it plans subnets, it does not scan or configure a network — check the real configuration before changing anything.

Good to know

  • Planning only — this computes addresses; it does not check whether they are free or in use on your network.
  • IPv6 mode covers network and range size, not host counts per subnet (a /64 alone holds 2^64 addresses).
  • Embedded IPv4-in-IPv6 addresses (like ::ffff:192.168.1.1) are not accepted — enter a plain IPv6 address.
  • The address-type label (private, public, loopback) follows the standard ranges — a carrier-grade NAT or special allocation may differ.

Frequently asked questions

What is a subnet mask?

The mask marks which bits of an address are the network and which are hosts. A /24 mask (255.255.255.0) leaves 8 host bits: 256 addresses. A longer prefix means a smaller subnet — /25 holds 128 addresses, /30 holds 4.

Why does a /31 have 2 usable hosts?

Point-to-point links need only two addresses, so RFC 3021 drops the network/broadcast reservation: both addresses in a /31 are usable. The naive total−2 rule would wrongly give 0 — this calculator handles /31 (and /32, a single address) explicitly.

What is the wildcard mask?

The inverse of the subnet mask: 0.0.0.255 for a /24. Access-control lists and some routers use the wildcard instead of the mask — wherever the mask has a 0, the wildcard has a 255.

Can I enter a netmask instead of a CIDR prefix?

Yes — type 255.255.255.0 in the prefix field and it reads as /24. The mask must be valid: its 1 bits have to be contiguous (255.0.255.0 is rejected with a named error).

Is my data uploaded?

No. The address and prefix are parsed and computed entirely in your browser — nothing leaves this tab.

All developer tools
Subnet Calculator | GARGLOO