A: 40.7128, -74.0060B: 34.0522, -118.2437Runs entirely in your browser — your inputs never leave this page.
How this tool works
- 1
Computes initial great-circle bearing using spherical trigonometry: atan2(sin(Δλ)·cos(φ2), cos(φ1)·sin(φ2) − sin(φ1)·cos(φ2)·cos(Δλ)).
- 2
Calculates final bearing at destination and 180-degree reverse back-azimuth.
- 3
Applies NOAA World Magnetic Model to compute local magnetic declination for compass correction.
Common uses
- Marine sailing compass heading planning and dead reckoning.
- Aligning directional Wi-Fi, satellite dishes, and antenna azimuths.
- Aviation flight heading calculations between visual waypoints.
Frequently asked questions
Because meridians of longitude converge at the poles, a straight path across Earth crosses meridians at varying angles, causing the compass bearing to shift continuously.
More in Distance Measurement
- Distance Between Two PointsCalculate high-precision geodesic straight-line distance, highway driving route, initial compass bearing, and travel time between any two points on Earth.
- Midpoint CalculatorCalculate the exact halfway geographic point between two addresses or coordinates along the great-circle arc of the Earth.
- Distance Unit ConverterConvert between twelve length units — millimeters to nautical miles — using the exact NIST SP 811 conversion factors. Includes the survey units you meet in old US land records, like chains, furlongs and US survey feet, and shows your value in every unit at once.
- Speed Distance Time CalculatorWork out any one of speed, distance or travel time from the other two. Mix mph, km/h, m/s, knots and ft/s with miles, kilometers and nautical miles, and add a start time to get an ETA clock time for your arrival.
- Equidistance Line FinderEnter two places and draw the line of points that are exactly the same distance from both. See the geographic midpoint, the full line on a map, and a proof table with sample points and their equal distances to each side.
Planning a Direct Flight Leg from Phoenix to Tucson
A student pilot in Arizona is planning her first long cross-country flight, from Phoenix Sky Harbor (33.4373, -112.0078) to Tucson International (32.1161, -110.9410). She enters both coordinate pairs into the bearing calculator to get the direct course before she ever draws a line on her paper chart.
The tool returns an initial true bearing of about 146 degrees, southeast across the desert, for a straight-line distance of roughly 100 miles. That starting number matters because a great-circle course is not one fixed heading: the bearing slowly changes along the way. The calculator also gives the back-bearing from Tucson, about 326 degrees, which she can use to check her position relative to the destination on the return leg.
Next comes the step that separates a plan from a guess. Magnetic declination around Phoenix is about 9 degrees east, and with east declination you subtract: 146 minus 9 gives a magnetic course of about 137 degrees to steer by the compass. Skipping that correction over a 100-mile leg would put her roughly 16 miles off course, because 100 times the tangent of 9 degrees is about 15.8 miles of sideways drift.
Her instructor asks for one more scenario, so she runs the numbers for a halfway landmark, a distinctive peak near the middle of the leg at about 32.78, -111.47. The bearing from Phoenix to that peak and the bearing onward to Tucson differ by a couple of degrees, which makes the great-circle idea concrete: the nose of the plane should not point at exactly the same compass number for the whole flight, even though at this distance the drift is gentle enough to fly as one heading with small corrections.
She also uses the back-bearing as an emergency skill. If she ever needed to describe her position to a controller, a bearing of about 326 degrees measured from Tucson, combined with a distance estimate, fixes her on a single line on the chart. Ten seconds in the calculator before the flight buys her a cross-check she can use with nothing but a compass and a radio.
Before the lesson ends she runs one short hop for comparison: Phoenix to Falcon Field in Mesa, at 33.4608, -111.7280. The calculator returns a bearing of about 84 degrees, almost due east, for a distance of roughly 16 miles. Placing the two results side by side, 146 degrees for the 100-mile leg and 84 degrees for the 16-mile hop, shows her how quickly the required course swings with destination, and why guessing headings from a road map is a habit her instructor is determined to break before her checkride.
She plots 137 degrees on the chart, adds two visual checkpoints at the mountain gaps along the line, and compares the result with her instructor's figures. Everything agrees within a degree. The bearing calculator took ten seconds, and the flight itself becomes a matter of flying the plan rather than hoping the desert looks familiar. That is the whole value of the exercise: ten seconds of arithmetic on the ground, replacing a hundred miles of doubt in the air.
Common mistakes to avoid
- Flying a true bearing as magnetic. Compasses point at magnetic north, not true north. Forgetting declination is the classic way to parallel your course miles to one side.
- Mixing up forward and back bearings. The back-bearing is the outbound course plus or minus about 180 degrees. Flying 326 degrees when you meant 146 sends you home early and empty.
- Getting the declination sign backwards. East declination means magnetic north sits east of true north, so you subtract it. West declination, like the US East Coast, you add instead.
Pro tips
- Write down whether every bearing on your plan is true or magnetic, in plain words.
- Check declination for your exact area, since it changes across the country and over time.
- Use the back-bearing to a known peak or airport as a quick position cross-check.
Distances, Routes & Drive Times: How Mapping Math Works
Why the Earth refuses to be flat, how calculators measure true distances, how road networks find your route, and what those drive-time blobs on the map really mean. Written for Bearing Calculator & Compass Azimuth Angle and the everyday mapping tasks around it.
The Earth Is Not Flat (and Your Math Must Know It)
For a walk to the corner store, flat math is fine. For a drive from Chicago to Denver, it is not. The Earth bulges at the equator and flattens at the poles — an oblate ellipsoid about 13 miles wider than it is tall. Ignore that shape and long distances come out wrong by miles.
Surveyors model the planet with the WGS84 ellipsoid: an equatorial radius of 3,963 miles and a polar radius of 3,950 miles. Every serious distance tool, including the ones on this site, measures along this curved surface rather than through the planet's interior.
The practical rule is simple. Under about 10 miles, flat-map math and true geodesic math agree to within a few feet. Past 100 miles, the gap grows fast. A flight from New York to London measured on a flat map would miss by over 200 miles — which is why aviation never uses flat math.
Haversine vs. Vincenty: Two Ways to Measure
The Haversine formula treats the Earth as a perfect sphere. It is a few lines of code, runs instantly, and gets within about 0.5% of the true distance. For store locators and "places near me" features, that is plenty. Most web maps use it under the hood.
Vincenty's method goes further. It walks the actual WGS84 ellipsoid, iterating until the answer converges, and lands within millimeters on distances of thousands of miles. The cost is complexity: the math needs a dozen steps and can fail to converge for nearly antipodal points, though modern implementations handle that gracefully.
Which should you trust? For driving estimates and everyday questions, both agree closely enough that you will never notice. For surveying, aviation, and scientific work, Vincenty or its modern successor Karney's algorithm is the standard. This site uses ellipsoidal math wherever precision matters.
One more subtlety: "distance" has flavors. Great-circle distance is the shortest path over the surface. Rhumb-line distance holds one compass bearing the whole way — longer, but easier to steer by hand, which is why sailors used it for centuries.
This page shows the first two chapters. Read the complete this category field guide →