Muslims face the Kaaba in Makkah when they pray. For anyone far away, the direction is not simply east or west, because the Earth is round. The correct bearing is the shortest path over the Earth's surface, called a great circle, and it can be calculated precisely. Here is how.
Why Not Just Point East?
On a flat map, Makkah can look like it lies in a different direction from the true one. The shortest path from London to Makkah, for example, heads south-east, not due east, because lines of longitude converge toward the poles. The bearing we want is the initial direction of that great-circle route, measured clockwise from true north.
The Inputs
You need the coordinates of two places: yours and the Kaaba, at about 21.4225° N, 39.8262° E. The formula uses the difference in longitude and the two latitudes. The bearing (θ) satisfies:
tan θ = sin(Δλ) × cos(φ₂) ÷ [cos(φ₁) × sin(φ₂) − sin(φ₁) × cos(φ₂) × cos(Δλ)]
where φ₁ is your latitude, φ₂ is the Kaaba's latitude, and Δλ is the longitude difference. The result is converted into degrees from 0 to 360.
Results for Selected Cities
Using this formula, the approximate Qibla bearings from true north, with the great-circle distance to Makkah, are:
- London, United Kingdom: about 119°, roughly 4,800 km.
- New York, United States: about 58.5°, roughly 10,300 km.
- Toronto, Canada: about 54.6°, roughly 10,500 km.
- Jakarta, Indonesia: about 295°, roughly 7,900 km.
- Sydney, Australia: about 277.5°, roughly 13,200 km.
Bearings between 0° and 90° point north-east, 90° to 180° south-east, 180° to 270° south-west, and 270° to 360° north-west. So from New York, you face north-east, and from Jakarta, you face roughly north-west.
Magnetic North vs True North
A compass needle points to magnetic north, which differs from true north by an angle called magnetic declination. It varies by location and changes slowly over time. If the declination in your city is 5° west, then you must adjust the compass reading by that amount. Phone compass apps usually correct for this when location is on, but they can be thrown off by metal, magnets and cases. Calibrate the compass, and keep away from electronics.
Check With the Sun
Twice a year, the Sun is directly over the Kaaba at midday, so shadows of vertical objects point directly away from it. This happens on about 27 or 28 May at roughly 12:18 Makkah time, and on 15 or 16 July at roughly 12:27 Makkah time. At those moments, anyone who can see the Sun can find the Qibla from the shadow. Convert the time to your local time zone, and place a straight stick on flat ground. Our time zone converter helps with the time conversion.
What If You Cannot Be Exact?
Scholars have said that a person who cannot determine the exact direction should make a sincere effort to face the general direction. If you are in a place such as an aeroplane, ship or unfamiliar area, use available tools and do your best. A small error in bearing matters less than people fear. A 5° error over 5,000 km is a lateral difference of about 440 km at the destination, but the intention and effort are what count in the general direction.
Different Methods
- Great-circle bearing, as above, is the one most apps and organisations use.
- Rhumb-line (constant bearing) directions are sometimes mentioned in older sources, and they differ slightly from the great-circle result, especially over long distances.
- Some communities follow the direction used by their local mosque. Ask a scholar or your mosque if you are in doubt.
Related Tools
Prayer times use similar geographic calculations. Our guide to how prayer times are calculated explains the methods and the angles used.
A Simple Routine
Look up your latitude and longitude, use the formula or our Qibla calculator to get the bearing, and check it with a compass that is corrected for magnetic declination. On one of the two sun days, confirm it with a shadow.