What is the Qibla?
The Qibla is the direction of the Kaaba in Mecca, Saudi Arabia — the point toward which Muslims face during their five daily prayers. The Kaaba is located at coordinates (21.4225°N, 39.8262°E) inside the Grand Mosque (Masjid al-Haram).
How does the Qibla calculator work?
The tool calculates the azimuth bearing from your current location to the Kaaba using spherical trigonometry. The angle is measured from True North in a clockwise direction, ranging from 0° (North) to 360°.
How to use
- Click "Detect My Location" to allow the browser to find your coordinates automatically
- Or enter latitude and longitude manually
- The compass will instantly show your Qibla direction and distance to Mecca
- On mobile devices, enable "Live Compass" for real-time orientation tracking
Live Compass Feature
On smartphones that support orientation sensors, the live compass adjusts the Qibla needle automatically based on your phone's heading. Simply hold your phone horizontally and follow the green needle pointing toward Mecca.
Distance to Mecca
Distance is calculated using the Haversine formula, which accounts for Earth's curvature to provide an accurate great-circle distance in kilometers.