Try something interesting: look up 1.1.1.1 and then 2.1.1.1 on our IP lookup tool. You will find that these two addresses โ which differ by just one number โ resolve to completely different countries. How is that possible? Is there a hidden logic to how IP addresses map to locations?
IP Addresses Are Not Phone Numbers
With phone numbers, geography is built into the system. Country codes tell you the country (+1 is the US, +49 is Germany, +44 is the UK), and area codes narrow it down to a region. If two phone numbers start with the same digits, they are probably in the same area.
IP addresses work nothing like that. The number 1.1.1.1 has no inherent connection to any location. The number 2.1.1.1 does not mean it is "next door" geographically. The similarity in their numbers is purely numerical โ it says nothing about where they are physically located.
How IP Addresses Are Actually Distributed
The global distribution of IP addresses is managed by a hierarchy of organizations:
IANA (Internet Assigned Numbers Authority) sits at the top. It manages the entire pool of available IP addresses and divides them into large blocks. IANA does not assign addresses to individual companies or users โ instead, it distributes them to five Regional Internet Registries (RIRs):
- ARIN โ North America
- RIPE NCC โ Europe, Middle East, Central Asia
- APNIC โ Asia Pacific
- LACNIC โ Latin America, Caribbean
- AFRINIC โ Africa
Each RIR then allocates smaller blocks to ISPs, hosting companies, and large organizations within their region. These organizations finally assign individual addresses to their customers.
Why Neighboring Numbers End Up in Different Countries
Here is the key: IANA handed out large blocks of addresses over decades, and it did so based on demand, not geography. The allocation looked something like this over the years:
- The
1.0.0.0/8block (all addresses starting with1) was given to APNIC (Asia Pacific) in 2010 - The
2.0.0.0/8block (all addresses starting with2) was given to RIPE NCC (Europe) back in the early days of the internet
So 1.1.1.1 belongs to APNIC's region and 2.1.1.1 belongs to RIPE's region โ two completely different parts of the world, despite their numbers being almost identical.
But it gets even more complicated. Within each block, the RIR may have allocated sub-blocks to organizations in different countries. And organizations can move, merge, or transfer their IP allocations to others. A block originally assigned to a company in Germany might now be used by a company in Brazil that acquired it.
The Historical Factor
The earliest blocks of IP addresses (those starting with low numbers like 1 through 80) were assigned in the 1980s and 1990s, primarily to American universities, government agencies, and large corporations. This is why a disproportionate number of "low" IP addresses are associated with the United States.
Some famous examples:
- The entire
6.0.0.0/8block (16.7 million addresses) was once assigned to the US Army - MIT holds the
18.0.0.0/8block โ more addresses than many entire countries - Apple owns
17.0.0.0/8 - The US Postal Service once held
56.0.0.0/8
As the internet grew globally, later blocks were distributed more evenly across regions. But the early American dominance in IP allocation is still visible in the numbering.
What About Anycast? The Plot Twist
To make things even more interesting, some IP addresses are not in a single location at all. The address 1.1.1.1 is a perfect example โ it belongs to Cloudflare's DNS service and uses a technology called anycast.
With anycast, the same IP address is announced from multiple locations around the world simultaneously. When you connect to 1.1.1.1, you are automatically routed to the nearest Cloudflare data center โ which could be in New York, London, Tokyo, or any of their 300+ locations. The IP address is the same, but the physical server you reach depends on where you are.
This is why geolocation databases sometimes disagree about where 1.1.1.1 is located โ it is technically everywhere at once.
Can You Tell a Country from an IP Address?
Not from the number itself โ you always need a database. Geolocation databases maintain massive tables that map IP ranges to locations. These databases are built by:
- Tracking RIR allocation records (which blocks went to which organizations)
- Analyzing routing data (which networks announce which IP ranges)
- Collecting data from ISPs and organizations
- Using latency measurements and other technical signals
The databases are regularly updated because IP allocations change โ blocks are traded, organizations move, and ISPs reassign addresses to different regions.
IP Address Markets and Transfers
Since IPv4 addresses ran out globally in 2011, they have become a tradeable commodity. Organizations that hold more addresses than they need can sell them to those who need more. A block that was originally allocated to a European company might be sold to an Asian ISP.
This trading makes geolocation even less predictable. An IP address that was in the Netherlands last year might be in Singapore this year โ same number, completely different location.
The Takeaway
There is no mathematical formula to determine a country from an IP address. The allocation is historical, administrative, and constantly shifting. Two addresses that look almost identical (1.1.1.1 and 2.1.1.1) can be on opposite sides of the planet, while two addresses that look completely different might be in the same building.
The only reliable way to find out where an IP address is located is to look it up in a geolocation database.
Curious where a specific IP address is? Try our free IPv4 lookup tool โ enter any address and see its country, city, coordinates, and whether it belongs to a VPN or datacenter.