How does this qibla finder work?
- Qibla direction: The qibla finder uses your coordinates and the coordinates of the Kaaba (21.4225° N, 39.8262° E). It calculates the starting direction of the shortest path between them over the Earth's surface, called the great-circle path, and shows it in degrees clockwise from true north. On a flat map, this path looks curved, but on a globe it is the shortest, straightest route.
- Distance: The distance to the Kaaba is calculated with the haversine formula. Both the direction and distance calculations treat the Earth as a sphere, which is accurate enough for finding the qibla.
- Compass: Your device's compass sensor detects magnetic north, which differs from true north by an angle called magnetic declination. The qibla finder calculates the declination at your location and corrects for it, so the compass shows true north.
- Prayer times: They are calculated from the position of the sun at your location for today's date, using the method you choose.
How accurate is this qibla finder?
The qibla direction is calculated precisely from your coordinates. How closely the arrow matches it depends on two things:
- Your device's compass sensor: Phone compass sensors can be off by a few degrees, and sometimes more, even after calibration. Magnets, metal objects, and electronics make them less accurate. If the arrow jumps around, calibrate the compass by moving your phone in a figure-eight motion. If you are unsure of the direction, compare it the qibla direction of your local mosque.
- Your location: Far from Mecca, small location errors barely change the direction. From London, for example, a location that is 10 kilometers off changes the direction by less than 0.2°. Close to the Kaaba, small errors matter much more. A 10-meter error can move the arrow by almost 6° when you are 100 meters from the Kaaba, but only about 0.6° when you are 1 kilometer away. Inside the Grand Mosque, face the Kaaba itself.
Which prayer time calculation method should I choose?
Methods differ mainly in how they calculate Fajr and Isha, so these times can change by several minutes or more when you switch methods. Choose the method your local mosque or your country's religious authority uses. If your mosque publishes a timetable, pick the method whose times match it most closely.
| Method in the list | Organization or country |
|---|---|
| MuslimWorldLeague | Muslim World League |
| Egyptian | Egyptian General Authority of Survey |
| Karachi | University of Islamic Sciences, Karachi |
| UmmAlQura | Umm al-Qura University, Makkah |
| Dubai | United Arab Emirates |
| MoonsightingCommittee | Moonsighting Committee |
| NorthAmerica | Islamic Society of North America (ISNA) |
| Kuwait | Kuwait |
| Qatar | Qatar |
| Singapore | Singapore |
| Tehran | Institute of Geophysics, University of Tehran |
| Turkey | Turkey |
Troubleshooting
Menu names can vary slightly depending on your device and software version.
The qibla direction isn't shown on my phone or tablet
Make sure location is turned on for your device and allowed for your browser, then reload this page.
- iPhone (Safari): Go to Settings > Privacy & Security > Location Services. Turn on Location Services, then tap Safari Websites and choose Ask Next Time or While Using the App. Then reload this page, switch Location services ON, and tap Allow on both popups.
- iPhone (Chrome): Go to Settings > Apps > Chrome > Location, and choose Ask Next Time or While Using the App.
- Android (Chrome): Go to Settings > Location > App location permissions > Chrome, and allow location. Then, in Chrome, tap the site information icon to the left of the address bar, tap Permissions, and allow Location for this site.
The qibla direction isn't shown on my Windows computer
Location access may be turned off in Windows. In Windows 11, go to Settings > Privacy & security > Location, and turn on both Location services and Let desktop apps access your location. Browsers such as Chrome and Edge count as desktop apps. Also check that your browser allows location for this site, then reload this page. Keep in mind that most computers don't have a compass sensor (magnetometer), so the arrow won't turn as you move the device.
The arrow doesn't move
On iPhone or iPad: you probably tapped Don't Allow on the motion and orientation popup. Reload this page, switch Location services ON again, and tap Allow when Safari asks to access motion and orientation.
On other devices: your device may not have a compass sensor. Some budget phones and most computers don't have one. You can still use the qibla direction in degrees.
The arrow jumps around or points the wrong way
Move your phone in a figure-eight motion to calibrate the compass. Remove magnetic cases, and move away from metal objects and electronics.
The prayer times don't match my mosque
Choose the calculation method your mosque uses from the list.
Safari doesn't ask about motion and orientation anymore
Safari remembers your earlier answer for this site. To clear it, go to Settings > Safari > Advanced > Website Data, find onlinecompass.net, swipe left, and tap Delete. Then reopen this page and switch Location services ON.
Frequently asked questions
Is this qibla finder free?
Yes. It's free and works in your web browser, so there is no app to install.
Why does the qibla point northeast from most of North America?
The qibla finder uses the shortest path over the round Earth. On a flat map, Mecca looks east-southeast of North America, but from most of the continent the shortest path starts out toward the northeast. From New York, for example, the qibla is about 58° from true north. From the West Coast, it points closer to north, and from Alaska almost due north.
Why is the direction different on a regular compass?
The qibla direction is measured from true north. A regular compass points to magnetic north, which can be more than 10° away from true north in some places. The qibla finder's compass corrects for this automatically.
Why does my iPhone ask for two permissions?
Safari treats the two sensors separately. The first popup, about motion and orientation, lets the page read which way your device is pointing, which is what makes the arrow turn. The second, about your location, sets the qibla direction, the distance, and the prayer times. Allow both to use the live compass. Android asks only for location.
Is my location stored?
No. Your location comes from your browser, and the qibla direction, distance, and prayer times are calculated there too. Your coordinates are sent once to our own server to look up your elevation and place name, never to any other service, and nothing is stored. Your location is shared with others only if you use the Share button.