Qibla Finder: direction to the Kaaba and prayer times

N0°
E90°
S180°
W270°
Qibla – Al-Aqsa –

Awqat As-Salahأوقات الصلاة

Set your position to see prayer times for where you are.

Computation method
    Note: Times are worked out in your browser and shown in your device's time zone. They are approximate, within about two minutes. Check them against your local mosque's timetable.

    // about/

    About the Qibla Finder

    The Qibla is the direction Muslims face in prayer, toward the Kaaba in Makkah. This free Qibla finder shows the exact direction from where you are, the distance to the Kaaba, the bearing to Masjid Al-Aqsa in Jerusalem, and prayer times for your location. It also shows the sun's position and works with a phone compass.

    The tool calculates the great-circle bearing, which is the shortest path over the surface of the Earth. Enter nothing: press "Use my location" and the bearings and times are worked out in your browser.

    How the Qibla direction is calculated

    Makkah is at 21.4225° N, 39.8262° E. From your latitude and longitude, the bearing is the angle, measured clockwise from true north, of the great-circle path to Makkah. A bearing of 0° points north, 90° east, 180° south and 270° west. The distance is the great-circle distance along the same path.

    Because the Earth is round, the direction changes with your position. Two cities that are close together can have bearings a degree or two apart, and cities far apart can differ by many degrees. The same is true of Masjid Al-Aqsa in Jerusalem, which sits at 31.7761° N, 35.2358° E.

    Qibla direction from major cities

    These are bearings from true north to the Kaaba, measured from each city's centre, with the straight-line distance. Use the Qibla Finder above for your exact position.

    CityQibla bearingDistance to Makkah
    Karachi268°2,800 km
    Lahore260°3,598 km
    Islamabad256°3,528 km
    Peshawar254°3,401 km
    Kabul251°3,217 km
    Delhi267°3,835 km
    Dhaka278°5,172 km
    Mumbai280°3,452 km
    Tehran218°1,944 km
    Dubai258°1,631 km
    Riyadh244°790 km
    Cairo136°1,287 km
    Istanbul152°2,405 km
    London119°4,794 km
    Paris119°4,496 km
    Berlin137°4,130 km
    New York58°10,306 km
    Toronto55°10,496 km
    Los Angeles24°13,424 km
    Jakarta295°7,920 km
    Kuala Lumpur293°6,974 km
    Sydney277°13,236 km
    Johannesburg15°5,446 km

    Qibla direction from Pakistan

    Pakistan lies east of Makkah, so from most Pakistani cities the Qibla points towards the west and south-west. Karachi is the most south-westerly of the major cities, at about 268°, while Peshawar and Islamabad sit closer to 254° and 256°. The bearings below are measured from each city's centre, with the straight-line distance to the Kaaba.

    • Karachi: 268°, 2,800 km
    • Hyderabad (Sindh): 267°, 2,939 km
    • Multan: 260°, 3,306 km
    • Lahore: 260°, 3,598 km
    • Faisalabad: 260°, 3,483 km
    • Quetta: 257°, 2,878 km
    • Islamabad and Rawalpindi: 256°, about 3,520 km
    • Peshawar: 254°, 3,401 km

    Your exact direction depends on your position within the city. Press "Use my location" at the top of the page for the bearing from where you are.

    Masjid Al-Aqsa and the first Qibla

    Masjid Al-Aqsa in Jerusalem, known in Arabic as Al-Masjid Al-Aqsa, is the first Qibla. According to the widely reported tradition, Muslims prayed toward Jerusalem for about sixteen to seventeen months after the migration to Madinah, before the direction changed to the Kaaba. Many Muslims still look to Al-Aqsa with deep respect, and the tool shows its bearing and distance alongside the Qibla.

    How to use the Qibla Finder

    1. Press "Use my location" and allow location access in your browser.
    2. Read the Qibla bearing and distance on the dial, and the bearing to Al-Aqsa.
    3. Press "Turn on compass" on iPhone. On Android the compass usually starts by itself.
    4. Turn yourself until the Qibla needle points to the top of the dial. The dial shows "Aligned with the Qibla" when you are within 3°.
    5. Check the prayer times on the right, and choose the calculation method your mosque uses.

    Tips for a better compass reading: hold the phone flat, then move it in a figure of eight to calibrate it. Keep magnets, metal objects, speakers and car mounts away from the phone. If the reading still seems wrong, check it against a dedicated compass or ask your local mosque.

    Prayer times and how they are calculated

    Muslims pray five times a day: Fajr at dawn, Dhuhr after the sun passes its highest point, Asr in the afternoon, Maghrib at sunset and Isha after dusk. Sunrise is not a prayer, but it marks the end of the time for Fajr.

    The times here are calculated from your latitude, longitude and the date, using the sun's position. Fajr and Isha begin when the sun is a set angle below the horizon, which depends on the method. Maghrib begins at sunset, and Dhuhr when the sun passes its highest point. Asr depends on the length of a shadow, following either the Hanafi or the Shafi'i rule. The times are shown in your device's time zone.

    Prayer calculation methods

    Different communities use different sun angles for Fajr and Isha, and different rules for Asr. Choose the method your mosque uses. The angles below are the standard published values for each method.

    MethodFajr angleIshaAsr ruleCommonly used in
    Karachi (Hanafi Asr)18°18°Hanafi (shadow twice the object)Pakistan and South Asia
    Karachi (Shafi'i Asr)18°18°Shafi'i (shadow equals the object)Pakistan and South Asia
    Muslim World League18°17°Shafi'iEurope and many other countries
    ISNA15°15°Shafi'iNorth America
    Umm al-Qura, Makkah18.5°90 min after MaghribShafi'iSaudi Arabia, Makkah
    Egyptian General Authority19.5°17.5°Shafi'iEgypt
    Kuwait18°17.5°Shafi'iKuwait
    Dubai18.2°18.2°Shafi'iUnited Arab Emirates
    Singapore20°18°Shafi'iSingapore

    The methods shown here follow the Sunni school of thought. The page does not offer the Jafari (Shia) calculation methods.

    // faq/

    Frequently asked questions

    What is the Qibla?

    The Qibla is the direction Muslims face when they pray. It points to the Kaaba, the cube-shaped building in the Grand Mosque in Makkah, Saudi Arabia. Muslims face the Qibla in every prayer (salah), and when they make supplication, perform burial prayers and slaughter animals for food.

    How does this tool find the Qibla direction?

    It uses the great-circle bearing, which is the shortest path over the surface of the Earth. From your latitude and longitude it works out the compass bearing from true north to the Kaaba at 21.4225° N, 39.8262° E. The same method gives the bearing and distance to Masjid Al-Aqsa in Jerusalem. The calculation runs in your browser.

    Why does it ask for my location?

    The bearings, distances, sun position and prayer times all depend on where you are. Without your location, no direction can be calculated. Your browser asks for permission first, and the location is only read when you press "Use my location".

    Is the direction exact?

    The calculation is exact for your position. The compass depends on your phone's sensors, which can be a few degrees off, especially near metal, magnets, speakers or in a car. The page counts the phone as aligned within 3°. For a final check, use a dedicated compass or an established mosque's direction.

    Does it work on iPhone?

    Yes. On iPhone, the compass needs your permission, which you give when you press "Turn on compass". Safari asks for this again on each visit. Without it, the bearings, distances and prayer times still work.

    Does it work on Android, laptops and tablets?

    On Android phones and tablets with a compass, the compass starts by itself in most browsers. Laptops and desktop computers have no compass, so the compass button does nothing there. The bearings, distances and prayer times still work on any device with a browser.

    Why do prayer times differ between apps and mosques?

    Prayer times depend on the calculation method. Each method sets the sun angle for Fajr and Isha, and the rule for Asr. Mosques also round times, and some use local timetables based on observation. Check this page against your local mosque's timetable, especially for Fajr and Isha.

    Which calculation method should I choose?

    Choose the method your local mosque or community uses. Karachi is widely used in Pakistan, Muslim World League across Europe and many other places, ISNA in North America, Umm al-Qura for Makkah, and Egyptian General Authority, Kuwait, Dubai and Singapore for their own countries and regions. If you are not sure, ask your mosque.

    What is the difference between Hanafi and Shafi'i Asr?

    Both mark Asr from the sun's position in the afternoon. Shafi'i, Maliki and Hanbali scholars take Asr to begin when a shadow is as long as the object plus its noon shadow. Hanafi scholars take it when the shadow is twice the object's length, which makes Asr later. Choose the one your mosque follows.

    Do the prayer times work without internet?

    The calculations run in your browser, so the bearings and prayer times don't need a server once the page has loaded. The page itself needs to load first, and you need internet to load it.

    Is my location shared or stored on a server?

    Your location is never sent to our servers or shared with anyone. The page saves the last location on your device, in your browser, so it can find you again next time. To delete it, clear this site's data in your browser settings.

    // privacy/

    Your privacy

    Your location is read by your browser only when you press "Use my location". The page saves the last location on your device, in your browser, so it can find you again next time. Your location is not uploaded, shared or sent to our servers, and compass readings are used live and not saved. To delete the saved location, clear this site's data in your browser settings. Read the website privacy policy for details.

    // more tools/

    Find more free tools on the Made by Waleed tools page, including the calculators.