Skip to content

Technology · 7 November 2026 · 5 minute read

IP geolocation: how accurate is an IP address location?

How GeoIP databases are built, how accurate country, region and city are, and why mobile networks, CGNAT and VPNs distort statistics and country blocks.

Three levels of decreasing certainty: country mostly reliable, region variable, city often inaccurate. Beside them the disruptive factors: mobile networks, shared addresses and VPN
Graphic: Whovisit · View graphic in full size

Many tools show a location for an IP address: country, region, sometimes a city on a map. This looks precise, but it is an estimate. This article explains where the information comes from, how reliable it is and what that means for your statistics and for country blocks. What an address reveals otherwise is covered in IP tracking: what an IP address reveals about visitors.

An IP address carries no location

An IP address is a number on the network, not a place-name sign. The public network registry states to whom an address range is allocated. Added to that is a country field in the entry. How to look this up is shown in Who owns this IP address?. The location of the device is not recorded there. Every location a service displays has been derived from other sources.

How GeoIP databases are built

Providers such as MaxMind, IPinfo or IP2Location maintain databases that assign address ranges to a place. The providers usually disclose their exact sources and methods only in broad terms. In simplified form, these building blocks are part of it:

  • Registry data as the starting point, that is the network holder and the country of the entry.
  • Self-reporting by network operators. With a geofeed under RFC 8805, an operator can publish a file that roughly assigns address ranges to a place. The standard names as its purpose communicating location changes quickly, instead of waiting until databases notice them on their own.
  • Measurements, for example the round-trip times of network packets from known measurement points.
  • Further hints such as host names with location abbreviations.

The result is a statement of probability. Because network operators move and reassign addresses, entries go out of date. Databases are therefore republished regularly.

How accurate is the information?

There is no reliable figure for „the accuracy“. It depends on the country, the type of network and the provider. The providers themselves are the best source. MaxMind states an accuracy radius for its data. The provider explains that the radius describes a circle in which the address is more likely than not to lie. It also says the method is not precise enough to place a point on a map. The area can, according to MaxMind, cover 80 square kilometres or more. The provider also publishes its own comparison values by country on the page GeoIP accuracy comparison. They apply only to its own measurement method.

As a rule of thumb, this can be said qualitatively:

LevelReliabilityTypical error
Countrymostly goodCompanies and VPN services based in, or exiting from, another country
RegionvariableAreas near borders, networks that reach the internet centrally
Cityoften inaccurateDisplay of the provider's head office instead of the user's location
Street, housenot possibleCan never be derived as a result

Why mobile networks, CGNAT and VPNs interfere

Mobile networks. The address of a phone is assigned not at the cell tower but at a handover point in the provider's network. The location can therefore be far from the device.

Shared addresses (CGNAT). Because IPv4 addresses are scarce, providers use carrier-grade NAT. Many customers then share the same public address. For the connection between the customer's device and the provider, RFC 6598 reserves a separate address range (100.64.0.0/10). On the internet you see only the shared address, not the individual customer.

VPN and proxy. The visitor appears with the location of the exit server. A user from Vienna can thus appear as a user from another country.

Company networks. Many companies route all traffic through a central exit. Visits from several branches then appear at the head office. More on this in Home office, VPN and mobile: whom you do not see.

IPv6. Here too: the location comes from the provider's address range, not from the device.

Consequences for your statistics

  • Country and region reports are approximations. You should not over-interpret small shares.
  • City values in web analytics often show the locations of large providers. A city that suddenly appears strongly is frequently a network hub.
  • A rise from one country can point to bots from data centres. The network type from the registry often says more about this than the location. Company identification uses this too, see How does company identification work?.

Consequences for country blocks

Anyone who blocks content by country is blocking on the basis of a database's estimate. This has two sides:

  1. Too much blocked. Visitors with a shared or wrongly assigned address are locked out although they are in the permitted country.
  2. Too little blocked. Anyone who uses a VPN bypasses the block.

Blocks are therefore suitable as a rough hurdle, not as reliable enforcement. If a block is legally or contractually mandatory, you should clarify the effect with the database provider and offer a way to correct wrong assignments, for example a pointer to a contact form. And in any case: the IP address is often personal data, see IP address and GDPR.

Frequently asked questions

Can an IP address be used to find the exact location? No. The country is usually usable, the city uncertain, and a street or a house cannot be derived. Exact locations come only from information given by the user or from the device's location functions with the user's consent.

Why does my location show the wrong city? Because the database assigns the address to your provider's head office or to a former network. Database providers often offer correction requests for this. Network operators can also publish geofeeds.

Is the location important in company identification? Less so than the network holder. For assignment to a company, what counts is who owns the network. The displayed place is only a side detail.

Read more