IPv4 Subnet Calculator for Industrial Networks

Work out the network, broadcast and usable address range for an IPv4 address and mask, and check whether a PLC and a device can talk directly.

Subnet details

Enter the mask as 255.255.255.0 or as a prefix length such as /24.

Are these two devices on the same subnet?

How it works

The subnet mask splits an IPv4 address into a network part and a host part. Two devices can talk directly only when their network parts match. The network address has all host bits set to 0, and the broadcast address has them all set to 1. The addresses in between are usable by devices.

network = IP AND mask
broadcast = network OR (NOT mask)
usable hosts = 2(32 − prefix) − 2

Worked example

192.168.1.10 with mask 255.255.255.0 (/24) is on network 192.168.1.0, with broadcast 192.168.1.255 and 254 usable hosts (192.168.1.1 to 192.168.1.254). A device at 192.168.2.20 is on a different subnet, so it cannot talk directly to the first one without a router.

Common questions

Common masks

PrefixMaskUsable hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/30255.255.255.2522

Why can my laptop not see a PLC with a different third octet?

With a /24 mask, the first three numbers must match. A laptop at 192.168.0.5 cannot reach a PLC at 192.168.1.10 until its address, the mask or a routed connection is changed.

This tool is provided for convenience. Confirm network changes with your network administrator before applying them to a production system.