Skip to content

Subnet Calculator

Work out the network address, broadcast address, usable host range, netmask and wildcard for any IPv4 CIDR block or address-and-mask pair, split it into smaller subnets, and expand or compress IPv6 prefixes. Everything is calculated instantly in your browser.

Runs in your browserFreeNo sign-up

Processed on your device. Files and text stay in your browser and are not uploaded to our servers. How privacy works

How to use the subnet calculator

  1. Type an IPv4 address with a prefix (10.0.0.5/22) or with a dotted mask (10.0.0.5 255.255.252.0).
  2. Read the network, broadcast, first and last usable host and the host count.
  3. Pick a new prefix under Split to see the equal-sized subnets inside the block, with their ranges.
  4. For IPv6, enter an address with a prefix (2001:db8::/48) to get the compressed and expanded forms and the prefix size.

Features

  • IPv4 CIDR and dotted-mask input, including /31 point-to-point and /32 host routes
  • Network, broadcast, first and last host, usable hosts, netmask, wildcard mask and binary mask
  • Address class and whether the block is private, loopback, link-local, CGNAT or public
  • Subnet splitting into any longer prefix, with the first 64 subnets listed
  • IPv6 compression (RFC 5952), expansion, network prefix and address count

CIDR in one paragraph

A /24 means the first 24 of the 32 bits identify the network and the remaining 8 identify hosts, giving 256 addresses. The lowest (all host bits zero) is the network address and the highest (all ones) is the broadcast address, so 254 remain for hosts. Each step up in prefix length halves the block: /25 is 128 addresses, /26 is 64, and so on. The netmask is the same idea written as dotted decimal (255.255.255.0 for /24); the wildcard mask is its inverse, used in some router ACL syntaxes.

  • /31 networks (RFC 3021) use both addresses for a point-to-point link.
  • /32 is a single host.
  • IPv6 has no broadcast address and uses /64 for almost every LAN, however few devices are on it.

Frequently asked questions

Why are there only 254 usable hosts in a /24?

Two addresses are reserved: the network address (first) and the broadcast address (last). A /31 is the exception, where both addresses are usable on a point-to-point link.

How do I pick a prefix for a given number of hosts?

Add 2 for network and broadcast, then round up to the next power of two. 50 hosts need 52 addresses, so 64, which is a /26. The Split table lets you check the resulting ranges.

Why does my IPv6 address show as private?

Addresses starting with fc or fd are unique local addresses (the IPv6 equivalent of 10.x.x.x), fe80:: is link-local, and ::1 is loopback. Only global unicast (typically 2000::/3) is routable on the internet.

Other tools people use alongside Subnet Calculator.

You might also like

Something useful from another corner of VoltKit.