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.
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
| CIDR | Subnet mask | Usable addresses |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15 | 255.254.0.0 | 131,070 |
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| /31 | 255.255.255.254 | 2 |
| /32 | 255.255.255.255 | 1 |
/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.