Guide

How Accurate Is IP Geolocation? The Country Fits, the City Often Doesn't

Where location estimates come from, why the city is so often wrong, and which decisions the data can carry.

IP-DB Team 2 min read 34 reads 0 comments

An IP address carries no geographic coordinates of its own. The country, city, and time zone you see in a lookup are not a measurement but an estimate — a probability calculation drawn from several sources. Knowing how accurate that estimate is determines which decisions the data can safely carry.

Where location data comes from

  • Registry data (RIR allocations) — which organization, in which country, received a block from RIPE, ARIN, or APNIC. This is the firmest ground at country level.
  • BGP routing tables — which autonomous system (ASN) announces the block to the internet.
  • Latency measurement — distance inferred from ping and traceroute timings taken from known vantage points.
  • Operator hints — airport codes in router hostnames, and geofeed files ISPs publish themselves.

The country is right; the city often isn't

Across the industry, country-level accuracy typically lands between 95% and 99%, while city-level accuracy ranges from 50% to 80% depending on the country and the carrier. The gap is no accident: the country is read out of the allocation record, whereas the city is largely inferred and measured.

What distorts the estimate

  • Mobile carriers and CGNAT — thousands of subscribers share one egress IP, so the result shows the carrier's gateway, not where the subscriber is.
  • VPN, proxy, and Tor — the visible location belongs to the exit server, not the user.
  • Corporate networks — traffic from many sites can leave through the head office's IP.
  • Satellite and in-flight links — coverage areas are far too broad to yield a meaningful city.
  • Recently transferred blocks — after a change of owner, databases can keep showing the old location for months.

Where to use it, and where not to

At country level the data is reliable enough for content localization, currency selection, coarse risk scoring, and regulatory region restrictions. City-level data should be treated as a supporting signal — never the sole basis for locking an account, declining a payment, or accusing a user. For those decisions, weigh location alongside device fingerprint, account history, and blacklist records.

Sanity-checking it with IP-DB

IP-DB.com shows the ASN, network owner, and allocation range next to the location estimate. That is the practical plausibility test: if the ASN belongs to a cloud provider or hosting company, the city shown is unlikely to be a real end-user location.

Share

Comments 0

Share a question, your experience or a correction. You can comment as a registered user or anonymously.

No comments yet. Be the first.

Plain text; links are not accepted. Comments appear at once and may be moderated. Sign in to comment as a member