All calculators

IPv4 Subnet Calculator

Find the mask, network, broadcast and host range for an IPv4 CIDR address. Check a PLC or HMI peer against that subnet.

Enter your values

Try an example

Your result

Network address192.168.10.32/27
Subnet mask
255.255.255.224
Broadcast
192.168.10.63
First usable address
192.168.10.33
Last usable address
192.168.10.62
Usable addresses
30
Peer check
Peer is a usable address in this subnet.

Calculated

Peer is a usable address in this subnet.

Network bits identify the subnet. Host bits identify the device.
IPv4 Subnet CalculatorPLC INPUT192.168.10.35NETWORK BITS192.168.10.32/2727 NETWORK BITS5 HOST BITS

How this answer is calculated

These steps use your current values. Change an input to follow a different calculation.

  1. 1

    Write the prefix as a subnet mask

    /27 → 255.255.255.224
  2. 2

    Apply the mask to the interface address

    192.168.10.35 AND 255.255.255.224 = 192.168.10.32
  3. 3

    Read the usable host interval

    192.168.10.33 … 192.168.10.62

How to use this on a job

Two addresses that look similar can still be on different subnets. The prefix decides which bits describe the network. Compare the masked addresses before changing cables or inventing a gateway.

  1. 01

    Enter the interface’s IPv4 address and CIDR prefix. Use plain decimal octets without leading zeros so there is no ambiguity with other numeric notations.

  2. 02

    Read the network, broadcast and usable range. For ordinary subnets, the network and broadcast addresses are not assignable host addresses.

  3. 03

    Enter a peer address to test membership in this interface’s subnet. Membership is only one side of the configuration: the peer’s mask, VLAN, firewall and physical link still matter.

Work through one example

/27 → 255.255.255.224 → blocks of 32 addresses

192.168.10.35/27 belongs to network 192.168.10.32. Its broadcast is .63 and its ordinary hosts run from .33 through .62. A peer at .63 matches the network bits but is not a usable host. A peer at .64 is already in the next /27 subnet.

Before you trust the answer

Being in the same subnet does not prove reachability. An address at the broadcast boundary belongs numerically to the subnet but cannot be assigned as an ordinary host. The calculator reports these as separate facts. Use /31 only with devices and links that support that point-to-point convention.

Common IPv4 prefixes

PrefixMaskUsable hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/30255.255.255.2522
/31255.255.255.2542 on supported point-to-point links

Questions that come up on the job

The first three numbers match. Are the devices on one subnet?

That shortcut only works for a /24 mask. With /27, 192.168.10.35 belongs to 192.168.10.32/27, while 192.168.10.70 belongs to 192.168.10.64/27. Apply the actual mask to both addresses instead of comparing their first three octets.

Why can two addresses in the same subnet still fail to communicate?

Subnet membership is only one condition. Check both devices’ masks, duplicate addresses, VLAN membership, physical links and filtering. A host on another subnet needs a working routed path; changing the gateway does not repair a duplicate local IP address.

TRYPLC FIELD REFERENCE / 01

IPv4 Subnet Calculator

Find the mask, network, broadcast and host range for an IPv4 CIDR address. Check a PLC or HMI peer against that subnet.

  • Network = address AND mask
  • Total addresses = 2^(32 − prefix)
  • Ordinary usable hosts = total − 2
  • /31: two endpoints on a point-to-point link
  • /32: one address, not a shared LAN
IPv4 Subnet CalculatorPLC INPUT192.168.10.35NETWORK BITS192.168.10.32/2727 NETWORK BITS5 HOST BITS

How to use this on a job

Two addresses that look similar can still be on different subnets. The prefix decides which bits describe the network. Compare the masked addresses before changing cables or inventing a gateway.

  1. 01

    Enter the interface’s IPv4 address and CIDR prefix. Use plain decimal octets without leading zeros so there is no ambiguity with other numeric notations.

  2. 02

    Read the network, broadcast and usable range. For ordinary subnets, the network and broadcast addresses are not assignable host addresses.

  3. 03

    Enter a peer address to test membership in this interface’s subnet. Membership is only one side of the configuration: the peer’s mask, VLAN, firewall and physical link still matter.

Work through one example

/27 → 255.255.255.224 → blocks of 32 addresses

192.168.10.35/27 belongs to network 192.168.10.32. Its broadcast is .63 and its ordinary hosts run from .33 through .62. A peer at .63 matches the network bits but is not a usable host. A peer at .64 is already in the next /27 subnet.

Before you trust the answer

Being in the same subnet does not prove reachability. An address at the broadcast boundary belongs numerically to the subnet but cannot be assigned as an ordinary host. The calculator reports these as separate facts. Use /31 only with devices and links that support that point-to-point convention.

https://tryplc.com/tools/ipv4-subnet