Qibla direction
Bearing from your location to the Kaaba in Mecca. True-north, great-circle, computed in your device. No signup, no tracking until you accept cookies.
Locating you…
How to use
- Open your phone’s compass app. Set it to true north in settings if available.
- Hold your phone flat and rotate yourself until the compass needle aligns with the bearing shown above.
- You are now facing the Qibla.
If your phone only shows magnetic north, subtract the local magnetic declination (positive for east, negative for west) from the bearing shown above. Declination varies between about −20° and +20° depending on where you are.
Qibla bearing from major Muslim cities
Sorted by distance to the Kaaba. Bearings are degrees from true north (not magnetic).
| City | Bearing | Cardinal | Distance to Mecca |
|---|---|---|---|
Mecca Saudi Arabia | 0.0° | N | 0 km |
Jeddah Saudi Arabia | 96.0° | E | 66 km |
Medina Saudi Arabia | 176.3° | S | 340 km |
Riyadh Saudi Arabia | 243.8° | WSW | 790 km |
Khartoum Sudan | 48.2° | NE | 1,010 km |
Doha Qatar | 252.6° | WSW | 1,269 km |
Cairo Egypt | 136.1° | SE | 1,287 km |
Baghdad Iraq | 199.8° | SSW | 1,396 km |
Dubai United Arab Emirates | 258.2° | WSW | 1,631 km |
Tehran Iran | 218.4° | SW | 1,944 km |
Istanbul Türkiye | 151.6° | SSE | 2,405 km |
Karachi Pakistan | 267.7° | W | 2,800 km |
Tunis Tunisia | 112.7° | ESE | 3,328 km |
Islamabad Pakistan | 255.9° | WSW | 3,528 km |
Lahore Pakistan | 260.4° | W | 3,598 km |
Algiers Algeria | 105.4° | ESE | 3,926 km |
Casablanca Morocco | 93.7° | E | 4,824 km |
Dhaka Bangladesh | 277.6° | W | 5,172 km |
Kuala Lumpur Malaysia | 292.5° | WNW | 6,974 km |
Jakarta Indonesia | 295.2° | WNW | 7,920 km |
Frequently asked questions
What is the Qibla?▼
The Qibla is the direction Muslims face during prayer. It points toward the Kaaba in Mecca, Saudi Arabia (21.4225° N, 39.8262° E). Mosques worldwide are oriented so that the prayer hall faces the Qibla.
How is the Qibla bearing calculated?▼
Solarc uses the great-circle initial bearing formula: θ = atan2(sin(Δλ) · cos(φ2), cos(φ1) · sin(φ2) − sin(φ1) · cos(φ2) · cos(Δλ)), where φ are latitudes and λ are longitudes in radians. The result is normalised to 0–360 degrees measured clockwise from true north.
Is this true north or magnetic north?▼
Solarc returns the bearing in true north (the geographic Qibla). Compasses and phone compass apps measure magnetic north by default, which differs from true north by the local magnetic declination. Most modern phones can be set to true north in their compass app settings.
Why does the Qibla from North America point northeast and not southeast?▼
Because the Earth is round. The shortest path from New York to Mecca is a great-circle route that goes northeast over the Atlantic, then southeast over Europe. Maps drawn on the Mercator projection make it look like the direction should be southeast, but the great-circle bearing is northeast.
How accurate is this Qibla finder?▼
The bearing is computed exactly from the spherical-earth model. The Earth is slightly flattened at the poles, so a strict ellipsoidal Qibla can differ from the spherical Qibla by up to about 0.05°. For prayer alignment this is negligible.
Does Solarc store my location?▼
No. Your coordinates are read in the browser, the bearing is calculated locally, and nothing is sent to a server. No signup is required.