Great-circle bearing
Which direction is the qibla?
Short answer
The qibla is the great-circle bearing from where you are standing to the Kaaba in Mecca, at 21.4225 degrees north, 39.8262 degrees east. It depends entirely on your location, so there is no single answer.
The qibla is a direction on a sphere, and the shortest path between two points on a sphere is a great circle. On the flat maps most people picture, a great circle looks like a curve, which is why the qibla is frequently not the direction people expect.
From much of North America, for example, the bearing is north of east rather than the southeast a flat map suggests, because the short way to Mecca runs up over the pole. This is a mathematical fact about spheres, not a matter of interpretation.
Method
Step by step
In this order. Each step assumes the one before it is done.
-
01
Establish your own position
The calculation needs your latitude and longitude. The compass on this site can read them from your device if you allow location access, and they never leave the page.
-
02
Compute the great-circle bearing
The initial bearing from your position to the Kaaba is the standard forward azimuth formula on a sphere. Any qibla tool worth using implements exactly this; the differences between them come down to whether they model the earth as a sphere or an ellipsoid, which changes the answer by a fraction of a degree.
-
03
Decide true or magnetic before you set it
The computed bearing is a true bearing. Any compass, including the one here, reads magnetic until you give it a declination, and in some places the difference exceeds fifteen degrees. Look your declination up, enter it, and only then read off the qibla.
-
04
Mark it where you will use it
Once you have the bearing, stand facing it and mark something fixed in the room that lines up: an edge of the floor, a line of tiles, the corner of a rug. That way you are not repeating a sensor reading every time, and you are not depending on a compass indoors, where the reading is least reliable.
Reference
The bearings
- The Kaaba, latitude
- —
- 21.4225 degrees north.
- The Kaaba, longitude
- —
- 39.8262 degrees east.
- From your position
- —
- Depends on where you are. Use the compass with location allowed.
How wrong can this be?
Accuracy
The formula is exact to well under a degree. The limiting factor is the compass reading, so indoors, near steel or with an uncalibrated device the error is the instrument, not the maths.
Related
Other guides
The basic one
Which way is north?
If you are on a phone, press Start compass and turn until the bearing reads 000. If you are not, and the sun is up, stand with the sun on your right in the morning and you are facing roughly north.
No instrument
Without a compass
Put a stick upright in the ground, mark the tip of its shadow, wait fifteen minutes and mark it again. The line from the first mark to the second points roughly east.
Fixed installation
Aim a solar panel
In the northern hemisphere, face a fixed array due true south, 180 degrees. In the southern hemisphere, due true north, 000. Tilt it at roughly your latitude.