Subnet Calculator

IPv4 address + CIDR or mask → network, broadcast, host range and counts.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A complete IPv4 subnet calculator that turns an address plus a prefix or mask into every value a network engineer needs: the network address, broadcast address, usable host range, host count, wildcard mask, the binary subnet mask, the classful class and the address scope. It is built for anyone planning an addressing scheme, writing router or firewall configuration, studying for a networking exam, or sanity-checking a VLAN before deploying it.

How it works

Enter an address in CIDR notation such as 192.168.1.10/24. Internally the tool parses the four octets into a single unsigned 32-bit integer, then builds the subnet mask by setting the leftmost n bits (where n is the prefix length). From there everything is pure bitwise arithmetic:

  • Network = address AND mask (clears all host bits to 0).
  • Broadcast = network OR wildcard (sets all host bits to 1).
  • Wildcard = NOT mask (the inverse of the subnet mask).
  • Usable range = network + 1 through broadcast − 1 for prefixes /30 and shorter.

Two special cases are handled correctly: a /31 is treated as an RFC 3021 point-to-point link with two usable addresses and no broadcast reservation, and a /32 represents a single host. You can also paste a dotted-decimal mask such as 255.255.255.0 in place of the prefix — the calculator verifies the mask is a valid contiguous run of 1 bits and converts it to the matching prefix length. The results table additionally reports the legacy classful class from the first octet and the scope (private RFC 1918, loopback, link-local APIPA, CGN, multicast, reserved or public), so you can immediately tell whether a block is routable on the public internet.

Example

Take 192.168.1.10/24. The mask is 255.255.255.0, so:

  • Network address: 192.168.1.0
  • Broadcast address: 192.168.1.255
  • Usable host range: 192.168.1.1 – 192.168.1.254
  • Total addresses: 256, usable hosts: 254
  • Wildcard mask: 0.0.0.255, scope: Private (RFC 1918)

Change the prefix to /26 and the same address resolves to network 192.168.1.0, broadcast 192.168.1.63, and 62 usable hosts — exactly what you would assign to a small VLAN.

CIDRMaskTotalUsable hosts
/24255.255.255.0256254
/26255.255.255.1926462
/30255.255.255.25242
/31255.255.255.25422

Every figure is computed locally in your browser — no addresses are uploaded or stored.

Ad placeholder (rectangle)