Premium Converters
Loading
Loading
Loading
Find the exact direction of the Kaaba in Mecca from anywhere in the world. Compass + bearing in degrees.
Islamic
Generated on May 23, 2026
Find the exact direction of the Kaaba in Mecca from anywhere in the world. Compass + bearing in degrees.
The Qibla is the direction Muslims face during prayer — toward the Kaaba in Masjid al-Haram, Mecca. This Qibla Direction Finder shows that exact direction from your live location using the great-circle initial-bearing formula. How it works in 4 steps: (1) Get your location — the tool reads your latitude and longitude from your device's GPS (browser geolocation), or you can pick a country / city manually.
Formula
θ = atan2(sin(Δλ)·cos(φ_K), cos(φ)·sin(φ_K) − sin(φ)·cos(φ_K)·cos(Δλ)) where φ = your latitude, λ = your longitude, φ_K = 21.4225°N, λ_K = 39.8262°E (Kaaba).Whether you're travelling, in a new hotel room, or simply praying in an unfamiliar part of the house, the question is always the same — which direction is the Kaaba? This finder uses your device's GPS to read where you are, then computes the great-circle initial bearing from your latitude and longitude to Mecca (21.4225° N, 39.8262° E) and shows it as a clean number of degrees clockwise from true north, plus a live rotating compass arrow if you turn on your phone's magnetometer. From Karachi the Qibla sits roughly at 268° (almost due west); from London it's 119° (east-southeast); from New York it's 58° (northeast, because the shortest arc across the Earth's curve goes over the Atlantic, not flat across the map — a common point of confusion for anyone used to looking at a Mercator projection). All math runs locally in your browser once the page has loaded, so you can save it to your home screen and use it without an internet connection. For prayer purposes the accuracy is more than enough; a tolerance of a few degrees is widely accepted by scholars, and the dial pulses green when you're aligned within 5°.
The Qibla is the direction Muslims face during prayer — toward the Kaaba in Masjid al-Haram, Mecca. This Qibla Direction Finder shows that exact direction from your live location using the great-circle initial-bearing formula. How it works in 4 steps: (1) Get your location — the tool reads your latitude and longitude from your device's GPS (browser geolocation), or you can pick a country / city manually. (2) Calculate the Qibla bearing — the great-circle initial-bearing formula computes the exact angle from your position to the Kaaba (21.4225° N, 39.8262° E) in degrees clockwise from true north. (3) Listen to device rotation — when you enable Live mode, the tool reads your phone's compass / magnetometer through the DeviceOrientation API, so the compass dial knows which way you're facing. (4) Rotate the compass needle in real time — as you turn your phone, the green Qibla arrow rotates so it always points toward Mecca, no matter how you hold the device. The dial pulses green when you're aligned within 5°. The result is shown three ways: the live compass with a Qibla arrow, the bearing in degrees (e.g. 254° from London, 268° from Karachi), and the great-circle distance to the Kaaba in kilometres and miles. All math runs locally in your browser — no network call needed once your location is known, so the tool works offline after the first load.
This is the standard great-circle initial-bearing (or 'forward azimuth') formula. It computes the direction you would face at the start of the shortest path along Earth's surface to reach the Kaaba. Because Earth is roughly spherical, that bearing changes as you travel — but Muslims face the initial bearing at the moment of prayer. The Kaaba's coordinates (21.4225°N, 39.8262°E) are taken from the Saudi Geological Survey. The result is normalized to 0–360° clockwise from true north. To use it with a magnetic compass you may need to apply a small declination correction (typically ±5°) for your region; for prayer purposes most scholars consider this small offset acceptable.
Approximate Qibla bearing (degrees clockwise from true north) and great-circle distance to the Kaaba from major cities worldwide.
| City | Country | Qibla bearing | Distance |
|---|---|---|---|
| Mecca | Saudi Arabia | 0° | 0 km |
| Riyadh | Saudi Arabia | 246° | 870 km |
| Cairo | Egypt | 136° | 1,310 km |
| Istanbul | Turkey | 151° | 2,800 km |
| Tehran | Iran | 207° | 1,790 km |
| Karachi | Pakistan | 268° | 2,950 km |
| Lahore | Pakistan | 256° | 3,560 km |
| Islamabad | Pakistan | 254° | 3,790 km |
| Dhaka | Bangladesh | 276° | 4,930 km |
| Kuala Lumpur | Malaysia | 292° | 7,470 km |
| London | UK | 119° | 4,750 km |
| New York | USA | 58° | 10,300 km |
| Toronto | Canada | 55° | 9,950 km |
| Sydney | Australia | 277° | 12,070 km |
| Tokyo | Japan | 293° | 8,840 km |
| Cape Town | South Africa | 26° | 7,300 km |
From any point in Saudi Arabia, the Qibla and Mecca are within 1,500 km — a distance comparable to the length of Italy.
Muslims in Hawaii face roughly 333° (north-northwest) — almost the opposite direction from what a flat map would suggest.
From the South Pole, every direction is technically 'north' — including the Qibla — making this calculator essential for the rare Antarctic researcher.
Astronauts on the ISS have used real-time Qibla calculators that account for their ~28,000 km/h orbital motion — the bearing changes every few seconds.
From Karachi (24.86°N, 67.0°W) the Qibla is approximately 268° — almost due west.
From Lahore (31.55°N, 74.34°E) the Qibla is approximately 256° — west-southwest.
From Islamabad (33.69°N, 73.05°E) the Qibla is approximately 254° — west-southwest.
From London (51.51°N, -0.13°E) the Qibla is approximately 119° — east-southeast.
From New York (40.71°N, -74.0°W) the Qibla is approximately 58° — northeast (the great-circle path goes over the Atlantic and southern Europe).
From Tokyo (35.68°N, 139.69°E) the Qibla is approximately 293° — west-northwest.
From Sydney (-33.87°N, 151.21°E) the Qibla is approximately 277° — almost due west.
Jump to a ready-made conversion — useful for quick reference and sharing:
Zakat Calculator
Calculate your annual Zakat obligation based on Nisab and your net zakatable wealth.
Qurbani Cost Estimator
Estimate the per-share cost of a Qurbani / Udhiyah animal — goat, sheep, cow, buffalo, camel — including butcher, transport, and meat distribution.
Mahr Calculator
Calculate Islamic Mahr (dower) — Mahr-e-Fatimi based on live silver rate, custom amount, or split into prompt (mu'ajjal) and deferred (mu'wajjal) portions.
Warasat — Islamic Inheritance Calculator (Full Faraiz)
Comprehensive Islamic inheritance distribution per all four Sunni madhāhib (Hanafi, Maliki, Shafi'i, Hanbali). Implements Hijab (exclusion), Quranic fixed shares, 'Awl, Asabat, Radd, and special cases like Umariyyatan and Minbariyyah.
Salah Times Calculator
Daily prayer times (Fajr, Dhuhr, Asr, Maghrib, Isha) for your country with countdown to next prayer.
Hijri ↔ Gregorian Date Converter
Convert dates between the Islamic Hijri (lunar) calendar and the Gregorian (solar) calendar. Includes Ramadan and Eid markers.
Sehri & Iftar Ramadan Schedule
Generate a printable 30-day Ramadan calendar with Sehri (Imsak), Fajr, Sunrise, Iftar (Maghrib), and Isha times for any city worldwide.
Hijri Date Today
Live Hijri (Islamic) date widget — shows today's Hijri date, weekday, sacred-month status, Arabic month name, and countdowns to Ramadan, Eid al-Fitr, Eid al-Adha, and Islamic New Year.
Browse all Islamic calculators & converters
See every tool in this category, plus FAQs and category-specific guides.