Qibla Direction Finder
Instantly find the exact direction to the Kaaba in Mecca from anywhere on Earth using your device's location.
Facing the Qibla is a condition for the validity of Salah. This tool uses precise spherical geometry — the same great-circle bearing formula used by navigation and aviation systems — to compute the shortest compass direction from your coordinates to the Kaaba.
Find Your Direction
Allow location access for an instant result, or enter coordinates manually.
Find Your Qibla Direction
Allow location access for an instant reading, or enter coordinates manually below.
How the Qibla Bearing Is Calculated
The mathematics behind facing the Kaaba.
The Qibla is not a straight line drawn on a flat map — the Earth is a sphere, so the shortest path between two points is a "great circle" arc. Our calculator uses the standard initial-bearing formula from spherical trigonometry to determine the compass direction you should face at the very start of that arc:
θ = atan2( sin(Δlon)·cos(lat₂), cos(lat₁)·sin(lat₂) − sin(lat₁)·cos(lat₂)·cos(Δlon) )
Here, lat₁ and lon₁ are your coordinates, and lat₂, lon₂ are the Kaaba's fixed coordinates (21.4225°N, 39.8262°E). The result, θ, is converted from radians to degrees and normalized to a 0–360° compass bearing measured clockwise from true north. This is the exact same formula used in maritime and aviation navigation to compute the initial heading between two points on the globe.
GREAT-CIRCLE, NOT STRAIGHT LINE
Because the Earth is curved, the shortest route to Mecca often looks curved on a flat world map — this is normal and expected for great-circle navigation.
WHY IT DIFFERS BY LOCATION
Every location on Earth has its own unique shortest path to the Kaaba, so the Qibla bearing is different for almost every city in the world.
True North vs. Magnetic North
An important distinction for compass users.
Our calculator returns the bearing measured from true (geographic) north — the direction of the North Pole. Most physical compasses and many compass phone apps, however, point to magnetic north, which is offset from true north by an amount called magnetic declination. This offset varies by location: it can be negligible in some places and more than 20 degrees in others.
"A compass is a great tool, but the difference between true north and magnetic north can shift your Qibla reading by a noticeable margin depending on where you stand."
If your compass app has a "true north" mode, enable it for the most accurate alignment with the bearing shown above. If you are unsure, treat the number produced by this tool — a true-north bearing calculated directly from your coordinates — as your primary reference, and use a physical compass only as a secondary check.
Frequently Asked Questions
Common questions about the Qibla direction.
How is the Qibla direction calculated?
The Qibla direction is calculated using the great-circle initial bearing formula from spherical trigonometry. This formula takes your latitude and longitude and the Kaaba's fixed coordinates (21.4225°N, 39.8262°E) and returns the shortest compass bearing, measured from true north, that points along the Earth's surface toward Mecca.
Why does my compass app show a slightly different direction?
Most phone compasses point to magnetic north, not true north. The difference between the two, called magnetic declination, varies by location and can be anywhere from 0 to over 20 degrees. Our calculator gives you the true-north bearing; if your compass app doesn't have a 'true north' setting, expect a small deviation.
Is the Qibla direction the same everywhere in the world?
No. The Qibla is the direction of the shortest path to the Kaaba from your specific location, so it is different for almost every point on Earth. Someone in London faces roughly south-east, while someone in Jakarta faces roughly north-west, because the shortest great-circle route differs depending on where you are.
Can I use this tool without giving location access?
Yes. If you prefer not to share your device location, or your browser blocks it, you can manually enter any latitude and longitude and the tool will calculate the bearing instantly.
Does the Qibla direction change with the seasons?
No, the Qibla bearing from a fixed location never changes — it is a constant geographic bearing. What does change seasonally is where the sun appears to rise and set, which is unrelated to the Qibla calculation.
Educational Notice
This tool provides a mathematically precise geographic bearing based on your coordinates. It does not account for magnetic declination in a physical compass. For prayer in a mosque or established prayer space, always defer to the Qibla marking already provided there.
Explore more in our guides: