How the qibla is calculated

The bearing

The qibla is the initial bearing of the great circle running from where you stand to the Kaaba in Makkah, at 21.4225° N, 39.8262° E. A great circle is the shortest path across the surface of a sphere, and it is the direction the overwhelming majority of classical and contemporary authorities intend by facing the Kaaba.

It is worth saying what we do not use: a rhumb line, the path of constant compass heading. It looks like a straight line on the flat maps most people picture, but from the UK it points several degrees away from the great-circle answer.

Because the Earth is curved, the bearing is not the same everywhere in Britain. It is close to 119° from London, near 118° from Birmingham and Manchester, and around 119.5° from Edinburgh. This tool computes it for your exact position rather than using a single national figure.

Why two qibla apps can disagree

Your phone has a magnetometer, and a magnetometer finds magneticnorth — the direction of the Earth’s magnetic field where you are standing. That is not the same as true north, the direction of the geographic pole that the bearing above is measured from. The gap between them is called magnetic declination.

Britain is at an unusual moment. The line of zero declination has been drifting westward across the country, so declination is currently small — roughly one degree east of true north in the south-east of England, and about a degree west in Northern Ireland. Small, but not nothing, and it is a systematic error rather than random noise.

We take the declination for your position from the World Magnetic Model (WMM2025, valid to 2030) and correct for it. The correction is shown on the main screen rather than hidden, so you can check our working.

There is a subtlety that trips up a lot of qibla tools. On iPhone, Safari reports a compass heading that iOS has already corrected to true north; adding declination there would apply the correction twice. On Android the heading arrives referenced to magnetic north and does need correcting. We detect which one we are given and treat each appropriately.

If the compass looks wrong

Magnetometers are easily disturbed. Metal desks, radiators, laptops, speakers, magnetic phone cases and car dashboards all pull the needle. If the reading drifts or will not settle, move away from metal and wave the phone slowly in a figure of eight to recalibrate it.

When your phone reports that its compass accuracy is poor, we say so instead of quietly drawing a confident arrow. If your device has no compass at all, the bearing in degrees is still exact — you can use it with any separate compass or map.

← Back to the compass