A reasonable person in Sydney looks at a world map, finds Mecca up and to the left, and concludes the qibla is somewhere north-west. A reasonable person in Johannesburg does the same and concludes north. One of them is close to right and the other is out by twenty degrees, and nothing about the map explains which is which.

The reason is that the qibla is the shortest path across a sphere, and a flat map is a sphere that has been cut and stretched. We computed the qibla for ten southern-hemisphere cities alongside the bearing a straight line on a Mercator map would give, to show exactly where the two diverge.

The measurements

The table gives the great-circle qibla bearing, then the bearing of a straight line drawn on a Mercator map — the rhumb line — then the gap between them. Degrees are from true north, and the rows are sorted by how badly the map misleads.

Qibla bearing by method, degrees from true north, computed with the adhan library against the Kaaba at 21.4225°N, 39.8262°E. The flat-map column is the rhumb line — the constant heading a straight line on a Mercator chart describes.
CityQiblaFlat mapError
Nairobi7.2°7.4°0.2°
Johannesburg14.6°13.5°1.1°
Jakarta295.2°292.8°2.4°
Cape Town23.4°20.2°3.1°
São Paulo68.9°61.9°7.0°
Perth295.4°306.2°10.8°
Buenos Aires76.3°59.1°17.2°
Sydney277.5°297.5°20.0°
Melbourne278.8°300.9°22.0°
Auckland261.2°294.5°33.3°
0.2°
Nairobi — the map is right
20.0°
Sydney — the map is west of west
33.3°
Auckland — the worst in the set

Sydney, drawn

The Sydney case is the one most worth seeing, because the error is large enough to matter and the intuition behind it is so strong. The computed qibla is 277.5° — half a degree north of due west. The flat map suggests 297.5°, which is properly north-west.

Twenty degrees is not a rounding difference. Standing in a room and turning twenty degrees is a visible, deliberate movement, and it is the difference between facing the Kaaba and facing a point some thousands of kilometres away from it.

NWESSydney277.5° computed qiblashortest path across the globe297.5° flat mapstraight line on a flat map20.0° apart
Sydney: the computed qibla against the bearing a flat map implies. The shaded wedge is the twenty degrees between them.

Why Africa is easy and Australasia is not

The pattern is not random. The distortion between a great circle and a straight line on a Mercator map grows with the east-west span of the journey and with distance from the equator, and it vanishes when the path runs nearly along a meridian.

Johannesburg and Nairobi sit almost directly south of Mecca. The path is nearly a line of longitude, so there is nothing for the projection to distort — the flat-map answer and the true answer agree to within about a degree. That is why the qibla in southern Africa really is close to due north, and why the intuitive answer happens to work there.

Sydney, Melbourne and Auckland are a long way east of Mecca and a long way south, so the shortest path arcs sharply — and on a Mercator map that arc is flattened into a line pointing somewhere else. Buenos Aires shows the same effect in the opposite direction, with the path running north-east across the Atlantic rather than the map's more easterly suggestion.

Perth is the instructive middle case. It is in Australia, so the instinct says north-west, and at 295.4° the flat map's 306.2° is only 10.8° out — half Sydney's error, because Perth is nearly 1,600 kilometres closer to Mecca in longitude. The error scales with how far around the globe you are, not with which country you are in.

The underlying formula, the Kaaba coordinates it uses and a worked example are on how the qibla is calculated, along with a comparison against a WGS-84 geodesic for nine northern cities.

The objection people raise: does it go through the earth?

A frequent and fair question about great-circle qibla is that the shortest path from Sydney to Mecca seems to pass through the planet rather than across it. It does not, and the confusion is worth clearing up because it leads people to distrust a correct bearing.

The bearing is computed on the surface. It is the initial heading of the shortest route you could walk or sail, staying on the ground the whole way — the same route an aircraft flies. That route curves relative to a flat map, which is why the heading changes as you travel along it, but at no point does it leave the surface.

There is a separate and genuinely old discussion about whether one faces the direction of the Kaaba or its structure, and some classical positions would point through the earth for the antipodal case. That matters for a thought experiment; for every actual inhabited place it makes no practical difference, and no mosque or app uses it.

What to do with this

If you are in southern Africa, your instinct and the arithmetic agree, and you can be confident with a compass and north. If you are in Australia or New Zealand, discard the instinct entirely: Sydney is west, Perth is west-north-west, Auckland is west and somewhat south of west.

The general rule is that a flat map is a reliable guide for the qibla only when your city sits nearly due north or due south of Mecca, and becomes progressively less reliable the further east or west you are. Everywhere else, compute it — our qibla tool runs the calculation in the browser from coordinates that are never sent anywhere.

And whatever bearing you use, your phone's compass has its own problems that are unrelated to the arithmetic. Those are covered in why your qibla compass keeps spinning, and the question of how precise any of this needs to be is in how exactly must you face the qibla.

Common questions

Which direction is the qibla in Sydney?
About 277.5° from true north — essentially due west, very slightly north of west. The north-westerly direction a flat world map suggests is around 297.5°, roughly twenty degrees off.
Is the qibla north in South Africa?
Nearly. Johannesburg computes to 14.6° and Cape Town to 23.4° from true north. Because these cities lie almost directly south of Mecca, the flat-map answer is within a few degrees of the true one — unusually, the intuitive guess works.
Why doesn't the qibla match the direction of Mecca on the map?
Because a flat map distorts a sphere. The qibla is the initial heading of the shortest surface path, which curves on a Mercator projection. The error grows with east-west distance: 0.2° in Nairobi, 20° in Sydney, 33° in Auckland.
Does the great-circle qibla point through the earth?
No. It is the compass heading of a route that stays on the surface the whole way — the route an aircraft flies. The heading changes as you move along that route, which is what makes it look wrong on a flat map.

← All posts