Find your exact Qibla direction — the compass bearing toward the Kaaba in Makkah — from any coordinates worldwide, with a live rotating compass, the precise distance to Makkah, and instant offline great-circle geometry that needs no internet connection.
🕌 Prayer Times & DirectionEverything runs locally in your browser — no sign-up required, and no data is ever sent anywhere.
The Qibla is the fixed compass bearing every Muslim faces during prayer, pointing toward the Kaaba inside the Grand Mosque of Makkah, at coordinates 21.4225°N, 39.8262°E. Because the Earth is a sphere rather than a flat map, the shortest path between two points is a great-circle arc rather than a straight line drawn on a Mercator-style map projection, the same principle airline pilots use to plot the shortest routes between distant cities. This tool applies the great-circle initial-bearing formula from spherical trigonometry to your coordinates, producing a single heading in degrees measured clockwise from true North. It also calculates the great-circle distance to Makkah using the haversine formula, the standard method for measuring distance between two points on a sphere from their latitude and longitude. Because both calculations rely purely on geometry and the coordinates you enter, everything runs instantly inside your browser with no external service, no signal, and no data ever leaving your device. The direction shown is mathematically exact for the coordinates you provide.
A surprising number of people assume the Qibla can be found by simply drawing a straight line on a world map from their city to Makkah and reading off the angle. This works only over short distances, because every flat world map distorts either area, distance, or direction to project a curved surface onto a plane. Over the hundreds or thousands of kilometers separating most Muslims from Makkah, that distortion is large enough to point you noticeably off course. The correct approach, used throughout navigation, aviation, and geodesy, is to treat the Earth as the sphere it actually is and calculate the great-circle path, the true shortest route between two points on a globe.
This finder does exactly that. It takes your latitude and longitude, either typed in manually or detected automatically through your device's location service, and applies the great-circle initial-bearing formula to the Kaaba's fixed coordinates. The result appears as a single number in degrees measured clockwise from true North, shown on a live rotating compass so you can see at a glance which way to turn, alongside the exact great-circle distance to Makkah in both kilometers and miles.
One clear advantage of this method over a live prayer-time lookup is that it never depends on an internet connection once the page has loaded. The bearing and distance are pure geometry, computed instantly on your own device from the numbers you provide, so the result stays available on a flight, in a remote area with no signal, or anywhere else a live data service would fail.
A short practical note on using the result: the bearing shown is a true, geographic heading, while most phone compass apps default to magnetic North, which drifts from true North by a varying amount depending on where you are on Earth. Many compass apps offer a true-north setting, and physical compasses can also be thrown off by nearby metal, electronics, or magnets. For the most reliable result, use a compass app with true-north mode enabled, hold it flat and away from metal objects, and rotate until it matches the heading shown above.
It uses the great-circle initial-bearing formula from spherical trigonometry, applied to your latitude and longitude and the Kaaba's fixed coordinates in Makkah, giving the shortest-path compass heading that accounts for the Earth's curvature.
Every flat world map distorts area, distance, or direction when projecting a curved surface onto a plane. Over long distances, a straight line drawn on such a map points noticeably away from the true, curvature-corrected great-circle direction.
This tool calculates the great-circle distance using the haversine formula, the standard method for measuring distance between two points on a sphere from their coordinates, and displays the result in both kilometers and miles.
No. Once the page has loaded, the bearing and distance are calculated entirely offline from pure geometry using the coordinates you provide, with no external service involved.
Open a compass app or use a physical compass, ideally with true-north mode enabled, hold it flat and away from metal or electronics, and rotate until it matches the bearing shown above to face the direction of the Kaaba.