Distance Calculator

Calculate the great-circle distance between two coordinates, or solve distance, speed, or time from the other two.

📏 Distance Calculator

📐 How to Use

  1. Choose a mode: "Coordinates (Lat/Long)" or "Speed & Time".
  2. Coordinates: enter the latitude and longitude of Point A and Point B (decimal degrees, e.g. 28.6139, 77.2090) to get the straight-line distance between them.
  3. Speed & Time: choose what to solve for — Distance, Speed, or Time — then fill in the other two values and units.
  4. Results update instantly as you type — no need to click Calculate.

🎯 When to Use This

  • Estimating a flight distance between two cities whose coordinates you can copy out of a map application in decimal degrees.
  • Converting a planned journey into a time estimate by entering the distance and an average speed you expect to hold.
  • Checking the separation between two GPS fixes in a log, where the great-circle figure is the right basis for comparison.
  • Working out the average speed implied by a known distance and an elapsed time, such as after a run or a drive.

❓ Frequently Asked Questions

QWhat is great-circle distance?
Great-circle distance is the shortest path between two points on the surface of a sphere — in this case, the Earth. It follows the curve of the Earth rather than a straight line through it, which is why it's the standard way to measure distance between two geographic coordinates (e.g. flight distance between two cities).
QHow accurate is the coordinate distance calculation?
This tool uses the Haversine formula with Earth's mean radius (6,371 km), which is accurate to within about 0.5% for most points — more than sufficient for general use. It doesn't account for the Earth's slight ellipsoidal shape, which more precise formulas (like Vincenty's) correct for.
QWhere do I find a location's latitude and longitude?
Most map applications show coordinates when you long-press or right-click a location — look for a "What's here?" option or similar, or check a location's share/details panel.
QCan I solve for speed or time instead of distance?
Yes — in "Speed & Time" mode, choose which quantity you want to solve for (Distance, Speed, or Time), and fill in the other two. The tool rearranges the distance = speed × time formula automatically.
QIs my data sent to a server?
No. All calculations happen locally in your browser using JavaScript. Nothing is sent to or stored on any server.

ℹ️ About This Calculator

The shortest path between two points on a globe is an arc, not a line, so plane geometry gives the wrong answer for coordinates. The Haversine formula computes that arc from the differences in latitude and longitude using spherical trigonometry, then multiplies the resulting central angle by the Earth's radius. The separate relationship distance = speed x time rearranges into three forms, depending on which of the three quantities is unknown.

Coordinate mode takes four decimal-degree values, rejects latitudes outside -90 to 90 and longitudes outside -180 to 180, and returns kilometers to one decimal in the headline plus kilometers, miles and nautical miles to two. Speed and time mode converts every input to meters and seconds, solves for whichever field you hid, and converts the answer back into the unit you picked, with decimal places scaled to the size of the result.

⚠️ Notes & Limits

  • The great-circle figure is an arc across the surface. It is not a driving or routed distance, and no roads, terrain or airspace are considered.
  • The Earth is modeled as a sphere of radius 6371 km, so results differ from an ellipsoidal method such as Vincenty's by up to roughly half a percent.
  • Coordinates must be plain decimal degrees. Degrees-minutes-seconds notation, scientific notation and a value written as .5 without a leading zero are all refused.
  • Speed and time mode assumes one constant average speed for the whole journey, so stops, traffic and acceleration are not part of the result.