Subnet Calculator

Work out the network, broadcast, host range, and masks for any IPv4 address and prefix.

[local] Runs in your browser. Nothing you enter leaves your device.

Subnet Calculator

Network address
-
Broadcast address
-
Usable host range
-
Usable hosts
-
Total addresses
-
Subnet mask
-
Wildcard mask
-
CIDR notation
-
Class
-
Address type
-
Address (binary)
-
Mask (binary)
-

How it works

An IPv4 address is a 32-bit number, usually written as four 8-bit numbers ("octets") like 192.168.1.10. The prefix (the /24) says how many of those 32 bits identify the network, and the rest identify a single host on that network.

The subnet mask is the same idea written as an address: 24 ones followed by 8 zeros is 255.255.255.0. The calculator then uses two bitwise operations:

  • Network address = address AND mask: keep the network bits, set the host bits to 0.
  • Broadcast address = network OR (NOT mask): set every host bit to 1.

Everything in between can be given to devices, so a /24 has 28 = 256 addresses and 254 usable hosts. Two exceptions: a /31 is used for point-to-point links where both addresses are usable (RFC 3021), and a /32 is a single host.

The wildcard mask is the mask flipped (0.0.0.255 for a /24). Cisco ACLs and OSPF use it.

Tip: link straight to a result by adding ?q= to the address, like this example for 10.0.0.130/26