Does qibla have to be exact? For most scholars, no: only someone who can see the Kaaba must face it head-on. Far from Makkah (Mecca), they ask for the general direction, while the Shafi'i school asks for the exact line as far as you can manage. Start from the computed number for your city, then hold any error against the limits below.
Does qibla have to be exact in every school?
Far from Makkah, only the Shafi'i school keeps the exact line as its main rule. IslamQA answer 91405 reports the majority view. A person close to the Kaaba must face it head-on, and a person far away must face its direction. Arabic texts call these two duties ayn, facing the Kaaba itself, and jihat, facing its general direction.
Hanafi. Shaykh Faraz Rabbani of SeekersGuidance put the question to Shaykh Adib Kallas, then checked it with Mufti Mahmoud Ashraf Usmani. His answer says the general direction is valid even when you know the exact line. He calls the exact line "superior and more scrupulous", but not a condition of the prayer.
Maliki. Shaykh Irshaad Sedick of SeekersGuidance writes that Hanafi, Maliki and Hanbali law only look for "some portion" of your face directed toward the Kaaba. Al-Dardeer's al-Sharh al-Kabeer (1/227), quoted in IslamQA answer 101449, counts a deviation as large once you face the east or the west. IslamQA adds that this wording fits the people of Madinah, who live north of Makkah.
Hanbali. Ibn Qudamah's al-Mughni, as quoted in answer 91405, records these words from Imam Ahmad:
"a small deviation from the qiblah does not matter, but he has to try to get it right as much as possible"
Shafi'i. Shaykh Sedick cites 'Umdat al-Salik, which asks for the exact direction "(to the extent possible)". Answer 91405 reports that Imam al-Shafi'i required head-on facing even far away (al-Majmu' 3/208). A second opinion ascribed to him, related by Imam al-Muzani, accepts the general direction. Shaykh Sedick told one Shafi'i asker that following it is valid.
How many degrees of deviation do sources allow?
Published limits run from 3 to 45 degrees each side, and 45 each side is the figure most of them give. The four schools' texts quoted above give no number, so the figures below come from named scholars and bodies.
| Scholar or body | Limit as published | Used for |
|---|---|---|
| Darul Iftaa Azaadville, approved by Mufti Muhammed Saeed Motara | "90 degrees (45 degrees to the right or left when facing the precise direction of the Ka'bah)" | Whether prayers in an off-line musalla (prayer hall) count |
| Mufti Ebrahim Desai | "a deviation of maximum 45 degrees" | Whether a prayer is valid |
| Shaykh Mohammed Tosir Miah, Darul Ifta Birmingham | Prayer is invalid past the 45 degree mark | Whether a masjid may sit off the line |
| IslamQA answer 101449 | "less than 45 degrees" | Whether a prayer is valid |
| Sheikh Yasin al-Fadani | 45 to the right and left | Mosques in the Malay Archipelago |
| Dar al-Ifta al-Misriyyah (Egypt) | English: "45 degrees from each direction of the face". French: 22.5 on each side | Adjusting a mosque's rows |
| Shaykh Abdul Raheem Limbada of Tafseer Raheemi | "22.5 towards his right and 22.5 towards his left" | Someone working out the line by careful thought |
| Malaysia's National Fatwa Committee (coordinated by JAKIM) | A maximum of 3 | Mosque qibla orientation |
Two things explain the spread, and a third limits it. Purpose comes first: Malaysia's 3 degrees is reported in a study of how mosques are set out, while most of the 45 figures answer whether a prayer counts. Reading comes next: Shaykh Limbada takes 45 as the whole allowance and splits it, while Darul Iftaa Azaadville gives 45 on each side. Dar al-Ifta's English answer (2013) and French answer (2024) on a village mosque's rows differ in the same way. School also limits how far these figures reach, since Azaadville sends its Shafi'i worshippers to a Darul Ifta (fatwa office) that specialises in Shafi'i law.
Before any number, Shaykh Limbada's first instruction is to "try his utmost effort".
Why scholars settle for the general direction
Scholars rest the general direction on the wording of revelation, the limit of human capacity and one hadith. Shaykh Rabbani gives three reasons. A slight deviation is "practically, inevitable". The primary texts only ask for "facing", and he names Quran 2:144, the verse that set the Kaaba as the direction, with 2:149. An exact duty could also bring hardship.
Fath al-Qadir, the Hanafi commentary printed with his answer, adds that duty follows capacity. The Quran states that principle in 2:286 (Saheeh International translation):
"Allah does not charge a soul except [with that within] its capacity."
The hadith is Jami at-Tirmidhi 342, a report from Abu Hurairah that al-Albani graded sahih (sound). The Prophet Muhammad (peace be upon him) said:
"What is between the east and the west is Qiblah."
Shaykh Ibn 'Uthaymeen, in answer 91405, says the hadith concerned the people of Madinah, whose qibla lies to the south. The Standing Committee for Issuing Fatwas, quoted in IslamQA answer 85066, gives the other case. For people east or west of the Kaaba, the qibla lies between south and north. Ibn 'Uthaymeen also explains why distance helps: "the larger a circle grows", he says, "the more leeway there is". Old mosques show how broad that direction could be, and that history is why some mihrabs sit off today's line. A mihrab is the niche that marks a mosque's direction.
Can you face the Kaaba exactly from far away?
From Madinah or farther, the Kaaba is too small to aim at by eye or by compass. Its longer wall is about 12 m wide. One degree of turn moves your line kilometres sideways by the time it reaches Makkah. The table gives that miss and the width of the wall as an angle. One arc second is 1/3,600 of a degree.
| Place | Distance to the Kaaba | Sideways miss for 1 degree | Width of the 12 m wall |
|---|---|---|---|
| Kuala Lumpur | 6,974 km | 98.8 km | 0.44 arc seconds |
| Jakarta | 7,920 km | 105.3 km | 0.41 arc seconds |
| Madinah | 339 km | 5.9 km | 7.3 arc seconds |
Wikipedia's article on visual acuity puts the limit of the sharpest human eye at about 28 arc seconds. That makes the wall about 68 times too small to see from Jakarta. Even from Madinah, only 339 km away, it is about 4 times too small. A single arc second of error from Jakarta still misses by about 29 m, more than twice the width of the wall. For your own distance, see where the Kaaba sits from your own city.
Qibla direction tolerance on your mat and compass
Measure the gap first, because its size tells you which limits it falls inside. Turn a 120 cm prayer mat from its bottom edge, and 3 degrees moves the top edge about 6 cm sideways. A turn of 22.5 degrees moves it about 46 cm, and 45 degrees about 85 cm. A top edge 10 cm off the line is roughly 5 degrees out.
On a compass, take Kuala Lumpur, whose exact qibla is 292.5 degrees. Three degrees each side covers 289.5 to 295.5, 22.5 covers 270 to 315, and 45 covers 247.5 to 337.5. Due west, at 270, sits right on the 22.5 edge there.
| Error | Size in degrees | Inside which limits | Fix |
|---|---|---|---|
| App reading against a surveyed line | 2 to 3, in the apps furthest off in a 2024 test by Universiti Teknologi Malaysia researchers | 22.5 and 45; at the edge of 3 | Compare the app with your number |
| Mosque building plus prayer rugs | Up to 5 + 5, per Wikipedia | 22.5 and 45 | Re-mark the rows from a checked line |
| Compass on magnetic north, reading a true-north number | 26.8 in Cape Town, per the WMM-2025 model for early November 2026 | 45 only | Use true north or a magnetic number |
| Old "due west" habit in Indonesia | 21 to 25, per Wikipedia | 45; 22.5 only at the low end | Use the computed 291 to 295 |
| Line ruled on a flat map | Tokyo 32.3, Chicago 52.1 | Tokyo 45 only; Chicago none | Use the shortest path over the globe |
| Facing the sunset | Up to 38 in Lahore | 45 only | Use the sun only at its daily lined-up time |
A flat-map line from Chicago is the one error here past even 45, and why North American maps mislead shows the reason. For the last row, learn when the sun lines up with your qibla each day. If the gap comes from a phone arrow, these settings fix most of it.
These ranges hold for one spot, because your qibla number can change as you travel. That is why a seat on a plane needs its own check.
Can you turn off the line on purpose?
Several of the fatwas quoted on this page say you should not, even where the prayer would still count. One asker wanted to know if rows could turn up to 45 degrees to fit more people. Shaykh Tosir Miah replied that a masjid "intentionally should not" sit that far off, though prayer inside the limit stays valid. Answer 91405 tells worshippers to correct the rows and says a person "should not deliberately deviate". Two answers are more lenient. Shaykh Rabbani's Hanafi answer accepts the general direction even when you know the line. Dar al-Ifta saw no objection to aligning a village mosque's rows with its building. The gap there was 3 degrees, and the building could not fit its worshippers.
Once you learn your line was off, correct it, as Darul Iftaa Azaadville told one musalla to re-mark its rows. Prayers made before you knew are a separate question, with the rulings on past prayers on their own page.
FAQ
Should I follow the mosque or my app?
IslamQA answer 11691 told a reader in Korea to pray with the mosque when the gap is slight and in the same general direction. If the gap is great, such as facing south where the qibla is west, it says the mosque's qibla must change. With neither mosque nor device nearby, use the order of signs for finding the line.
Can a whole row face the Kaaba exactly?
No, according to the Standing Committee for Issuing Fatwas. In Fataawa al-Lajnah al-Daa'imah (6/316), quoted in IslamQA answer 85066, it says a long row cannot all face the Kaaba directly. If exact facing were the duty, it adds, the prayer of such a row would not be valid.
Does being a few degrees off the qibla matter?
IslamQA answer 101449 reports that the fuqaha, the experts in Islamic law, treat a slight deviation as not mattering. It still calls correcting a mosque's qibla the better course. Most published limits are far wider, at 45 degrees each side.
Is exact facing required if you see the Kaaba?
Yes. Ibn Qudamah in al-Mughni (1/262), quoted in IslamQA answer 85066, calls direct facing obligatory for someone who can see the Kaaba. He knows of no disagreement on this. He also reports Ibn 'Aqeel's view: if part of the body does not face it, the prayer is not valid.
Conclusion
Measure the gap before you worry about it. Once you have a figure, the question gets narrower: is this gap inside the limit my community follows? Either way, mark the corrected line on your floor once, so the doubt does not return at every prayer.
