Type coordinates, get the bearing
Qibla Angle Calculator
Enter any latitude and longitude and get the Qibla bearing and distance to the Kaaba — worked out by hand, the same maths the compass tool uses, with no location permission needed.
Free · No app · No sign-up
Find your Qibla direction
How to use this tool
Calibrating your compass
Your location is used inside this browser only. It is never sent to our servers or stored.
177 cities worldwide, built in — no network lookup needed.
Your Qibla direction
Facing Qibla
Settings
A worked example: London
Take London at 51.5074° N, 0.1278° W and run it through the calculator:
- Input: latitude 51.5074, longitude −0.1278
- Bearing: 119.0° clockwise from true north
- Distance: 4,794 km to the Kaaba
- Compass point: ESE
The bearing says: from London, face 119° measured clockwise from true north — that’s 29° south of due east. The distance (4,794 km, about 2,979 miles) is the great-circle distance over the Earth’s surface. Try the same coordinates in any trusted reference and you’ll land within a fraction of a degree; the small differences between tools come from how precisely the Kaaba’s position is pinned down, not from the maths.
How to read the result
Bearing is the headline number: degrees clockwise from true north, 0 to 360. North is 0°, east 90°, south 180°, west 270°. A bearing of 119.0° sits just past east, toward south-east. If your compass reads magnetic north rather than true north, the two differ by your local magnetic declination — a few degrees in most places, and worth knowing about. The step-by-step guide covers this.
Distance is context, not a prayer requirement. It tells you how far away the Kaaba is along the shortest path, which is why the bearing shifts as you travel: New York faces 58.5° across 10,306 km, Karachi faces 267.7° across 2,800 km. Same Kaaba, different great circles.
Coordinate format
Enter decimal degrees: latitude from −90 to 90, longitude from −180 to 180. North and east are positive; south and west are negative. So:
- London: 51.5074, −0.1278
- Glasgow: 55.8642, −4.2518
- Karachi: 24.8607, 67.0011 (east is positive)
- Sydney: −33.8688, 151.2093 (south is negative)
If your source gives degrees, minutes and seconds, convert first: degrees + minutes/60 + seconds/3600, keeping the sign from the hemisphere. Out-of-range values are rejected rather than silently corrected — better an error than a wrong Qibla.
Where the numbers come from
Every result is a great-circle initial bearing to the Kaaba at 21.422487° N, 39.826206° E, on a spherical Earth with radius 6,371.0088 km, via the standard atan2 bearing formula and haversine distance. That’s the whole method — one deterministic formula, so identical coordinates always give identical results. The calculation guide explains the maths and its limits in plain language.
Keep going
- Qibla Finder — the compass tool, if you’d rather use GPS or a city.
- Qibla Map — plot any coordinates on a map.
- Qibla direction in the UK — precomputed bearings for 20 UK cities.
- How to find the Qibla — turning a bearing into a direction.