InstantTools.siteZero Latency Utilities
dev Tool
100% In-Memory (Zero Server Upload)

IPv4 CIDR Subnet Calculator

Work out the mask, network, broadcast and usable host range for any IPv4 address and CIDR prefix, including /31 and /32.

Network details

/24

Slider and number field stay in sync. 0–32.

Formula

address = ((a×256+b)×256+c)×256+d · mask = high /n bits set · network = address & mask · broadcast = network + 2^(32−n) − 1 · usable = 2^(32−n) − 2

Subnet breakdown

Enter an IPv4 address such as 192.168.1.10 and a CIDR prefix (0–32) to get the subnet mask, wildcard mask, network and broadcast addresses, the first and last usable hosts, address counts, the address class and a binary breakdown.

How the figures are worked out

The address is converted to a single unsigned 32-bit integer, then masked: the network address is the address AND the mask, and the broadcast is the network plus 2^(32−prefix) − 1. The traditional usable-host formula (total − 2) assumes a network and broadcast address, so it is not applied to /31 and /32 — those cases are called out explicitly instead of showing a misleading number. RFC 1918 private ranges (10/8, 172.16/12, 192.168/16) and RFC 6598 CGNAT space (100.64/10) are recognised, but a real network may have extra rules (DHCP pools, gateways, IPv6-style reservations), so confirm against your routing configuration before deploying. Everything here is computed locally in your browser — no network request is made.

Results update live as you type.

About IPv4 CIDR Subnet Calculator

Break an IPv4 address with its prefix length into every useful part. The subnet mask, wildcard mask, network address, broadcast address, first and last usable hosts, and the total and usable address counts are all calculated from the binary form, along with the address class and whether it falls in public, private, loopback or carrier-grade NAT space. The two special cases are handled explicitly: a /31 is a two-address point-to-point link, and a /32 is a single host with no broadcast convention.

Key Features & Privacy Guarantee

  • Zero server transmission: all computation happens instantly in your local browser runtime.
  • No sign-up, no subscriptions, and no usage quotas.
  • Optimized for maximum speed, accuracy, and lightweight performance.
  • Instant one-click clipboard copying.

Frequently Asked Questions

Common questions and helpful answers about this utility.

It leaves only two addresses, which cannot be split into a network and a broadcast address. RFC 3021 uses both as hosts on point-to-point links, so you have two usable addresses rather than none.