What is the Qibla?
The Qibla is the direction Muslims face in prayer: toward the Kaaba in the Sacred Mosque in Makkah. Allah commands in the Quran: 'So turn your face toward the Sacred Mosque, and wherever you are, turn your faces toward it' (Surah al-Baqarah 2:144).
How the direction is found
This tool draws the shortest path on the globe - the great-circle bearing - from your location to the Kaaba, and shows it as a heading in degrees from true north. On a phone the live compass turns the needle as you move; on a desktop it shows the bearing to face. A magnetic compass points to magnetic north, a few degrees off true north in most places.
Facing toward it is enough
Scholars agree that for someone who cannot see the Kaaba, facing its general direction (jihat al-Kaaba) is what is required, not pinpoint precision; a small deviation does not invalidate the prayer. If unsure, face the direction your local mosque uses.
How Muslims found the qibla through history
Long before satellites, Muslims solved this problem with knowledge and care. The first generations judged the direction by the sun, the moon, and the stars - travellers in the desert read the night sky the way we read a map. As Islamic civilization grew, finding the qibla from any city became a driving question for Muslim mathematicians and astronomers: scholars such as Habash al-Hasib, Ibn Yunus, and al-Biruni developed spherical-trigonometric methods partly to answer it, centuries before modern navigation. Their results were built into architecture - the mihrab niche in every mosque is a fixed, communal answer to the qibla question. One beautiful method needs no mathematics at all: twice a year the sun passes directly above the Kaaba, and at that moment anyone who can see the sun is looking at the qibla by facing it - a reminder that the simplest observation and the deepest science both serve the same purpose.
Tips for travellers
Search your destination city in this tool before you fly and note the bearing - you will know the direction the moment you arrive, even before your phone finds its bearings. In hotel rooms, look for the qibla arrow on the ceiling or desk drawer and sanity-check it against the tool; stickers are occasionally wrong or rotated. Indoors, metal structures can confuse a phone compass - calibrate with a figure-8 motion, or step near a window, or fall back to the degrees-from-north reading and a known landmark. And keep the fiqh principle above in mind wherever you are: the general direction is what is required, so travel with confidence rather than anxiety - the deen makes this easy.
Reading the compass and the numbers
Two numbers matter on this page. The bearing is the direction of the Kaaba measured in degrees clockwise from true north - 0 is north, 90 east, 180 south, 270 west - so a bearing of 118 means 'face somewhat south of east'. The distance is the length of that same great-circle path, the shortest line over the curve of the earth, which is why from North America the qibla often points surprisingly north-east: the shortest path to Makkah really does arc over the Atlantic. On phones with a compass the needle turns live as you do, and settles with a gentle spring so tiny hand movements do not make it jitter; hold the phone flat for the steadiest reading. If your device has no working compass, the tool still gives you everything you need - the bearing plus any known landmark or the midday sun is enough to orient yourself.