How to Find the Qibla Direction With Your iPhone
The Qibla is the direction of the Kaaba in Mecca. A phone that knows where you are can work it out to a fraction of a degree; the part that needs care is the compass you hold.
Updated 26 October 2026
The direction, worked out from where you are
The Kaaba stands at about 21.4225° N, 39.8262° E. The Qibla from any place is the direction you would set off in to reach it by the shortest path over the Earth's surface, the great circle. That is the direction modern Qibla tables and calculators give, and it can be worked out exactly from two positions.
| City | Qibla (true) | Distance |
|---|---|---|
| New York | 58° | 10,300 km |
| Chicago | 49° | 11,100 km |
| Los Angeles | 24° | 13,400 km |
| Toronto | 55° | 10,500 km |
| London | 119° | 4,800 km |
| Paris | 119° | 4,500 km |
| Berlin | 137° | 4,100 km |
| Istanbul | 152° | 2,400 km |
| Cairo | 136° | 1,300 km |
| Karachi | 268° | 2,800 km |
| Kuala Lumpur | 293° | 7,000 km |
| Jakarta | 295° | 7,900 km |
| Sydney | 278° | 13,200 km |
Across a city the direction changes by about a degree or less, so a figure for your town is close enough for your street. Directions are degrees clockwise from true north: 90° is east, 180° south.
Why it points northeast from North America
On a flat world map, Mecca lies to the east-southeast of New York, and a ruler drawn between them points at about 101°. But a flat map stretches the north, and the shortest route on the globe arcs up over the North Atlantic and down through Europe. It sets off at about 58°, northeast. The same effect is why flights from North America to the Middle East cross the North Atlantic and Europe.
A minority of scholars have argued for the map line (the rhumb line), which points southeast from most of North America. The great circle is the method behind modern Qibla tables and calculators; if you are unsure what your community follows, ask your mosque.
Getting the compass right
The calculation is exact. The compass in your hand is where errors come from.
- True or magnetic north. The Qibla is calculated from true north. A magnetic compass can differ from it by 10 to 20 degrees in parts of North America and elsewhere (the declination). An iPhone corrects for this when it knows your location; check that the compass is set to true north, or that the Qibla mark is drawn for the north the compass shows.
- Keep it clear of metal and magnets. Steel desks, car interiors, speakers, laptop lids and magnetic cases or mounts all pull the needle. Stand away from them, ideally outdoors.
- Calibrate. If the heading wanders, move the phone in a slow figure of eight, or follow the calibration prompt.
- Hold it flat and still, and give it a few seconds to settle.
Our guide to an iPhone compass that is not accurate covers each of these in more detail.
Check it with the sun
Twice a year the sun passes directly over the Kaaba at its noon: on 27 or 28 May at 12:18 and on 15 or 16 July at 12:27, Mecca time (09:18 and 09:27 UTC). At that minute, anywhere the sun is above the horizon, facing the sun is facing the Qibla, and the shadow of anything vertical points directly away from it. Mark the line on the ground or a window sill, and you have a reference that needs no compass at all.
Sources
- Wikipedia, Qibla: the great-circle definition and the North American debate.
- Wikipedia, Qibla observation by shadows: the dates and times the sun is over the Kaaba.
- NOAA, World Magnetic Model and declination calculator.
- Apple, CLHeading.trueHeading.
- Bearings and distances in the table are great-circle calculations from city centres to the Kaaba.
Common questions
Why does the Qibla point northeast from the United States?
Because the Earth is round. The shortest path from North America to Mecca crosses the North Atlantic, so it sets off to the northeast: about 58 degrees from New York and 24 degrees from Los Angeles. A straight line on a flat map points southeast instead.
Is my phone's Qibla direction accurate?
The calculation is exact to well under a degree. The compass is the weak point: keep the phone away from cars, speakers, magnets and metal, calibrate it, and make sure it is using true north, or the error can be many degrees.
How can I check the Qibla without a compass?
Twice a year the sun stands directly over the Kaaba: on 27 or 28 May at 09:18 UTC and on 15 or 16 July at 09:27 UTC. At that moment, anywhere the sun is up, you face the Qibla by facing the sun, and a vertical pole's shadow points directly away from it.