How it is calculated
The Qibla is the direction of the shortest path over the Earth’s surface (the great circle) from you to the Kaaba (21.4225° N, 39.8262° E):
θ = atan2( sin Δλ , cos φ₁·tan φ₂ − sin φ₁·cos Δλ )where φ₁ is your latitude, φ₂ the Kaaba’s latitude and Δλ the longitude difference. The result is measured clockwise from true north.
Compass note: a magnetic compass points to magnetic north, which can differ from true north by several degrees depending on where you are (magnetic declination).
Worked example
From Rabat (34.02° N, 6.84° W) the Qibla is about 95° from north — almost due east — and Makkah is roughly 4,760 km away.
Frequently asked questions
Why is the Qibla from North America north-east, not south-east?
Direction is calculated along the shortest path on a sphere, which differs from a straight line on flat maps.
How do I use the angle?
Point a compass to north, then turn clockwise by the number of degrees shown. You can also use the sun: on 28 May and 16 July it is directly over the Kaaba at 12:18 Makkah time.
Is an approximate direction enough?
According to most scholars, someone far from the Kaaba only needs to face its general direction after making a reasonable effort.