Skip to main content
IP Range CalculatorPRO
Subnet Math & Set OperationsInstant Client-Side Tool

Same Subnet Checker

Compare addresses under a selected mask.

Same Subnet Checker: inputs and results

Enter an IP address, CIDR prefix, or range. Then check its first and last address below.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

Key Capabilities

  • •100% Client-Side: Zero telemetry or server latency.
  • •RFC Compliant: Exact 32-bit and 128-bit integer precision.
  • •Quick Copy: Instant access to CIDR, mask, and range bounds.
  • •Cross-Platform: Works on desktop, tablet, and mobile browsers.

How Same Subnet Checker Works?

This tool works by masking both addresses with the same subnet mask and comparing the 2 network addresses. Equal networks mean both addresses share the subnet.

  1. Enter 2 addresses

    Type 192.168.10.20 and 192.168.11.200.

  2. Choose the mask

    Type /23 or 255.255.254.0.

  3. Mask both addresses

    Both become 192.168.10.0 under /23.

  4. Compare

    Equal networks → same subnet. Under /24 the networks differ (.10.0 and .11.0).

Same Subnet Checker Formula

The formula is Same = (A AND Mask) = (B AND Mask).

Same subnet

(A AND M) = (B AND M)

One comparison.

XOR form

((A XOR B) AND M) = 0

No differing bits inside the network part.

Longest shared prefix

p = 32 − bitlength(A XOR B)

The longest mask under which both addresses still match.

Worked example: 192.168.10.20 and 192.168.11.200

Octet 3: 10 = 00001010, 11 = 00001011
XOR octet 3 = 00000001 → differ in bit 24
/23 → bit 24 is a host bit → same subnet ✓
/24 → bit 24 is a network bit → different subnets ✗

Same Subnet Checker Conversion Table

The table compares 8 address pairs under /22, /23, and /24.

Address AAddress B/22/23/24
192.168.10.20192.168.11.200SameSameDifferent
192.168.10.20192.168.10.250SameSameSame
192.168.10.20192.168.12.1DifferentDifferentDifferent
192.168.8.1192.168.11.254SameDifferentDifferent
10.0.0.110.0.1.1SameSameDifferent
10.0.1.110.0.2.1SameDifferentDifferent
172.16.5.5172.16.5.200SameSameSame
172.16.3.255172.16.4.0DifferentDifferentDifferent

What is Same Subnet Checker?

The Same Subnet Checker is a tool that tests whether 2 IPv4 addresses belong to the same subnet under a selected mask.

The answer depends on the mask. 192.168.10.20 and 192.168.11.200 share a /23 and sit in different /24 subnets. Hosts with mismatched masks reach different conclusions about the same pair, which breaks communication in one direction only.

The checker runs the same test a host runs before deciding between direct delivery and the default gateway.

What are the uses of Same Subnet Checker?

There are 4 main uses of the Same Subnet Checker, including connectivity troubleshooting, mask mismatch detection, and design checks.

  • Troubleshooting local connectivity

    Two devices on the same switch that cannot talk often sit in different subnets.

  • Detecting mask mismatches

    One host on /23 and another on /24 disagree about locality. The /22–/24 columns expose it.

  • Checking gateway reachability

    A host and its gateway must share the subnet.

  • Planning cluster networks

    Cluster nodes that need Layer 2 adjacency must share 1 subnet.