Qibla Direction Finder (Compass Bearing & Distance to Makkah)

Qibla direction toward the Holy Kaaba in Makkah (21.4225° N, 39.8262° E) is calculated using the spherical great-circle initial bearing formula (Forward Azimuth), which determines the shortest path across the Earth’s curved surface measured in degrees clockwise from True North (0°).

  • Runs on your device
  • Keyboard-first
  • Free, no sign-up

Geographic Coordinates (For Custom Location)

Between -90° (South) and +90° (North)

Between -180° (West) and +180° (East)

Qibla Bearing from True North

—

Exact Qibla Azimuth Angle
—
Compass Quadrant Direction
—
Great-Circle Distance to the Kaaba
—
Evaluated Location Coordinates
—

Calculated on your device. Nothing you type is sent anywhere.

Cite
APA: Mr. Behairy. (2026). Qibla Direction & Distance Calculator. Anubis Calc. https://calculatoranubis.com/en/qibla-finder
MLA: Mr. Behairy. "Qibla Direction & Distance Calculator." Anubis Calc, 2026, https://calculatoranubis.com/en/qibla-finder.
Embed

Copy this snippet to embed this calculator on your site or blog for free:

<iframe src="https://calculatoranubis.com/en/embed/qibla-finder" width="100%" height="520" style="border:0;border-radius:18px" loading="lazy" title="Qibla Direction & Distance Calculator"></iframe>
<p><a href="https://calculatoranubis.com/en/qibla-finder" rel="noopener">Qibla Direction & Distance Calculator — Anubis Calc</a></p>

How it works

Facing the Qibla (the direction of the Sacred Mosque and the Kaaba in Makkah) is a prerequisite for the validity of Islamic prayer. Because the Earth is an oblate sphere rather than a flat map, the shortest line to Makkah follows a Great Circle arc rather than a straight rhumb line on a flat Mercator map. This astronomical calculator computes the exact initial bearing (azimuth) in degrees from True North, the 8-point compass direction, and the great-circle distance in kilometers.

Reference Table: Qibla Bearing & Distance to Makkah for Major Cities

The table below lists the clockwise angle from True North (0°), the general compass quadrant, and the direct geodesic distance to the Kaaba:

CityQibla Angle from NorthCompass DirectionDistance to the Kaaba
Cairo (Egypt)136.19°Southeast (SE)1,283 km
Alexandria (Egypt)135.53°Southeast (SE)1,465 km
Riyadh (Saudi Arabia)243.92°Southwest (SW)791 km
Dammam (Saudi Arabia)246.30°West-Southwest (SW)1,196 km
Madinah (Saudi Arabia)176.94°Almost Due South (S)339 km
Dubai (UAE)258.42°West-Southwest (W)1,613 km
Kuwait City (Kuwait)224.85°Southwest (SW)1,203 km
Amman (Jordan)160.69°South-Southeast (SE)1,231 km
Rabat (Morocco)94.64°Almost Due East (E)4,757 km
London (United Kingdom)118.99°East-Southeast (SE)4,794 km
New York (United States)58.48°Northeast (NE)10,306 km

Spherical Trigonometry Formula for Qibla Azimuth

Given your location’s latitude φ1 and longitude λ1, the Kaaba’s coordinates φ2 = 21.4225° N and λ2 = 39.8262° E, and the longitude difference Δλ = λ2 − λ1, the initial bearing θ is computed by:

tan(θ) = sin(Δλ) ÷ [ cos(φ1)·tan(φ2) − sin(φ1)·cos(Δλ) ]

Worked Example (Finding the Qibla with a Compass in London or Cairo):
  • In Cairo, the Qibla bearing is 136.19°. Hold your compass flat away from metal objects, align the needle with North (0°), and turn clockwise to 136° (halfway between East 90° and South 180°).
  • In London, the Qibla bearing is 118.99° (about 29° south of due East), at a direct distance of 4,794 km from the Kaaba.

Why Is the Qibla in North America Toward the Northeast (58.5°)?

Many travelers in New York, Toronto, or Chicago are surprised that the astronomical Qibla points Northeast (~58°) even though Makkah is at a lower latitude on a flat wall map. On a 3D globe, the shortest flight path (Great Circle) from New York to Makkah curves northeastward over the North Atlantic and Europe before descending toward the Arabian Peninsula.

Check the five daily prayer times for your city in the /en/prayer-times-calculator, view today’s Hijri calendar date on /en/todays-date, and convert any date between calendars using the /en/hijri-converter.

Sources & assumptions

The Holy Kaaba center coordinates are fixed at 21.4225° N latitude and 39.8262° E longitude (WGS84 datum).,Bearings are reported clockwise from True Geodetic North (0° = North, 90° = East, 180° = South, 270° = West).,Great-circle distance is computed using the Haversine formula with a mean Earth radius of 6,371 km.

Reviewed by: Mr. Behairy (Accountant, Financial Auditor & Tax Specialist) · Editorial policy · Formulas reviewed:

Frequently asked questions

How do I read the Qibla degree on a physical or phone compass?

On any 360-degree compass dial, 0° is North, 90° is East, 180° is South, and 270° is West. Once your compass points to North (0°), rotate clockwise to the exact degree shown by the calculator (for example, 136° in Cairo or 119° in London).

What is the difference between True North and Magnetic North?

This calculator provides the bearing from True Geographic North (used by GPS and smartphone map apps). If you use a traditional magnetic needle compass, account for your local magnetic declination (typically 2° to 5° in the Middle East).

Does a slight deviation of a few degrees invalidate prayer for someone far from Makkah?

Islamic jurists agree that someone who cannot see the Kaaba is obligated to face the general direction (Jihah / Shatr) of the Sacred Mosque rather than hitting the exact millimeter of the building; a minor deviation of a few degrees does not affect prayer validity.

How can I verify the Qibla using the sun without any compass (Qibla Day)?

Twice every year—on May 28 at 12:18 PM Makkah time (09:18 UTC) and July 16 at 12:27 PM Makkah time (09:27 UTC)—the sun passes directly overhead at the zenith of the Kaaba. Anyone who faces the sun at that exact moment anywhere in the daytime world is facing the Qibla with 100% accuracy.

How do I calculate the Qibla for my exact house or hotel coordinates?

Select "Custom Coordinates (Enter Lat & Lng Below)" in the city dropdown, then paste your Latitude and Longitude from Google Maps or Apple Compass.