← Salahday home

How to find the Qibla direction with your phone

The Qibla is the direction of the Kaaba in Makkah. A phone compass can find it, but the sensor is easily thrown off by nearby metal and magnets, and the north a compass shows (magnetic north) isn't the north on a map (true north). Knowing a few things about how the direction is calculated and how phone sensors behave makes the result much more reliable.

How the Qibla direction is calculated

The Qibla follows the great circle — the shortest path between two points on the globe — not a straight line drawn on a flat map. The two can point quite differently. From New York, for example, Makkah looks south-east on a typical world map, but the great-circle Qibla points north-east at about 58°. A bearing is the angle measured clockwise from true north, so 90° is east and 180° is south.

CityQibla bearing (approx.)Distance to Makkah (approx.)
Riyadh~244°~790 km
Dubai~258°~1,630 km
Istanbul~152°~2,400 km
London~119°~4,800 km
Jakarta~295°~7,900 km
New York~58°~10,300 km

Magnetic north vs true north: declination

A compass points to the magnetic north pole, not the geographic north pole. The angle between the two is called magnetic declination. Depending on where you are it can be close to 0° or more than 10°, and it slowly changes over the years. If an app doesn't correct for it, your Qibla is off by exactly that amount. A good Qibla app uses your location to convert the compass reading to true north before showing the direction.

Getting an accurate reading

Phone compasses are magnetometers, and anything magnetic nearby bends the reading. These steps help:

  • Hold the phone flat and away from laptops, speakers, steel desks, magnetic phone cases and car interiors
  • If the needle jumps or the app reports low accuracy, calibrate by moving the phone in a figure-8 a few times
  • Indoors, steel in walls and floors can distort the reading — step a metre or two away and check again
  • Turn your body slowly until the compass lines up with the Qibla
  • If you're unsure, compare with a known reference such as your local masjid's direction

Why two apps can disagree

If two Qibla apps point a few degrees apart, the usual reasons are that one corrects for declination and the other doesn't, one needs calibrating, or the phones are sitting next to different sources of interference. The calculated bearing itself should be nearly identical in any app that uses the great circle; it's the live compass reading that varies.

Salahday's Qibla compass

Salahday uses your phone's rotation-vector sensor and corrects for magnetic declination, so the bearing it shows is relative to true north. It also shows your distance to Makkah. When you're within ±3° of the Qibla, the compass turns teal and vibrates once, so you know you're aligned without staring at the screen.

It uses your approximate location while you're using the app, or a city you pick, and works offline.

Find the Qibla, corrected to true north

Get Salahday on Google Play