This qibla direction calculator finds the great-circle bearing from any location on Earth to the Kaaba in Mecca (21.4225°N, 39.8262°E) using spherical trigonometry. It shows the bearing in degrees from True North, compass direction (N/NE/E/SE/S/SW/W/NW), and distance to the Kaaba in kilometres and miles, with instructions for finding your latitude and longitude from Google Maps.
Qibla Direction Calculator
Find the direction of the Qibla (Kaaba in Mecca) from any location on Earth.
Turning a Qibla Direction Calculator Bearing into the Way You Face
The bearing you get is measured clockwise from true north. Most of the work in facing the qibla correctly happens after that, when you translate the number into a direction in your room.
True north versus magnetic north
A compass needle points to magnetic north, not true north. The angle between them, called magnetic declination, depends on where you are and slowly changes over time; in some places it is tiny, in others large enough to matter. Look up the current declination for your location, then adjust: where declination is east, subtract it from the true bearing to get the compass reading, and where it is west, add it. Many phone compass apps can switch to true north when location services are on, which removes this step.
Getting a steady compass reading
- Hold the phone or compass flat and level, a little away from your body.
- Keep clear of steel furniture, radiators, speakers, laptops and car bodies, which can pull the needle several degrees.
- Calibrate a phone compass when it asks, usually by moving it in a figure-of-eight.
- Take the reading in two or three spots in the room and compare them; if they disagree, one spot is probably affected by metal or wiring.
Mark it once, then use landmarks
Once you have a reliable direction, mark it with something lasting, such as a small sticker on the wall or a line from a door frame. A satellite map view helps too: draw the bearing from your building and note which street, window or wall it lines up with. When travelling, a hotel room may already have a qibla marker, but it is still worth a quick check against your own bearing.
Why it may differ from what you expected
The shortest route across a globe is a great-circle path, which often looks curved on a flat map. That is why the qibla from much of North America points northeast rather than southeast, even though Mecca sits further south on a flat map. Small differences between tools usually come from rounded coordinates or from one of them using magnetic north.
Local mosques have normally established the qibla with care, so a nearby mihrab is a helpful check. For the history and methods, see the qibla article on Wikipedia, then enter your new coordinates in the qibla direction calculator whenever you pray somewhere unfamiliar.