Skip to content

IP Subnet Calculator

Enter an IPv4 address in CIDR notation, like 192.168.1.10/24, and get the subnet mask, wildcard mask, network address, broadcast address, and the actual usable host range — with the /31 and /32 edge cases handled correctly, not just the common /24 case.

  • Network, broadcast, mask and wildcard mask
  • Usable host range, not just the total count
  • Correct /31 point-to-point and /32 host handling
  • Works for any prefix from /0 to /32
  • Runs fully client-side

Calculator

Calculated locally, nothing uploaded

How to calculate a subnet

  1. 01

    Enter the address in CIDR notation

    Type an IPv4 address followed by a slash and the prefix length, like 192.168.1.10/24.

  2. 02

    Read the network details

    The subnet mask, network address, broadcast address and usable host range are all calculated at once.

What the prefix length actually determines#

The number after the slash in CIDR notation — the /24 in 192.168.1.10/24 — is the number of leading bits reserved for the network portion of the address, out of the 32 total bits in an IPv4 address. The remaining bits identify a specific host within that network. A smaller prefix (like /8) reserves fewer bits for the network and leaves more for hosts, producing a much larger subnet; a larger prefix (like /30) reserves more bits for the network and leaves very few for hosts, producing a tiny subnet. This single number determines every other value this tool calculates.

Why the usable host count is normally two less than the total#

A subnet's total address count is always a power of two, but the very first address is reserved as the network address (identifying the subnet itself) and the very last is reserved as the broadcast address (reaching every host on it) — neither is assignable to an actual device. A /24 subnet has 256 total addresses but only 254 usable ones for that reason. This "subtract 2" rule is the default, but it is not universal — the two smallest possible prefixes have their own special cases.

The two edge cases most subnet calculators get wrong#

A /32 identifies exactly one address, with no room for a separate network or broadcast address — the single address is both, and is itself the only "usable" host. A /31 is defined by RFC 3021 specifically for point-to-point links (like a connection between two routers): rather than wasting half the tiny 2-address subnet on network/broadcast overhead, both addresses are usable hosts. This tool implements both cases explicitly instead of applying the generic "total minus 2" formula, which would incorrectly report 0 usable hosts for both.

Frequently asked questions

What does the /24 (or any number) after the IP address mean?

It is the prefix length — how many of the 32 bits in the address are reserved for the network portion, leaving the rest for individual hosts. A smaller number means a larger subnet with more possible hosts; a larger number means a smaller subnet.

Why is the usable host count 2 less than the total address count?

The first address in a subnet is reserved as the network address and the last as the broadcast address — neither is assignable to a device. A /24 has 256 total addresses but 254 usable ones.

Why does a /31 show 2 usable hosts instead of 0?

Per RFC 3021, a /31 is a special case defined specifically for point-to-point links — with only 2 addresses in the whole subnet, reserving one for network and one for broadcast would waste the entire thing, so both are treated as usable.

What is a /32?

A single specific address with no separate network or broadcast address — commonly used to route to or identify one exact host, such as a loopback address or a single-IP static route.

Is my input sent anywhere?

No. The calculation runs entirely in your browser — nothing is uploaded.

Developers

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7, in bulk.

Developers

Base64 Encoder & Decoder

Encode and decode Base64 with correct UTF-8 handling, including the URL-safe alphabet.

Developers

ULID Generator

Generate ULIDs — sortable by creation time like UUID v7, but Crockford Base32 instead of hex.