Qibla direction finder
Computed using the great-circle initial bearing formula, not a straight line on a flat map — from most locations those disagree noticeably. The bearing is relative to true north; a magnetic compass needs adjusting for magnetic declination at your location, which varies by place and drifts over time and is not attempted here. Coordinates are only used in your browser for this calculation.
What it calculates
The Qibla is the direction Muslims face in prayer, toward the Kaaba in Mecca (21.4225 N, 39.8262 E). This works out the compass bearing from your location to that point using the great-circle initial bearing formula - the same spherical trigonometry used for aircraft and ship navigation, not a straight line on a flat map, which would point the wrong way over any real distance.
Why a straight line on a map is wrong
The Earth is a sphere, and a map is flat, so the shortest real path between two points is a curve on the map, not a straight line. From a location like New York or Tokyo, drawing a ruler line to Mecca on a standard map gives a noticeably wrong bearing. The great-circle formula accounts for the sphere and gives the true shortest-path direction.
Getting your location
Use "detect my location" to read your coordinates from the browser's geolocation, which asks permission first and is never read without it, or type a latitude and longitude directly if you already know them or want to check a specific place. Coordinates are used only in this calculation, in your browser - nothing is sent to a server or stored.
Reading the result
The bearing is given in degrees clockwise from true north (0-360), plus the distance to the Kaaba, so the number can be checked against a compass or a mapping app. True north, not magnetic north - a compass reading needs adjusting for magnetic declination at your location, which this does not attempt to do since it varies by place and drifts over time.
Related tools
See also the distance between two latitude/longitude points calculator.
Rate this tool
Was this tool useful? Your feedback helps us improve it.