You’ve found the destination on a map. Now you need to know which way to face when you look up from the screen. Coordinates identify where you’re starting and where you want to go. A bearing tells you which way to face from your starting point. A heading tells you which way you’re facing now.
OnlineCompass is our sister site for general direction finding. Its three tools let you work through those readings one at a time. You can try the full calculation below on a laptop, then check the heading on a phone with a compatible compass sensor. The example starts in central London and ends at the Kaaba in Makkah, so you can compare the result with QiblaFind’s published city bearing.
1. Get both map pins into decimal degrees
Copy the latitude and longitude of your starting point and destination. For a real trip, place the pin at the spot you care about. A station’s map label may sit in the middle of the building, while the entrance you need is on the opposite side of the block. Keep latitude in the latitude field and longitude in the longitude field, and check the signs. A south latitude or west longitude is negative in decimal degrees.
To follow the London example, enter 51° 30′ 25.92″ N, 0° 7′ 39.36″ W in the DMS-to-decimal form. DMS stands for degrees, minutes and seconds. The result is 51.507200°, −0.127600°. The minus sign keeps the longitude west of the prime meridian. Use the OnlineCompass GPS coordinates and DMS converter.
If you’re starting from where you stand, use the coordinates page’s Use my location button and check the reported accuracy. A display with six decimal places can still come from a location estimate with an accuracy radius of tens of metres. That matters when your target is a nearby doorway. For a future trip, work from a map pin instead. You can enter coordinates manually without granting location access.
2. Calculate the initial bearing
Enter 51.507200, -0.127600 as the start and 21.4225, 39.8262 as the destination. Those pairs represent QiblaFind’s London reference point and the Kaaba. Select Calculate bearing in the OnlineCompass bearing and distance calculator.
The calculator gives 119.0° from true north and an estimated 4,793.8 km along the shorter great-circle arc on a spherical Earth. Bearings increase clockwise. North is 0°, east is 90° and south is 180°, so 119° sits between east and southeast. From the London reference point, picture facing due east and then turning about 29° toward south.
The number describes the direction the arc takes as it leaves London. The heading along the arc can change as you go. For a nearby landmark, the same calculation gives you a direction to look. If a river or a building sits between you and the pin, use a map for the bridges, entrances or footpaths. For the longer-distance geometry, see why the Qibla follows a great circle.
3. Match the compass’s north reference to the bearing
Open the OnlineCompass live compass on your phone and start the device compass. Grant motion or orientation access if your browser asks. Hold the phone roughly flat, point the top edge away from you, and read the North reference label along with the number. That label tells you how to compare the reading with the 119° target.
- True north. Compare the heading directly with 119°. If your reading is 125° true, turn about 6° left. Once the reading settles, pick a landmark or line in front of you so you can put the phone down and keep facing the same way.
- Magnetic north. The calculator’s bearing uses geographic north. Select True North and set your location in OnlineCompass to estimate a correction for a supported magnetic reading. For a separate magnetic compass, use a current declination for the place where you’re standing.
- Absolute heading with an unspecified reference. The browser has supplied a heading, but the tool can’t confirm which north it uses. Check against a known direction or use a compass with a confirmed reference before matching the degrees.
- Relative rotation, manual angle, or no heading. You can watch a relative rotation change or explore the degree scale manually. To align yourself to north, use a known landmark or a separate compass.
OnlineCompass uses the World Magnetic Model to estimate local declination for explicitly magnetic readings. That correction accounts for the difference between magnetic and geographic north. If the dial jumps next to a steel railing, move away from it and take a fresh reading. The correction can’t account for interference from nearby objects. OnlineCompass heading methodology
Convert a true bearing for a magnetic compass by hand
Magnetic declination is the angle between true north and magnetic north. Under NOAA’s convention, east declination is positive and west declination is negative. To convert a true bearing to a magnetic one, subtract the signed declination. If you go the other way, add it. Add 360° to a negative result, or subtract 360° if the result reaches or exceeds 360°.
Try a separate example with a 100° true target. With a local declination of 8° east, the magnetic target is 92°. With 8° west, it is 108° because you subtract a negative number. These are practice values. Use the declination for your own location and date, and skip the manual calculation if the compass already displays true north. NOAA’s magnetic declination guidance
Cross-check the Qibla result
The Qibla direction page for London reports 118.99° for the same reference coordinates. OnlineCompass shows 119.0° because its calculator rounds the angle to one decimal place. Both figures describe the calculated bearing at the London reference point, where a real compass reading can still vary with interference and sensor accuracy.
When you’re finding the direction for prayer, open the Qibla finder and use your location or choose your city. QiblaFind already knows the destination, so you can read the bearing to the Kaaba without typing its coordinates. If you’re checking with a separate compass, keep the true-north bearing visible and confirm the reference on that compass before you turn. Use the London number only when following the worked example.
Troubleshoot a bearing that looks wrong
The direction seems nearly reversed. Check which pin you put in the start fields. Reversing the pair calculates a new initial bearing from the other end. On a long great-circle route, that reverse bearing needn’t be exactly 180° from the first. If the pins are in the right order, check for a missing west or south sign and compare the saved starting point with your current location.
Your phone disagrees with another compass. Check the north reference on both before comparing the numbers. If the heading changes when you step away from a car, laptop or steel door, try again in an open spot. Remove any magnetic accessory you can safely take off. If a heading stays steady yet still looks wrong, compare it with an independently known direction. Apple’s guidance on compass accuracy
The heading stays blank even after allowing location access. Location permission lets the browser estimate a position. A live heading also needs usable orientation data and any motion permission your browser requires. You can still do the coordinate conversion and calculate the bearing on a computer, then carry that number to a compass with a known north reference. OnlineCompass permission troubleshooting
You’re next to the destination and the angle swings. The distance between the pins may be comparable to the browser’s location uncertainty. If you’re looking for a particular entrance, use the street layout and signs at the site. That gives you a fixed reference even if the location dot drifts from one side of the building to the other.