True vs magnetic north, compass calibration, and what to do when your phone disagrees with itself.
If you have ever stood in an unfamiliar hotel room trying to figure out which way to pray, you know the feeling. You pull out your phone, open a compass, spin around twice, and still aren't entirely sure. It should not be this hard.
The good news: finding the qibla is straightforward once you understand the geometry and have the right tools. This guide covers the math, the gotchas with phone compasses, and the practical tricks for getting oriented anywhere — at home, in a car, in a hotel, or out in the wild.
The qibla is the bearing — the compass angle — from your current location to the Kaaba in Mecca (21.4225°N, 39.8262°E). Critically, it is the great-circle bearing: the angle of the shortest path across the surface of the Earth, not a straight line drawn on a flat map.
This distinction matters. On a flat (Mercator) world map, the line from New York to Mecca looks like it should go east-southeast. But on a globe, the shortest path arcs northward — over Greenland — so from New York the qibla is roughly 58° (east-northeast). Mercator maps lie. Globes don't.
Here are great-circle qibla bearings from major cities so you can sanity-check your app:
| City | Approx. Qibla Bearing | General Direction |
|---|---|---|
| London | 119° | East-southeast |
| New York | 58° | East-northeast |
| Los Angeles | 24° | North-northeast |
| Toronto | 53° | East-northeast |
| Sydney | 277° | West-northwest |
| Singapore | 293° | West-northwest |
| Karachi | 266° | Almost due west |
| Dhaka | 282° | West-northwest |
| Istanbul | 151° | South-southeast |
| Cairo | 136° | Southeast |
| Lagos | 56° | East-northeast |
| Cape Town | 32° | North-northeast |
If your app is showing a number wildly different from the one in this table for your nearest city, something is wrong — usually with the compass, not the calculation.
Compasses point to magnetic north, not true (geographic) north. The difference between them is called magnetic declination, and it varies by where you stand on Earth — from near zero in much of South Asia to as much as 20° in parts of North America and the high Arctic.
A qibla app needs to account for this. If your app gives you a bearing relative to true north (which the math expects) and you measure it against a raw compass reading (which is magnetic), you can be 10–20° off without realizing. Most modern qibla apps handle declination automatically, but cheap or older compass apps often don't.
Quick check: if your phone's compass app shows "true north" mode, use that. If it only shows magnetic, you'll need to subtract the declination for your area (positive declination means magnetic is east of true, so subtract; negative means add).
The fastest method on the ground: if you can see a mosque, the mihrab (the niche imams face during prayer) points toward the qibla. Stand at the mihrab and look outward — that's the direction. This works even when your phone is dead.
The sun rises roughly in the east and sets roughly in the west, with the exact angle drifting by season. Around the spring and autumn equinox (late March, late September), sunrise is almost exactly 90° (due east) and sunset is 270° (due west) anywhere on Earth. If you know your qibla bearing, you can use the sun as a rough reference even without a compass.
On May 28 at 12:18 UTC and July 16 at 12:27 UTC, the sun is directly above the Kaaba. Anywhere the sun is visible at that moment, the shadow it casts points exactly opposite the qibla. If you're outdoors at one of those windows, plant a stick (or use the shadow of any vertical object) and you have your qibla, no app required.
Most people reach for a qibla app on their phone. Most of the time, it works. But if you have ever watched the arrow spin wildly or point in a direction you know is wrong, you've hit one of these:
The figure-eight calibration trick solves most issues. Hold your phone and trace a large figure-eight in the air, rotating your wrist as you go. Repeat three or four times. Compasses usually settle down immediately.
A GPS-based qibla finder calculates the bearing from your coordinates to Mecca using the great-circle formula. It doesn't depend on the magnetometer for the bearing itself — only for showing you which way you're currently facing.
This matters because the bearing is correct even when your compass is wrong. If the app tells you "qibla is at 58°" and your compass says you're facing 90°, you know to rotate left 32°. You can sanity-check the compass against the published bearing for your city. Pure-compass apps don't give you that fallback.
Niyat's qibla finder combines GPS and magnetometer: GPS for the precise bearing from your real coordinates, compass for the live indicator. If the magnetometer is unreliable, the printed bearing angle still gets you oriented.
Yes. Scholars across madhabs agree that facing the general direction of the Kaaba is sufficient if you cannot be exact. A few degrees of error does not invalidate your prayer.
GPS-based bearings are more reliable indoors and around electronics. The best apps combine both — GPS for the bearing, compass for live orientation.
The shortest path on a sphere is a great circle, not a straight line on a flat map. From much of North America the qibla points roughly northeast — closer to Greenland than to Africa. Trust the app's calculation; the "wrong" feeling comes from mental Mercator maps.
Trace a figure-eight in the air with the phone. Stay away from laptops, metal desks, and chargers. If the needle still jitters, switch to a GPS-only qibla mode.
Facing Qibla is recommended (mustahabb) for dua, dhikr, and Quran recitation, but it is not required outside of salah. Only the obligatory and sunnah prayers require facing the Kaaba.
GPS-accurate qibla direction, prayer times, and Quran — all in one app. No ads, no clutter.
Download Niyat Free