Quran

Qibla Direction: How It Is Calculated From Your Coordinates

S SalatWaqt May 31, 2026 4 min read ۵ ویوز

What the qibla is

The qibla is the direction a Muslim faces in prayer: toward the Kaaba in Makkah, at roughly 21.4225° N, 39.8262° E. Wherever you are in the world, the qibla is the most direct line on the Earth's surface from your location to that point.

The shortest path on a sphere

The Earth is very nearly a sphere, so the shortest route between two places is not a straight line on a flat map — it is a great-circle arc. The qibla is the initial bearing (compass heading) of that great-circle path from you to Makkah. This is the same kind of route long-haul aircraft fly, which is why their paths look curved on a flat map.

The formula

Given your latitude and longitude and Makkah's, the initial bearing is found with spherical trigonometry. In words: take the difference in longitude between you and Makkah, combine it with both latitudes using sine and cosine, and the arctangent of the result gives the bearing measured clockwise from true north. SalatWaqt computes exactly this for your coordinates and shows the result in degrees on every city page.

Why it can point "the wrong way"

People are sometimes surprised that, for example, the qibla from parts of North America points north-east rather than south-east toward Makkah. On a flat map that looks wrong, but on the globe the great-circle route really does head up over the pole region. The maths is following the curve of the Earth, not the distortion of the map.

True north vs. magnetic north

A calculated bearing is measured from true north. A magnetic compass points to magnetic north, which differs from true north by an amount (the magnetic declination) that varies by location and slowly over time. If you use a physical compass, adjust for your local declination, or use a phone whose compass already corrects for it.

Facing the qibla in practice

The simplest method today is to align with the degree figure shown for your city: stand facing that bearing from true north. You can confirm with a phone compass app, an outdoor landmark of known direction, or the angle of nearby mosques. Minor imprecision is forgiven — scholars hold that facing the general direction of the Kaaba is sufficient when exactness is not possible.

A worked example: three cities

From Cairo, which sits almost due north-west of Makkah, the qibla points roughly south-east — close to what intuition expects. From London, the great-circle bearing is around the south-east as well, but more toward the east than many assume. From New York, the surprise is real: the shortest path to Makkah runs up and over the high northern latitudes, so the qibla there points roughly north-east, not south-east. In every case the figure is the initial heading of the shortest surface route — and SalatWaqt prints that exact bearing for your own city so you never have to guess from a map.

Common misconceptions

"I should just point toward the south-east / toward the equator." Only if you happen to live north-west of Makkah. The correct direction depends entirely on your coordinates, and for much of the Americas and the far north it is counter-intuitive.

"A flat-map straight line gives the qibla." It does not. Flat maps distort direction over long distances; the true bearing follows the curve of the globe.

"My compass points to true north." A magnetic compass points to magnetic north, which can be several degrees off true north depending on where you are. Correct for the local declination, or rely on a device that already does.

Summary

The qibla is a great-circle bearing from your coordinates to the Kaaba, measured from true north. It is pure geometry applied to a sphere — which is why a precise figure beats guessing from a flat map, and why SalatWaqt gives you the exact degrees for your location.

#prayer times #guide #salatwaqt