Qibla Direction Finder

Find the compass bearing to the Kaaba from your city or current location.

…or choose a city:

How to use this tool

An approximate location (from your network) is used automatically. For a precise reading, tap "Use my exact location" or pick your city from the list. The needle points toward the Kaaba, and the exact bearing in degrees from true north is shown below it.

About this tool

Uses the great-circle (shortest-path-on-a-sphere) bearing formula between your coordinates and the Kaaba's coordinates, verified against several well-known published reference bearings (e.g. New York ≈58°, London ≈119°, Jakarta ≈295°) before publishing.

100% client-side. Your location, if used, is never sent anywhere — the calculation runs entirely in your browser.

Frequently asked questions

How is the Qibla direction calculated?

Using the great-circle initial bearing formula between your coordinates and the Kaaba's coordinates (21.4225 N, 39.8262 E) — the shortest path on the curved surface of the Earth, which is how the Qibla is correctly determined for locations far from Makkah (a straight line on a flat map is not accurate over long distances).

Does this use my phone's compass?

If your browser and device support it and you grant permission, the needle rotates live using your device's orientation sensor. Otherwise, the tool shows the bearing as a number of degrees from true north, which you can follow with any compass or compass app.

How accurate is the automatic location detection?

On page load, an approximate location based on your network/IP address is used automatically so you get an instant reading — this is typically only accurate to the city level. For a precise reading, tap "Use my exact location" (uses your device's GPS/location services with your permission) or pick your city from the list.