Use this distance calculator to solve travel distance, speed, or time, find straight-line distance between points, or measure Earth-surface distance between coordinates.
Advanced options
Definitions
Calculated result: The main answer for your chosen mode. It may be distance, speed, or time.
Distance unit: The unit used for travel distance input, such as miles, kilometers, meters, or feet.
Speed unit: The unit used for travel speed input, such as mph, km/h, m/s, or ft/s.
Point mode: Chooses whether the point-distance math uses 2D points on an x-y plane or 3D points with a z-value too.
Coordinate differences: The signed changes in each axis, shown as dx, dy, and sometimes dz. A negative value means point 2 is lower on that axis than point 1.
Central angle: The angle at the center of Earth between two latitude/longitude points. It is used to get Earth-surface distance.
Initial bearing: The starting compass direction from the first latitude/longitude point to the second, measured clockwise from north from 0 to less than 360 degrees [3].
Assumption note: A short reminder about what the result means, such as straight-line distance versus route distance or average speed versus live traffic.
Common mistakes and quick fixes
Mistake: Entering values in Distance and Speed that do not match Distance unit and Speed unit .
Fix: Make sure your numbers use the exact units shown in those labels before you calculate.
Mistake: Leaving Time (minutes) or Time (seconds) blank, negative, or 60 or more.
Fix: Enter valid extra time only, with minutes and seconds from 0 up to 59.999.
Mistake: Using Point 1 z and Point 2 z while Point mode is set to 2D points and expecting them to change the answer.
Fix: Switch Point mode to 3D points if you want z-values included.
Mistake: Typing map coordinates into Point 1 x and Point 1 y instead of the latitude/longitude fields.
Fix: Use Start latitude (deg) , Start longitude (deg) , End latitude (deg) , and End longitude (deg) for places on Earth.
Mistake: Expecting Calculated result in latitude/longitude mode to match a driving route.
Fix: Read Assumption note ; geo mode gives great-circle surface distance, not road distance.
Mistake: Solving for speed or time with zero travel time or zero Speed .
Fix: For speed, total time must be greater than 0. For time, Speed must be greater than 0.
Limitations & Key Assumptions / Boundary Conditions
- Travel mode uses average speed. It does not include traffic, stops, wind, terrain, or route changes.
- Travel inputs must use consistent units. If Distance is in miles and Speed is in km/h, the result will only make sense after the calculator converts correctly.
- When solving for speed, total time must be greater than 0. When solving for time, Speed must be greater than 0.
- Time (minutes) and Time (seconds) are extra parts of time, not total rollover fields, so values must stay below 60.
- Cartesian mode gives straight-line Euclidean distance. It does not measure path length around obstacles or along curves.
- In 2D point mode, Point 1 z and Point 2 z are ignored completely.
- Latitude/longitude mode uses a great-circle model with mean Earth radius, so results are Earth-surface distance on a sphere, not driving distance, walking distance, or a perfect ellipsoid geodesic.
- If the two latitude/longitude points are identical, distance is 0 and initial bearing is undefined, so it should be treated as N/A.
- Latitude must stay from -90 to 90 and longitude from -180 to 180. Values outside those ranges are input errors.
Methodology
Travel mode
This mode uses the standard speed-distance-time relationship. First, the calculator combines the three time fields into one total time value. Then it solves for the missing quantity using consistent units.
d = v * t
v = d / t
t = d / v
t_hours = hours + minutes/60 + seconds/3600
Mini-example: if Speed is 60 mph and time is 2 hours 30 minutes, total time is 2.5 hours, so distance is 60 x 2.5 = 150 miles. If Distance is 90 km and time is 1.5 hours, speed is 90 / 1.5 = 60 km/h.
Distance between points
This mode finds straight-line distance between two points. In 2D it uses x and y only. In 3D it also includes z. The output is the direct Euclidean distance, not a path around obstacles [1].
distance = sqrt((x2 - x1)^2 + (y2 - y1)^2)
distance = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)
The calculator also shows signed coordinate differences. For example, from (0,0) to (3,4), dx = 3 and dy = 4, so distance = sqrt(3^2 + 4^2) = 5. In 3D, from (0,0,0) to (3,4,12), distance = sqrt(9 + 16 + 144) = 13.
Latitude/longitude mode
This mode uses the haversine method to find great-circle distance, which is the shortest path along Earth's surface between two coordinates [3]. Latitudes and longitudes are first converted from degrees to radians. Then the calculator finds the central angle and multiplies it by Earth's mean radius, 6,371,008.8 m.
a = sin^2((phi2 - phi1)/2) + cos(phi1)*cos(phi2)*sin^2((lambda2 - lambda1)/2)
c = 2*atan2(sqrt(a), sqrt(1-a))
distance = R * c
If requested, the calculator also shows the initial bearing, which is the starting compass direction from the first point to the second [3].
theta = atan2(sin(delta_lambda)*cos(phi2), cos(phi1)*sin(phi2) - sin(phi1)*cos(phi2)*cos(delta_lambda))
Mini-example: for New York City to Los Angeles, the great-circle distance is about 3,935.7 km, and the initial bearing is about 273.7 degrees. That means the shortest surface path starts almost due west, slightly toward the north.
Unit handling
The calculator converts travel and Earth-distance results using standard factors:
1 mi = 1609.344 m, 1 ft = 0.3048 m, 1 km = 1000 m, 1 h = 3600 s, and 1 min = 60 s. Alternate common units are shown so you can check the answer quickly.
Assumptions behind the results
Travel mode assumes constant average speed over the whole trip. Cartesian mode assumes flat straight-line geometry. Latitude/longitude mode assumes a spherical Earth with mean radius, so real route distance and high-precision geodesic distance can differ slightly from the displayed value.