Skip to content
ToolShelf

Qibla distance calculator

Measure the great-circle distance from anywhere on Earth to the Kaaba in Makkah, in kilometres and miles.

Where you are

Positive north, negative south

Positive east, negative west

Distance to the Kaaba

Enter your coordinates, or tap Use my location, to measure the distance.

What is being measured

The great-circle distance from where you are to the Kaaba: the shortest route over the surface of a sphere, which is the path you would follow if you could walk in a straight line across the Earth. It is calculated with the haversine formula, treating the Earth as a sphere of mean radius 6,371 km.

Why it differs from what a map shows

A world map has to stretch the globe to lie flat, and the common projection stretches it most severely near the poles. The line you would draw with a ruler across such a map is not the shortest route, which is why great-circle paths look like curves on a flight map. Over five thousand kilometres the difference between the two is substantial.

A note on precision

The Earth is not quite a sphere, it bulges slightly at the equator. Calculating on an ellipsoid instead would change the answer by up to about a third of a per cent, roughly ten kilometres on a journey from Britain. That is smaller than the error introduced by rounding your own position to the nearest town, so the simpler calculation is the honest one to use here.

Questions

Is this the flying distance or the driving distance?
Neither exactly. It is the great-circle distance, the shortest path across the surface of the Earth, ignoring roads, borders and terrain. A flight follows roughly this path but detours around airspace and weather, so it usually covers a few per cent more. Driving is longer still.
Why does it not match the straight line on my map?
Because a flat map cannot represent a sphere without stretching something. The usual world map badly exaggerates east-west distances at high latitudes, so the line you would draw across it is not the short way. The great-circle path is.
What point in Makkah is it measured to?
The Kaaba itself, at 21.4225°N 39.8262°E. Published coordinates vary in the fourth decimal place, which is a few metres on the ground and makes no difference at these distances.
How accurate is it?
It treats the Earth as a sphere of mean radius 6,371 km. The Earth is very slightly flattened at the poles, so a more elaborate calculation on an ellipsoid would differ by up to about 0.3%, around ten kilometres on a five-thousand-kilometre journey. That is well inside the error of the coordinates most people enter.
What is the furthest anywhere on Earth can be from Makkah?
About 20,015 km, half the circumference. The point that far away sits in the South Pacific, and nowhere on land quite reaches it, the most distant inhabited places are in French Polynesia, a little over 19,000 km away.

More tools