How to Find the Qibla Direction

Prayer 4 min read

The Qibla is the direction of the Kaaba in Makkah. Muslims face it during prayer. You can find it with a compass, a map or a phone, and you can also ask people nearby.

1

What the Qibla is

Allah commanded the Prophet ﷺ and the believers to turn their faces toward the Sacred Mosque in prayer, wherever they are (Quran 2:144). The Prophet ﷺ first prayed toward Jerusalem (Sahih al-Bukhari 4486), and when the direction was changed to the Kaaba, the believers at Quba turned around in the middle of the Fajr prayer as soon as the news reached them (Sahih al-Bukhari 403). The Kaaba is the focus of this direction. Muslims all over the world form circles around it.

Facing the Qibla is a condition of the prayer for a person who is able to do so. In fear, Allah allows prayer on foot or riding, in any direction (Quran 2:239). The direction is also used for other acts, such as the burial of the dead.

For a person who can see the Kaaba, the duty is to face the Kaaba itself. For a person far from Makkah, most scholars say that facing its direction is enough, while the Shafi'i school stresses aiming at the Kaaba itself as well as one can. It is good to learn the Qibla of your home, your workplace and the places where you often pray.

2

How the direction is worked out

The Earth is round, so the shortest path between two places is a curve called a great circle. The Qibla direction is the start of the great-circle path from your place to the Kaaba.

A calculation uses the latitude and longitude of your place and of the Kaaba. The result is an angle measured from true north. A compass needle points to magnetic north, which is not exactly the same as true north. The difference is called magnetic declination, and it changes from place to place.

3

Using a phone compass well

A phone can give a good direction if you use it carefully.

  • Hold the phone flat and away from your body.
  • Stay away from metal objects, speakers, magnets, car bodies and large electrical devices.
  • Remove a magnetic phone case or stand.
  • Calibrate the compass. Many phones ask you to move the phone in a figure-eight pattern.
  • Check the result in two or three spots, and compare it with the mosque or a map nearby.
  • Turn on location, so the phone knows where you are.

4

If you cannot find the Qibla

Sometimes you have no compass, no signal and no one to ask. In this case, scholars say you should make an honest effort and pray in the direction that you believe is nearest to the Qibla. This effort is called ijtihad. Look for signs such as the direction of a local mosque, the sun, or a map you remember.

If you made a real effort, most scholars say your prayer is valid, even if you later learn that the direction was slightly off. Some scholars, such as those of the Shafi'i school, say to repeat the prayer if you later become certain of a clear mistake. Allah does not burden a soul beyond its ability (Quran 2:286).

5

In a plane or while travelling

In a plane, train or bus, face the Qibla as well as you can at the start of the prayer, and keep facing it as far as you are able. If the vehicle turns and you cannot turn with it, scholars say you may continue as you are able. Scholars differ about obligatory prayers on a moving vehicle. The Hanafi school allows them only with a real excuse, and many scholars allow them when the prayer time would end before you can pray on the ground. Ask a qualified scholar if you can.

For voluntary prayers on a mount, the Prophet ﷺ prayed facing the direction in which his animal was going, but he did not pray the obligatory prayers that way. For those he got down and faced the Qibla (Sahih al-Bukhari 1000 and 1099).

Sources

General information for learning, not a fatwa. For your own situation, ask a qualified scholar.

Updated 7 October 2026

Common questions

Is the Qibla the same in every city?

No. The Qibla is a direction toward the Kaaba, so it is different in each place. For example, in one city it may be east and in another it may be south-west.

Must my prayer be repeated if the Qibla was a little wrong?

If you made an honest effort and prayed in the direction you believed was right, most scholars say your prayer is valid. If you later find a clear mistake and you are still within the time, ask a qualified scholar what to do, because the Shafi'i school says to repeat the prayer in that case.