Tools · Prayer
Qibla Direction Finder — the bearing to the Kaaba from where you stand
One fixed point, faced from everywhere: the angle to the Kaaba from your location or your coordinates, worked out on the great circle and drawn on a dial — with the verse, the method and the sun check printed beside it. Nothing you type here is stored or sent anywhere.
The short answer
The qibla is the direction of the Kaaba in Makkah, the point every prayer faces. It is worked out as the starting bearing of the shortest path over the Earth from where you stand — a single angle clockwise from true north. This finder computes that angle, and the distance, from your location or coordinates.
Every prayer faces one point: the Kaaba, inside al-Masjid al-Haram in Makkah. From a flat map, Makkah can look due west or south-west of India; on the surface of a globe the true line is a single angle, and it is different for every town. This page works that angle out for the ground you are standing on, and prints the verse, the method and the checks behind the number.
The finder — your bearing, worked out on the spot
The finder takes your position — the location this site has already saved for your prayer times, your phone’s GPS, one of the city buttons, or coordinates you type — and returns the bearing of the Kaaba from that spot: degrees clockwise from true north, the compass point, and the great-circle distance. The dial draws the same answer, and on a phone with a compass sensor the live mode turns the dial with you. Nothing you enter leaves the page: the arithmetic runs in your browser, and the only stored location is the one the site’s prayer-times widget already keeps on your own device.
Qibla finder
Delhi — this site’s reference point
266.6° W
Face 266.6° clockwise from true north.
Distance to the Kaaba: 3,836 km, along the great circle.
Bearings are calculated from coordinates, on a spherical Earth. A phone compass can drift — keep it away from steel and magnets, calibrate it with a figure-eight motion, and re-check the line against a known landmark or the sun method set out below. This finder gives an estimate for learning; confirm your own case with a qualified mufti.
The starting position is Delhi, this site’s reference point, until you give the finder somewhere else to stand.
Bearings for Indian cities, from the published tables
For the printed record, these are the bearings Chand Ki Tarikh publishes for Indian cities, measured clockwise from true north. The finder’s own arithmetic, run on this site’s coordinates for the same cities, lands within a tenth of a degree of every figure here — the small remainders are the cities’ reference points, not the method. Across India the angle runs from about 257° in Srinagar to about 291° in Kozhikode: the north faces a little south of west, the south a little north of it, and the line passes almost exactly through west around Agra and Lucknow.
| City | Bearing from true north | Which way | Distance to the Kaaba |
|---|---|---|---|
| Srinagar | 256.8° | 13.2° south of west | about 3,700 km |
| Delhi | 266.6° | 3.4° south of west | about 3,835 km |
| Ahmedabad | 273.4° | 3.4° north of west | about 3,370 km |
| Kolkata | 278.2° | 8.2° north of west | about 4,980 km |
| Mumbai | 280.1° | 10.1° north of west | about 3,450 km |
| Hyderabad | 282.7° | 12.7° north of west | about 4,070 km |
| Bengaluru | 288.5° | 18.5° north of west | about 4,110 km |
| Kozhikode | 291.1° | 21.1° north of west | about 3,990 km |
Two cities in the same state can still differ by a degree or more, so a table is a record to check against, not a substitute for your own position. For a prayer room you are setting up once, use the finder on the spot.
The command in the Qur’an
The direction is not a convention that grew up around the mosques; it is a command, given in one verse of Surah Al-Baqarah. The first qibla had been Jerusalem. In the second year after the Hijrah the direction was turned to the Sacred Mosque, and the verse that turned it addresses the Prophet ﷺ first, then every believer wherever they are:
قَدْ نَرَىٰ تَقَلُّبَ وَجْهِكَ فِى ٱلسَّمَآءِ ۖ فَلَنُوَلِّيَنَّكَ قِبْلَةً تَرْضَىٰهَا ۚ فَوَلِّ وَجْهَكَ شَطْرَ ٱلْمَسْجِدِ ٱلْحَرَامِ ۚ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا۟ وُجُوهَكُمْ شَطْرَهُۥ ۗ وَإِنَّ ٱلَّذِينَ أُوتُوا۟ ٱلْكِتَـٰبَ لَيَعْلَمُونَ أَنَّهُ ٱلْحَقُّ مِن رَّبِّهِمْ ۗ وَمَا ٱللَّهُ بِغَـٰفِلٍ عَمَّا يَعْمَلُونَ
“Indeed, We see you ˹O Prophet˺ turning your face towards heaven. Now We will make you turn towards a direction ˹of prayer˺ that will please you. So turn your face towards the Sacred Mosque ˹in Mecca˺—wherever you are, turn your faces towards it. Those who were given the Scripture certainly know this to be the truth from their Lord. And Allah is never unaware of what they do.”
Qur’an 2:144 · Surah Al-Baqarah — read it on quran.com (translation: Dr. Mustafa Khattab)
The mosque in Madinah where the congregation changed direction in the middle of a prayer, on this verse’s arrival, is still called Masjid al-Qiblatayn — the mosque of the two qiblas. The verse fixes the point, not the angle: the angle is left to each generation’s instruments, which is what the rest of this page is about.
Why the shortest path, and not the straight line on a map?
Stand anywhere on Earth and there is exactly one shortest route to the Kaaba: the arc of the great circle that passes through your town and Makkah. A great circle is any circle whose centre is the Earth’s own centre — every line of longitude is one. Wikipedia’s summary of the definition Muslim astronomers used runs: “The most common technical definition used by Muslim astronomers for a location is the direction on the great circle—in the Earth’s Sphere—passing through the location and the Kaaba,” and it is, in the same article’s words, “the direction of the shortest possible path from a place to the Kaaba.” The qibla is the direction you would set off along that arc, which is why calculators call it the initial bearing.
Your place is φ1, λ1; the Kaaba is φ2 = 21.4225° N, λ2 = 39.8262° E — the coordinates the published references print for it — and Δλ is λ2 − λ1. The result is converted to degrees and counted clockwise from true north. The distance under the bearing is the haversine length of the same arc, on an Earth taken as a sphere of radius 6,371 km, the convention the published tables use.
A flat map suggests a different line, and it is worth seeing why the map loses. “A straight line shown by the world map in using the Mercator projection is called the rhumb line or the loxodrome, which is used to indicate the qibla by a minority of Muslims.” A rhumb line holds one compass bearing all the way, which makes it easy to draw and easy to sail, but on a sphere it is not the shortest path. From Delhi it starts at about 258° — nearly nine degrees away from the great-circle 266.6°. Further off, the gap stops being a detail: “in some parts of North America the flat map shows Mecca in the southeast while the great circle calculation shows it to the northeast.” The same article records the practice plainly: “The majority of Muslims, however, follow the great circle method.” So does this finder, and so do the published tables quoted on this page.
True north, magnetic north, and the phone in your hand
Every bearing printed here is counted from true north, the direction of the geographic pole. A magnetic compass — including the sensor inside a phone — points to magnetic north instead, and the gap between the two is called the declination. It changes from place to place, which is why a finder has to say which north it means. For a reader in India the news is good: “A magnetic compass points to magnetic north, but across India the gap between the two is only a degree or two.” A compass reading and the true bearing sit within that small distance of each other anywhere in the country. In some parts of the world the same gap passes ten degrees, and there a raw compass bearing used without the correction can be well off.
What actually ruins phone compasses is not declination but metal. “A steel almirah, a fridge, a laptop speaker or a magnetic phone cover can pull a phone compass 20 degrees or more.” Keep the phone flat, hold it away from steel furniture, speakers and magnetic covers, and wave it in a figure of eight to calibrate the sensor. If the live dial and the printed degree ever disagree, believe the degree, and settle it with the sun check in the next section.
Checking the line by the sun
Twice a year the sun passes directly over the Kaaba at Makkah’s midday, and for a few minutes the whole sunlit half of the Earth has a qibla line drawn on the ground for free. Wikipedia gives the occasions: “It occurs twice a year, firstly on 27/28 May at about 12:18 Saudi Arabia Standard Time (SAST) or 09:18 UTC, and secondly on 15/16 July at 12:27 SAST (09:27 UTC).” In India those are 2:48 PM on 27 or 28 May and 2:57 PM on 15 or 16 July, and at that minute, in Chand Ki Tarikh’s words, “anyone in India who faces the sun is facing the qibla.”
The observation has a classical name: “This method of finding the qibla is called rasd al-qiblat (“observing the qibla”).” At the moment itself, any vertical object — a stick pushed into the ground, a plumb line, the edge of a wall — casts a shadow that falls straight along the qibla line. The shadow points directly away from the Kaaba, so the direction to face runs from the tip of the shadow back through the object and onward toward the sun. The timing is forgiving: “Observations made within five minutes of the rasd al-qiblat moments … or at the same time of the day two days before or after each event, still show accurate directions with negligible difference.” A line marked this way on a terrace or courtyard stays true for that spot, and it remains the simplest independent check on any compass or app.
The qibla wall and the mihrab
Inside a mosque, nobody works the angle out for themselves. “Most mosques contain a mihrab (a wall niche) that indicates the direction of the qibla,” and the imam stands in it or close to it, in front of the congregation. The wall was set once, when the mosque was built, with the instruments of that day, and the prayer rows have followed it since. That history is exactly why a modern calculation can sit a few degrees away from an older mosque’s wall: “The qibla found using modern instruments might differ from the direction of mosques, because a mosque might be built before the advent of modern data, and orientation inaccuracies might have been introduced during the building process of modern mosques.” Construction alone can add up to five degrees, and the laying of prayer rugs a few more. Where a difference is known, “sometimes the direction of the mosque’s mihrab is still observed, and sometimes a marker is added (such as lines drawn in the mosque) that can be followed instead of the mihrab.”
None of that makes the old wall careless or the new number a ruling. They are two records of one direction. In a congregation, the congregation’s line is the one to stand in; the finder earns its keep in the places that have no wall to follow — a new home, a hotel room, a relative’s house in another city, a field on a journey.
Mistakes that quietly move the line
- Facing the map instead of the globe. Taking “west” off a flat map is the rhumb-line error in everyday dress. From India it costs up to nine degrees; from further away it can cost a whole compass point.
- Borrowing another city’s bearing. Delhi’s 266.6° used in Bengaluru, where the bearing is 288.5°, is twenty-two degrees out. The angle belongs to the ground under your feet, and inside one country it still travels through more than thirty degrees.
- Reading a phone compass beside steel. Almirahs, fridges, speakers and magnetic covers bend the sensor long before declination matters. Calibrate with a figure of eight, step away from metal, and prefer the printed degree.
- Mixing the two norths abroad. The bearing here is from true north. In regions where declination passes ten degrees, a magnetic compass reading taken as a true bearing puts the line out by that whole amount.
- Marking a room from a single reading. A prayer corner is set once and used for years. Take the degree from the finder, then confirm it a second way — the sun line on the May or July dates, or a known landmark whose direction you trust — before the line goes on the floor.
Each of these is a small slip at the moment it is made, and a permanent one once it is built into a wall or a habit. The checks cost minutes; the direction is then settled.
Frequently asked questions
What is the qibla direction from Delhi?
266.6° clockwise from true north — just south of due west — and the Kaaba is about 3,835 km away along the great circle. That is the figure the published tables print for Delhi (Chand Ki Tarikh; The Muslim Guidance), and it is what the finder above returns for this site's Delhi coordinates. A few kilometres across the city moves the angle by a fraction of a degree.
Is the bearing measured from true north or magnetic north?
True north — the direction of the geographic pole. A magnetic compass, including the sensor inside a phone, points to magnetic north instead, and the gap between the two is called the declination. Across India the gap is only a degree or two, so a compass reading and the true bearing sit close together here; in some parts of the world the gap passes ten degrees, and there the correction matters.
Why does the qibla from North America point north-east, not south-east?
Because the qibla follows the shortest path over a sphere, not the straight line on a flat map. Wikipedia's qibla article puts the map line this way: the straight line on a Mercator map “is used to indicate the qibla by a minority of Muslims”, and in parts of North America that line points south-east while the great-circle calculation points north-east. The majority follow the great circle, and so does this finder.
How can I check the qibla without a phone or a compass?
Use the sun. Twice a year it stands directly over the Kaaba — around 27–28 May and 15–16 July, at 2:48 PM and 2:57 PM Indian time — and at that minute a vertical stick's shadow falls along the qibla line: the direction runs from the tip of the shadow back through the stick and onward toward the sun. Face the sun at that moment and you are facing the qibla. The observation is called rasd al-qiblat.
The mosque near me faces a slightly different way. Which direction is right?
Both are records of the same direction, taken with the instruments of their day. A mosque's qibla wall and mihrab were set when it was built, sometimes before modern coordinates existed, and building itself can add a few degrees. Wikipedia notes that the calculated qibla “might differ from the direction of mosques” for exactly these reasons, and that congregations sometimes follow the mihrab and sometimes a marker line added later. Inside that mosque, follow its congregation; the finder is for the places that have no wall — a home, a hotel room, a journey.
How accurate is this finder?
The arithmetic is exact for the coordinates it is given: it is the same spherical formula behind the published tables, and it reproduces their city figures to within a fifth of a degree. Refining the sphere into the Earth's true ellipsoid shape moves a result by only a few hundredths of a degree — Wikipedia's worked comparison for San Francisco differs by about four arc-minutes. The weak link is never the formula; it is the position you feed it and the compass you read it with, which is why the page prints the sun check as well.
ImanAtlas works the qibla out from the coordinates and the published method printed on this page, and gives no rulings. For a question about your own situation, ask a qualified scholar you trust.
Sources
- The Qur’an, Surah Al-Baqarah (2), verse 144 — quran.com/2/144 (translation: Dr. Mustafa Khattab)
- Wikipedia, “Qibla” — the great-circle definition, the rhumb line and the majority practice, the sun-over-the-Kaaba dates and rasd al-qiblat, the mihrab, and why calculated qiblas can differ from mosque walls — en.wikipedia.org/wiki/Qibla
- Chand Ki Tarikh, Qibla Direction Finder — the published Indian-cities table quoted on this page, the bearing formula and haversine distance as printed there, the India sun times, and the size of the magnetic gap across India — chandkitarikh.in/qibla-direction
- The Muslim Guidance, Qibla Direction Finder — the Kaaba’s coordinates as printed there, and Delhi at 266.6° and 3,835 km — themuslimguidance.com/qibla
- Islamic Calczy, Qibla Compass — the Kaaba’s coordinates in the formula as printed there, Delhi at 266.60°, and London at 118.79° — islamic.calczy.com
- GalaxyOfTools, Qibla Direction — a further print of Delhi at 266.6° and 3,835 km, and the size of the magnetic gap in other parts of the world — galaxyoftools.com/qibla-direction
- City coordinates: this site’s own verified set (OpenStreetMap Nominatim), the same coordinates behind its prayer-times pages — Prayer Times
- On this site: Zakat Calculator · Fitrana Calculator · Fidya & Kaffara Calculator · Islamic Tools · Sources & Method · Accuracy & Correction Policy · No-Fatwa Disclaimer
