Maa'rij is new — we publish content as our scholars review it.How we review
ArticlesPrayer
Prayer · Qibla

What is the Qibla, and how is it calculated?

The Qibla is the direction Muslims face in prayer: toward the Kaaba in Makkah. Wherever you are in the world, you turn toward this single point — and the direction is not always what you might expect on a flat map.

al-qibla — the direction of prayer

In this guide

  1. What the Qibla is
  2. How the direction is found
  3. A note on accuracy

Five times each day, Muslims around the world face the same direction in prayer: toward the Kaaba in Makkah. This direction is called the Qibla, and it has been the orientation of Muslim prayer since the early years of Islam. Finding it accurately used to require knowledge of the stars, the sun’s position, or a reliable local reference. Today, your phone can find it in seconds.

What the Qibla is

The Qibla is the direction of the Kaaba — the cube-shaped structure at the centre of Masjid al-Haram in Makkah. It is not the direction of the city of Makkah in general, nor a general compass bearing — it is the shortest path along the surface of the Earth from where you are to the Kaaba itself.

فَوَلِّ وَجْهَكَ شَطْرَ ٱلْمَسْجِدِ ٱلْحَرَامِ ۚ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا۟ وُجُوهَكُمْ شَطْرَهُ“Turn your face toward the Sacred Mosque, and wherever you are, turn your faces toward it.”Sûrah al-Baqarah · 2:144

How the direction is found

The Qibla is found by calculating the great-circle direction from your location to the Kaaba. A great circle is the shortest path between two points on the surface of a sphere — the same principle that airlines use to find the shortest flight route.

Because the Earth is curved, this direction is not always the one you might guess from looking at a flat map. From many cities in North America, for example, the shortest path to Makkah goes northeast — not southeast as a flat map would suggest. This is correct even when it seems counterintuitive; the great circle is shorter than the flat-map route.

The shortest path on a curved surface often surprises you on a flat map. The great circle is always correct.

An app calculates the Qibla using your location (latitude and longitude) and the known coordinates of the Kaaba, then converts the result to a bearing relative to north. That is why a Qibla finder needs your device’s location and its orientation sensor (compass) to work accurately — it needs to know both where you are and which way you are facing.

A note on accuracy

Phone compasses can be affected by nearby metal objects, magnetic interference, or a device that has not been calibrated. For general use, a Qibla app is accurate enough for prayer. For additional confidence — particularly in a new place — it is good practice to confirm your direction against a known local reference, such as the orientation of the prayer hall in a nearby masjid.

In the app · free

Find your Qibla

Maa’rij includes a live Qibla finder that uses your location and orientation to show the direction of prayer. Download the app to use it.

Download the app

Related guides

Prayer
Which prayer time calculation method should you use?
Prayer
How to make up missed prayers