Compare IP Addresses
Two addresses side by side: how far apart they are, the longest prefix they share and whether they belong to the same network.
Two addresses can look unrelated and sit in the same subnet, or look almost identical and belong to different networks. The comparison answers both questions at once.
On paper, it XORs the two addresses and counts the leading bits they share. That number is the longest common prefix, and the network it describes is the smallest CIDR block that contains both: 192.0.2.10 and 192.0.2.200 share 24 bits, so both fall inside 192.0.2.0/24.
In the routing table, it looks both up in our copy of the BGP table and the registry files: whether they are announced as part of the same route, by the same autonomous system, and whether they were delegated in the same block. Two addresses can share a /16 on paper and still be routed by different operators.
Frequently asked questions
Can an IPv4 and an IPv6 address be in the same network?
No. They are separate address families with separate routing tables. The one exception the tool recognises is an IPv4-mapped IPv6 address (::ffff:192.0.2.1), which is just another way of writing the IPv4 address.
Does the same /24 mean the same customer?
Not necessarily. Providers often split a /24 between many customers, and CGNAT puts thousands of customers behind the same public address. Shared prefixes tell you about networks, not people.
What is the numeric distance good for?
It tells you how many addresses lie between the two, which is useful when checking whether two hosts fall inside one allocation or when sizing a range.