I'm trying to understand how using each part of an IP address influences the accuracy of geocoding. For example, if


is used instead of


what is the approximate distance in KM? I'm using the IP2Location Lite database to examine who has visited a website. The README states the following:

1. IP2Location Lite Edition is free package with accuracy up to Class C (192.168.1.X) only. It is restricted for non-commercial use.

However, I'm having difficulty finding documentation on what the accuracy of this actually means. Does this accuracy vary over time also?

2 Answers 2


"Class C" is a historical reference meaning that your location data is summarized to the /24 level. For example, even if and happen to be in very different physical locations, the database will have only one lat/long for the entire network.

Potentially useful generalizations about accuracy:

  • If you summarize to the /24 level (203.0.113.x), you can be reasonably confident that more than 80% of your data points will fall within the correct general metropolitan area.

  • If you summarize to the /16 level (203.0.x.x), you can expect that more than 80% of your location data points will be on the correct continent and probably even in the correct country.

  • If you summarize to the /8 level (203.x.x.x), your location data will be almost completely meaningless.

IP addresses that are likely to geocode reasonably well (within 25 miles or less) at the /24 summary level include:

  • College/university campuses
  • Corporate headquarters
  • Cable modem connections serviced by major carriers like Comcast
  • Fiber-to-the-premise connections serviced by major carriers like Verizon and Frontier

IP addresses that are reasonably likely to geocode quite poorly (off by 200 miles or more) at the /24 summary level include:

  • 3G and 4G wireless phones/hotspots
  • Corporate branch offices
  • DSL connections serviced by CLECs
  • Oh? You can't geocode to the coffee shop on the corner like in the cop shows. Disappointed ;)
    – Nathan W
    Apr 21, 2012 at 12:21
  • 1
    @NathanW I strongly suspect that law enforcement, writ large, has access to better and more granular databases than "IP2Location Lite Free Edition," and with a warrant anything is possible, but you are correct that it is usually not quite that easy. Apr 21, 2012 at 13:43
  • 2
    I'm sure they have a GUI interface written in Visual Basic to track those IP addresses youtube.com/watch?v=hkDD03yeLnU :)
    – Nathan W
    Apr 21, 2012 at 14:18
  • Thanks Miles, that lines up closely with how my data is behaving actually. What does the convention /24 and /16 mean? I understand what you are referring to and suspect is something base 2 related like (2*2*2) + (2*2*2) but am not sure!
    – djq
    Apr 21, 2012 at 22:09
  • Here's the answer: serverfault.com/questions/49765/how-does-subnetting-work Apr 21, 2012 at 22:41

This is all nonsense. Classless IP (CIDR) distribution has an impact on the 'hierarchical' approach. An ISP is assigned a block - in my case /19 to /22s from various larger blocks. We cover two states and move blocks between states often. NAT also has an impact. The best you are going to get is (a) what the ISP updates and is not overwritten (which happens) or (b) where the ISP is headquartered who is assigned the blocks.

  • 1
    Are you answering the Question or responding to the nine year old Answer?
    – Vince
    Apr 30, 2021 at 22:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.