Free tool

Distance Calculator

Distance between two sets of coordinates, in miles or kilometres, with both points drawn on a map.

Enter Locations

A Starting Point
B Destination

Distance Results

Straight-line distance (as the crow flies)

Estimated driving distance (~1.3x straight line)

Roads aren't straight lines. Actual driving distance varies.

Map Preview

The Haversine formula calculates the great-circle distance between two points on a sphere given their latitudes and longitudes. It accounts for the Earth's curvature.

a = sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlng/2)
c = 2 × atan2(√a, √(1-a))
d = R × c

Where R = 6,371 km (Earth's radius)

This is the same formula used by most store locators for radius searches. It's accurate enough for distances up to several thousand kilometers.

Need a store locator with radius search?

StoreRocket uses the Haversine formula to find stores within any radius. Set up in minutes.

Understanding Distance Calculations

Distance calculations are fundamental to any store locator. When a customer searches "stores near me," your locator needs to quickly calculate the distance from their location to every store in your database.

Why Straight-Line vs Driving Distance?

There are two types of distance measurements commonly used:

  • Straight-line distance (Haversine): Fast to calculate, doesn't require API calls, good enough for "stores within X miles" searches. This is what most store locators use.
  • Driving distance: Requires routing API calls (costly), accounts for actual roads, better for turn-by-turn directions but overkill for radius searches.

The 1.3x Driving Multiplier

Studies show that driving distance averages about 1.3x the straight-line distance in urban/suburban areas. This varies by terrain—it's closer to 1.2x in flat areas with grid streets, and can exceed 1.5x in mountainous or rural regions.

Coordinates vs Addresses

Coordinates (latitude/longitude) are precise but not human-friendly, which is why addresses have to be converted to coordinates through geocoding. That conversion is a metered API call on every provider, so this tool works from coordinates directly. StoreRocket does the geocoding for you when you import locations.

StoreRocket handles all these complexities for you. Upload addresses, we geocode them. Customers search, we calculate distances. Check out our features to see how easy it is.

Frequently Asked Questions

The Haversine formula is accurate to within 0.5% for distances on Earth's surface. For store locator purposes, this is more than sufficient. The Earth isn't a perfect sphere, but the difference is negligible for practical applications.
Our driving estimate uses a 1.3x multiplier on straight-line distance, which is a statistical average. Google Maps calculates actual driving routes considering roads, traffic patterns, and real-time conditions. For store locators, the straight-line distance is what matters for radius searches.
Yes! The Haversine formula is the standard for store locator radius searches. Enter your customer's coordinates and a store's coordinates to verify the distance is within your specified radius.
In Google Maps, right-click any spot and the latitude and longitude appear at the top of the menu; click them to copy. On a phone, drop a pin and read them from the place card. Or press "Use my location" and the browser fills in where you are. This tool takes coordinates rather than addresses because turning an address into coordinates is a paid, rate-limited API call on every provider, and we would rather the tool stay free and instant than quietly meter it.
Browser geolocation accuracy depends on your device and settings. GPS provides ~10m accuracy, WiFi positioning is ~50-200m, and IP-based location can be off by several miles. For testing purposes, manually entering coordinates is more reliable.