How to find the Qibla
The Qibla is the direction of the Kaaba in Makkah, which Muslims face in prayer. In a hotel, a new office or a country you're visiting for the first time, it can be hard to know the right direction. This tool calculates the Qibla mathematically from your coordinates and shows the result in degrees and on a visual compass.
How to use it
- Tap “Use my location” and allow access, or pick the nearest city.
- The Qibla bearing from true north and your distance to the Kaaba appear.
- On a phone, tap “Enable phone compass” and hold the device flat, away from metal and electronics.
- Turn slowly until the green arrow points straight ahead and the compass ring glows.
How the Qibla is calculated
Because the Earth is a sphere, the shortest path to Makkah isn't a straight line on a flat map but an arc called a “great circle”. We compute the initial bearing of that arc with spherical trigonometry, from your latitude and longitude and the Kaaba's coordinates (21.4225° N, 39.8262° E). That's why from North America, for example, the Qibla points north-east rather than south-east as a flat map suggests.
Tips for an accurate direction
- Phone compasses are affected by metal, magnets and computers — move away from them.
- If the compass seems unstable, wave your phone in a figure-8 a few times to calibrate it.
- You can also use the sun: at midday it is roughly due south for anyone north of the equator.
- The bearing is from true north; magnetic north may differ by a few degrees depending on where you are.
Qibla from some cities
| City | Approx. bearing |
|---|---|
| Casablanca | 94° (about east) |
| Cairo | 136° (south-east) |
| Riyadh | 244° (south-west) |
| Dubai | 258° (west) |
| Paris | 119° (south-east) |
| New York | 58° (north-east) |
See also Prayer Times for your city.
Which way is the Qibla? Check it without a compass
Twice a year the sun passes directly over the Kaaba. At that moment, anywhere the sun is up, the shadow of any upright object points directly away from the Kaaba — so the Qibla is the opposite direction of the shadow:
- 27 or 28 May at 12:18 Makkah time (09:18 UTC).
- 15 or 16 July at 12:27 Makkah time (09:27 UTC).
Stand a stick upright on level ground at that time and draw a line from the tip of the shadow to the base of the stick: that line points to the Qibla. Readings within about five minutes of the time are accurate, and the same time a day before or after also works. Convert the time to your local time zone first.
Where the sun is below the horizon at those moments, such as most of the Americas and Australia, use the opposite events, when the sun is over the point on Earth directly opposite the Kaaba: around 12–14 January at 21:30 UTC and 28 or 29 November at 21:09 UTC. Then the shadow points toward the Qibla.
Common mistakes when finding the Qibla
- Using a flat map: a straight line on a map is not the shortest path to Makkah, which is why the Qibla from North America is north-east, not south-east.
- Using a compass near metal: cars, laptops and speakers throw off a phone's compass.
- Mixing up magnetic and true north: the bearing here is from true north; magnetic north can differ by several degrees depending on where you are.
Frequently Asked Questions
Is the Qibla direction accurate?
The calculation is very precise. Compass accuracy on a phone depends on the sensor and magnetic interference around you.
Why doesn't the compass work on my computer?
Most computers have no compass sensor. Use the bearing in degrees with a real compass, or open the page on your phone.
Does it need the internet?
No — the calculation happens on your device. It only needs location permission or a chosen city.
What does a Qibla of 94° mean?
Start at north and turn clockwise 94 degrees — slightly south of due east.
Is my location saved?
Your last location is saved on your device only for convenience, and is never sent anywhere.
Last updated: