Namaz Waqt

Qibla direction finder

The Qibla bearing from any place, from your phone's location or typed coordinates, with the formula and a compass arrow.

The defaults are Hyderabad. Press "Use my location" on a phone to fill in where you are.

How the bearing is calculated

The Qibla is the direction of the shortest path over the Earth's surface to the Kaaba in Makkah, whose position is taken as 21.4225° N, 39.8262° E. From a point at latitude φ1 and longitude λ1, with the Kaaba at φ2, λ2 and Δλ = λ2 − λ1, the initial bearing from true north is

θ = atan2( sin Δλ × cos φ2 , cos φ1 × sin φ2 − sin φ1 × cos φ2 × cos Δλ )

measured clockwise from north, with 0° north, 90° east, 180° south and 270° west. This is the standard great-circle bearing; it is what the astronomical tables used by mosques are built on.

Worked example

Hyderabad (17.385° N, 78.4867° E). Δλ is 39.8262 − 78.4867 = −38.66°. Working through the formula gives θ = 282.7°, which is west with a lean to the north: a little more than a quarter turn past west towards north-west. Pune comes out at 281.0° and Delhi at 266.6°, so across most of India the Qibla is west and slightly north, and the further north you are, the more directly west it points.

Using it with a phone compass

Where your location goes

Nowhere. "Use my location" asks your browser for the phone's coordinates and fills the two boxes on this page. The calculation runs on your device; we keep no log of it.

Updated 2026-09-16. The bearing is from true north. A phone compass points to magnetic north and can be thrown off by metal nearby; use the number to check a mosque's direction, not to replace it.