RouterEntry · Sources checked · How we write our guides

Calculate an IPv4 subnet

Enter an address with its prefix, such as 192.168.1.42/24. The calculation runs in this page and does not contact the address.

Read the result before changing a setting

The prefix counts the network bits in an IPv4 address. For a conventional /24, the mask is 255.255.255.0. Entering 192.168.1.42/24 gives network 192.168.1.0/24, directed broadcast 192.168.1.255, and 254 conventional host slots from 192.168.1.1 to 192.168.1.254.

That host range is not a recommended DHCP pool. Your gateway, reserved addresses and static devices may already use part of it. A subnet calculation cannot identify your router or diagnose a failed connection. To open settings, find your device’s actual gateway.

Why /0, /31 and /32 are different

  • /0: 0.0.0.0/0 covers all 4,294,967,296 IPv4 addresses and is used for the default route. It is not an ordinary LAN with billions of available devices; it contains special-use ranges too.
  • /31: the two addresses can serve as endpoints on a point-to-point link when both ends support RFC 3021. There is no directed broadcast for that link. This does not establish that /31 is suitable for your home Wi-Fi network.
  • /32: identifies one address, commonly as a host route. It has no separate host range or directed broadcast address.

Looking for a different answer?

Find instructions for your equipment, or use guided troubleshooting if the login page will not open.