Qibla Direction

  • Runs in your browser
  • Nothing uploaded
  • No sign-up
Set a location to see the direction
Location

South is negative.

West is negative.

Qibla
Set a location to see the direction.

Mishkāh iconNeed more than this?

Mishkāh

Turns your iPhone into a Qibla compass with a smooth, calibrated needle, gives prayer times for your exact location — working offline — and puts a daily verse on your Lock Screen.

Not today? Get an email when Mishkāh gets better
Mishkāh on iPhone
Mishkāh on iPhone

Updated · DRISH LABS

Which way is the Qibla from my location?

The Qibla direction is the bearing of the shortest path over the globe from your location to the Kaaba in Mecca, at 21.4225° N, 39.8262° E, measured in degrees clockwise from true north. From London it is about 119°, from New York about 58°, from Jakarta about 295° and from Cairo about 136°. A phone compass points to magnetic north, so it can disagree by a few degrees.

How it works

  1. Set your location: press Use my location and let the browser share it, choose one of the cities, or type a latitude and longitude in decimal degrees, with south and west as negative numbers.
  2. The page works out the direction of the shortest path over the globe from that point to the Kaaba in Mecca, at 21.4225° N, 39.8262° E.
  3. The answer is in degrees clockwise from true north, with the nearest of the sixteen compass points and a compass card with the needle at that bearing.
  4. Under it are the distance to the Kaaba in kilometres and miles and the coordinates the answer was worked out from.

The bearing

The initial bearing of the great circle from your point (latitude φ1, longitude λ1) to the Kaaba (φ2, λ2), where Δλ = λ2 − λ1, turned from radians into degrees and brought into 0–360°. The distance is the haversine formula on a sphere of radius 6,371.0088 km.

θ = atan2( sin Δλ · cos φ2, cos φ1 · sin φ2 − sin φ1 · cos φ2 · cos Δλ )

When you need it

Travelling, in a hotel room
Find the direction in a new city before the first prayer: choose the city, or use your location, and line the bearing up with a compass or with a landmark whose direction you know.
Setting up a prayer space at home or at work
Work out the bearing once for the building’s coordinates and mark it on the floor or the wall, so nobody needs to check again.
The Qibla for an exact address
Long-press the place in Apple Maps or Google Maps to see its coordinates, then type them here. A new home, a mosque being planned or a relative’s town abroad all work the same way.

Questions

Which way is the Qibla from my location?

Set your location above and the answer is the number of degrees clockwise from true north. From London it is about 119° (east-southeast), from New York about 58° (north-east), from Jakarta about 295° (west-northwest) and from Cairo about 136° (south-east).

Is my location sent anywhere?

No. The direction is worked out in this page, and the coordinates from Use my location are never sent to this site or stored — closing the tab forgets them. Your browser asks your permission first, and may use its own location service to find you; that is the browser’s, not this page’s.

Why does my compass disagree by a few degrees?

A phone or hand compass points to magnetic north, not true north, and the gap — the magnetic declination — is a few degrees in most places and over ten in some. Where the declination is east, subtract it from the bearing here to get the compass reading; where it is west, add it. On an iPhone, turning on Use True North in the Compass settings removes the difference. Metal and magnets nearby also pull a compass off.

Why does the Qibla from North America point north-east, not south-east?

Because the shortest path over a globe from New York or Toronto to Mecca heads north-east, across the Atlantic towards Europe. This page gives that great-circle direction, which is the one most scholars and every Qibla app use. Some older mosques in North America face south-east, along a line of constant compass bearing drawn on a flat map instead.

How accurate is it?

The arithmetic treats the Earth as a sphere, which differs from the more exact ellipsoid by a small fraction of a degree — far less than the error of holding a phone compass by hand. At the Kaaba itself there is no direction to give, and the page says so instead of printing a number.

Can it show a live compass on my phone?

Not reliably — browsers expose a phone’s compass inconsistently and only after a permission prompt, so this page gives the number to line up with a compass instead. Mishkāh, the studio’s iPhone app, has a Qibla compass with a smooth, calibrated needle, beside prayer times for your exact location.

Keep going

All 31 tools