Skip to content
Online Compass

Qibla Direction Finder: Accurate Bearing to the Kaaba

Find the initial great-circle bearing from your coordinates to the Kaaba in Mecca. The Qibla finder shows true and magnetic bearings, distance, and a live direction on supported phones.

3060120150210240300330NNEESESSWWNW
waiting for sensors
Qibla bearing
—
Needs your position
Magnetic bearing
—
Needs your position
Distance to Makkah
—
Declination
—
Difference between magnetic and true north here
Compass accuracy
—
Needs a live compass
Phone tilt
—
Flat enough

Your position

The Qibla direction depends entirely on where you are, so this tool needs your coordinates.

How this bearing is calculated

The Qibla is the great-circle direction to the Kaaba (21.4225° N, 39.8252° E), the shortest path across the surface of the Earth. On a flat map that path looks curved, which is why the bearing from Europe or North America points much further north than people expect.

How this Qibla finder calculates your direction

The Qibla is the direction of the Kaaba at Masjid al-Haram in Mecca. This page uses the Kaaba coordinates 21.4224779° N, 39.8251832° E and your latitude and longitude to calculate the initial great-circle bearing. A great circle is the shortest path between two points on a sphere.

The calculation matters because a flat map can make the shortest direction look wrong across long distances. From much of North America, the great-circle route to Mecca begins northeast even though Mecca appears southeast on some rectangular maps. The result is a true bearing measured clockwise from geographic north.

Your coordinates remain in the browser while the tool performs the trigonometry. You can allow location access or enter coordinates manually. The tool also calculates the great-circle distance to the Kaaba as useful context.

  1. 1

    Set your location

    Allow GPS access or enter latitude and longitude manually.

  2. 2

    Read the Qibla angle

    Use true bearing for a map and magnetic bearing with a physical compass.

  3. 3

    Face the bearing

    Follow the live dial, or use the sun or moon reference when no magnetometer is available.

Using your phone's compass to face the Qibla

On a phone with a usable magnetometer, the dial places the Qibla marker on the compass rose. Hold the screen facing up, keep the top edge pointed forward, and turn until the fixed index aligns with the marker. Move away from steel furniture, vehicles, speakers, magnetic cases, and power equipment before relying on the heading.

Phone compass accuracy depends on hardware, calibration, tilt, and local interference. If the marker jumps or north looks wrong, move the phone through a gentle figure-eight and compare it with a known direction. The compass calibration guide explains these checks.

A device without a magnetometer can still calculate the Qibla angle. This page uses the computed position of the sun or moon as a visible true-north reference. The sun compass also shows current solar azimuth, elevation, sunrise, and sunset.

Qibla direction by city

A city name alone does not enter a position because Online Compass does not send a place search to a geocoding provider. Use your device location for your actual coordinates, or copy trusted city coordinates into the manual fields.

The Qibla angle changes continuously as you move around Earth. Two cities in the same country can have slightly different bearings, and a value copied from a distant city may be unsuitable for precise building alignment. Permanent mosque construction requires appropriate local surveying and religious guidance.

Location accuracy and compass accuracy are separate. An approximate city coordinate can still produce a stable bearing, while a magnetometer beside metal can point incorrectly. Check both the coordinate source and the physical heading. If your device has no compass sensor, follow the guide to finding Qibla without a compass.

Magnetic vs. true bearing for Qibla

True bearing uses the geographic North Pole. Magnetic bearing uses the direction a physical compass needle points. The angle between them is magnetic declination, which varies by place and changes with time.

This tool evaluates the bundled WMM2025 model for your position. It applies local declination to show the bearing a magnetic compass should use. Select true for maps, satellite images, and building plans. Select magnetic for a baseplate compass.

For the underlying field value and bearing conversion, use the magnetic declination calculator. Its visible result includes the model validity and sign convention.

Frequently asked questions

Is this Qibla direction accurate?

The great-circle calculation is deterministic from the supplied coordinates. Practical pointing accuracy depends on location accuracy, phone calibration, tilt, and nearby magnetic interference.

What if I don't have a compass?

The Qibla angle still works. Use the page's sun or moon reference, the sun compass, a map aligned to true north, or a known local mosque direction.

Why does my Qibla direction change by location?

Every starting point has a different initial great-circle bearing to the Kaaba. The change may be small nearby and much larger across countries or continents.

How is the Qibla angle calculated?

The tool calculates the initial bearing of the shortest great-circle route from your latitude and longitude to the Kaaba's coordinates.

More free tools

Learn how to use these readings in our navigation guides.