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.
Calculated Boundaries & ParametersReady
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.
Related Subnet Math & Set OperationsAll Tools
Bitwise Subnet Calculator
Show address-and-mask operations.
IP Address Offset Calculator
Add or subtract address positions.
Address Distance Calculator
Count positions between two addresses.
Subnet Boundary Checker
Check alignment to a specified prefix.
IP-in-Range Checker
Test whether an address belongs.
IP-in-Subnet Checker
Test membership within a CIDR block.
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.
Enter 2 addresses
Type
192.168.10.20and192.168.11.200.Choose the mask
Type
/23or255.255.254.0.Mask both addresses
Both become
192.168.10.0under /23.Compare
Equal networks → same subnet. Under /24 the networks differ (
.10.0and.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) = 0No 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 A | Address B | /22 | /23 | /24 |
|---|---|---|---|---|
| 192.168.10.20 | 192.168.11.200 | Same | Same | Different |
| 192.168.10.20 | 192.168.10.250 | Same | Same | Same |
| 192.168.10.20 | 192.168.12.1 | Different | Different | Different |
| 192.168.8.1 | 192.168.11.254 | Same | Different | Different |
| 10.0.0.1 | 10.0.1.1 | Same | Same | Different |
| 10.0.1.1 | 10.0.2.1 | Same | Different | Different |
| 172.16.5.5 | 172.16.5.200 | Same | Same | Same |
| 172.16.3.255 | 172.16.4.0 | Different | Different | Different |
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.