Subnet Calculator

Calculate the network address, broadcast address, netmask, host range and usable host count for any IPv4 CIDR block. Free and private, right in your browser.

Enter any IPv4 address with a CIDR prefix or subnet mask and instantly get the network address, broadcast address, usable host range, and total host count - handy when you're carving up a network, sizing a VLAN, or double-checking a firewall rule before you deploy it.

How to use it

  1. Type in an IPv4 address (e.g. 192.168.1.0)
  2. Set the CIDR prefix or subnet mask (e.g. /24 or 255.255.255.0)
  3. Read off the network, broadcast, and usable host range

Frequently asked questions

How do I figure out how many usable hosts a subnet has?
Usable hosts = 2^(32 - prefix) - 2, since the first address is reserved for the network ID and the last for broadcast. A /24 gives 254 usable hosts, a /27 gives 30, and a /30 gives just 2 (common for point-to-point links).
What's the difference between the network address and the broadcast address?
The network address (first address in the range, host bits all zero) identifies the subnet itself and can't be assigned to a device. The broadcast address (last address, host bits all one) is used to reach every host on that subnet at once - neither is usable as a host IP.
Does it matter if I enter a prefix like /26 or a subnet mask like 255.255.255.192?
No - both notations describe the same thing, so the calculator accepts either and shows you the equivalent for whichever one you didn't type in.