Kaaba direction from my location
Tap the button below and this page works out the Kaaba direction from your location — the exact bearing to the Kaaba in Makkah, in degrees clockwise from true north, together with the distance. Your coordinates stay on your device: the bearing is computed in your browser and sent nowhere.
How to find the Kaaba direction from your location
- Allow location access. Press the button above; your browser asks once for permission. Nothing is stored and nothing is uploaded — the coordinates are read, used for one calculation, and discarded when you close the page.
- Read the bearing. The number shown is degrees clockwise from true north: 0° is north, 90° east, 180° south, 270° west.
- Turn on the live compass. On a phone that reports its heading, the needle rotates as you turn, so you can simply face it. On iOS you must press Enable live compass first — Apple requires a deliberate tap before a page may read the magnetometer.
- Face the needle and check it. If the direction contradicts what you know of your surroundings — a mosque nearby, a prayer niche in the room — work through the section below before trusting it.
If the direction looks wrong
Almost every disagreement between this page and a physical compass comes from one of five things.
True north against magnetic north
The bearing here is measured from true north — the geographic pole. A handheld compass and a phone's compass sensor both point at magnetic north, which can sit as much as 20° away from true north depending on where you are on the planet. If you are transferring the number to a physical compass, apply your local magnetic declination; if the phone's own needle is used, the page has already accounted for it where the device reports true heading.
Metal, magnets and electronics
A magnetometer reads the magnetic field around it, and a car body, a desk frame, a laptop, a speaker or a magnetic phone case all distort that field. Step away from them and take the reading again. Steel-framed and reinforced-concrete buildings can bend the field across a whole room; near a window or outdoors is reliably better than the middle of a floor.
An uncalibrated compass
If the needle drifts, wanders or settles slowly, the sensor needs calibrating. Move the phone in a figure-of-eight through the air a few times, then take the reading again.
A location fix that is not yours
Without GPS — on a desktop, or with location services restricted — the browser falls back to estimating your position from your network, which can be tens of kilometres out and, behind a VPN, in the wrong country entirely. That error barely moves the bearing if you are thousands of kilometres from Makkah, but it matters a great deal nearby. Turn off the VPN and use a device with GPS if the position reported looks wrong.
No compass in the device
Most laptops and many tablets have no magnetometer at all, so the needle cannot follow your heading. The bearing itself is still exact — read it as a number and apply it with a compass or by the sun.
Finding the Kaaba direction without a working compass
Two methods need no sensor:
- By the sun. At solar noon the sun is due south in the northern hemisphere and due north in the southern, and a vertical object's shadow lies on the opposite line. That gives you true north directly, with no magnetic correction to make; count the bearing round from it.
- By a known bearing near you. The qibla bearings table lists the direction and distance to the Kaaba for cities worldwide, and every city prayer-times page states its own. Within a city the bearing changes by a fraction of a degree, so a nearby city's figure is a sound fallback when your own position cannot be fixed.
Does this work offline?
Yes, once the page has been opened. The calculation is a great-circle bearing between two points, performed on your device — there is no lookup and no server to reach. The location fix itself is what may need a signal: GPS works without a data connection, network-based positioning does not. The Android app stores the last fix so the direction remains available with no connection at all.
Common questions
How do I find the Kaaba direction from my current location?
Press the button at the top of this page and allow location access. Your browser reports your coordinates, and the page returns the great-circle bearing from that point to the Kaaba at 21.4225° N, 39.8262° E, in degrees from true north, plus the distance in kilometres. On a phone with a compass the needle then tracks your heading so you can face it directly.
Is the Kaaba direction the same thing as the qibla?
Yes. The qibla is defined as the direction of the Kaaba in Makkah; "Kaaba direction" and "qibla direction" name the same bearing. The explanation of the qibla sets out where the direction comes from and how it is established.
Why does the bearing change when I travel?
Because it is a direction between two points on a sphere, and one of them moves with you. Crossing a continent can swing it by tens of degrees. Over a few kilometres the change is a fraction of a degree and invisible in practice — which is why a city-level bearing is a reasonable substitute, but a bearing taken in another country is not.
Why does the needle point north-east if Makkah is south-east of me?
Because the shortest path between two points on a globe is not a straight line on a flat map. From most of North America and northern Europe the great-circle route to Makkah runs north of east, even though a rectangular world map suggests otherwise. The bearing shown here is the great-circle one.
Does this page store or send my location?
No. The coordinates are read by your browser, used for one calculation in the page, and never transmitted or written to storage. Closing the page discards them.
What should I do if I still cannot establish the direction?
Face the direction you judge most likely to be correct, after making a genuine effort to establish it — a compass reading, the position of the sun, or the bearing for the nearest city on this site. This site does not issue rulings; for what is required of you when the direction is uncertain, ask a qualified scholar or your local mosque.