This points you toward the Kaaba in Mecca using the great-circle bearing, the shortest path over the globe, not a straight line on a flat map. For the most accurate reading, use a phone with a compass sensor and keep it flat and away from magnets or metal.
N
--Tap below to get your Qibla direction
Or pick a city manually
If GPS isn't available, or you just want a quick answer for a specific city, choose one below.
How this is calculated
We calculate the initial great-circle bearing from your coordinates to the Kaaba (21.4225° N, 39.8262° E) using the standard spherical bearing formula:
where φ1, λ1 are your latitude and longitude and φ2, λ2 are the Kaaba's. This is the same formula used by GPS navigation and marine bearing calculations generally, applied here to a fixed destination. If your device supports it, the needle above uses the Device Orientation API to rotate live as you turn, so the gold needle always points toward Mecca relative to true north. Device compasses can be affected by magnetic interference indoors, so if the reading seems off, try again outdoors or away from metal objects and electronics.
This tool gives a mathematically calculated bearing. Some mosques orient their qibla wall based on historical or local convention that may differ by a small margin from a pure great-circle calculation. If in doubt, defer to your local masjid's established qibla orientation.