PortDock

IP Subnet Calculator

From an IP and mask (255.255.255.0 or /24): network, broadcast and usable range, and whether a PC and a PLC or HMI share a subnet, checked with both masks.

The mask fields accept 24, /24 or 255.255.255.0. You can also type 192.168.1.10/24 in the address field.

A's subnet
CIDR
Subnet mask
Wildcard
Network address
Broadcast address
Usable addresses
Usable address count
Address type
Address (binary)
Mask (binary)

Can A and B reach each other?

Results update as you type. Everything runs in your browser; addresses you type are not sent anywhere.

How the same-subnet decision works

AND the address with the mask bit by bit and you get the network address. If two hosts have the same network address they are on the same subnet and find each other directly on Ethernet (via ARP); otherwise packets go to the gateway (router).

Each host decides with its own mask. If the PC uses /16 and the device /24, the PC sees the device as local and sends directly, but the device sees the PC as remote and sends its replies to its gateway — a «one-way» setup. This calculator shows both directions separately.

Example: 192.168.1.10/24 → network 192.168.1.0, broadcast 192.168.1.255, usable 192.168.1.1–192.168.1.254 (254 addresses).

Private address ranges (RFC 1918)

  • 10.0.0.0/8 — 10.0.0.0 to 10.255.255.255
  • 172.16.0.0/12 — 172.16.0.0 to 172.31.255.255
  • 192.168.0.0/16 — 192.168.0.0 to 192.168.255.255

Plant and office devices normally use these. A 169.254.x.x address means that PC or device got no address from a DHCP server and assigned itself a link-local one (RFC 3927).

Mask table

CIDRSubnet maskUsable addresses
/8255.0.0.016,777,214
/9255.128.0.08,388,606
/10255.192.0.04,194,302
/11255.224.0.02,097,150
/12255.240.0.01,048,574
/13255.248.0.0524,286
/14255.252.0.0262,142
/15255.254.0.0131,070
/16255.255.0.065,534
/17255.255.128.032,766
/18255.255.192.016,382
/19255.255.224.08,190
/20255.255.240.04,094
/21255.255.248.02,046
/22255.255.252.01,022
/23255.255.254.0510
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2542
/32255.255.255.2551

/31 uses both addresses on point-to-point links (RFC 3021); /32 is a single address.

FAQ

What prefix is 255.255.255.0?

It has 24 leading one bits, so /24. 255.255.0.0 is /16, 255.255.255.128 is /25 and 255.255.255.252 is /30.

The PLC is 192.168.0.10 and the PC 192.168.1.20 — will they talk?

With 255.255.255.0 (/24) their networks are 192.168.0.0 and 192.168.1.0, so they cannot reach each other without a gateway. Adding a free 192.168.0.x address to the PC is the usual fix.

How many hosts fit in a /24?

256 addresses minus the network (.0) and broadcast (.255) addresses = 254. The gateway takes one of them too.

To find the devices on that subnet, run an ARP and ping sweep with PortDock Net Scan.