How the Qibla Finder works
Qibla Finder Online determines the direction of the Kaaba in Makkah from your exact position. Here is what happens under the hood, all of it on your own device.
1. Your location
With your permission, your browser’s geolocation gives us your latitude and longitude. You can also type any city or address; we look up its coordinates. Your location is used only in your browser and is never stored or transmitted to us.
2. The great-circle bearing
The Qibla is the initial bearing of the shortest path over the surface of the Earth, the great-circle route, from where you stand to the Kaaba (21.4225° N, 39.8262° E). Because the Earth is a sphere, this is often not the direction a flat map would suggest. We compute it with a high-precision spherical formula, giving a bearing measured clockwise from true (geographic) north.
3. True north vs. your compass
A phone or physical compass points to magnetic north, which drifts from true north by an amount called magnetic declination. This varies from place to place and changes over time. Many Qibla tools ignore it, but we correct for it. Using the current World Magnetic Model, we compute the declination at your location and show the exact bearing your compass should read, alongside the true-north bearing used on maps.
4. Compass mode
On phones and tablets with a magnetometer, we read your device’s heading and rotate the compass so the Kaaba marker always points toward the real Qibla. Turn until the marker meets the pointer at the top, and you are now facing the Qibla. For best accuracy, calibrate by moving your device in a figure-8 and keep it away from metal and electronics.
5. Map mode
If your device has no compass, the interactive map draws a line from your location straight to the Kaaba along the great-circle path, so you can orient yourself using landmarks. This works on any device, including laptops.
Accuracy
The calculated bearing is accurate to a fraction of a degree. Real-world compass accuracy depends on your device’s sensor and calibration. For the most reliable result: calibrate the compass, hold your device flat, and cross-check the compass against the map.