Servinza logoservinza / tools

Qibla Direction Finder

Find the Qibla direction (bearing to Mecca) from your city or current location. Free to use, no signup required for occasional use.

Calculated using the great-circle bearing formula to the Kaaba. Note some phone compasses default to magnetic, not true, north.

What is the Qibla Direction Finder?

The Qibla Direction Finder calculates the precise compass bearing you need to face toward the Kaaba in Mecca from any location on Earth, using the great-circle bearing formula. Because the Earth is a sphere, the shortest and most accurate direction to Mecca isn't a straight line on a flat map but a great-circle path, calculated using spherical trigonometry based on your location's latitude and longitude and Mecca's fixed coordinates. This tool lets you either select your city from a list of major Pakistani cities or use your browser's geolocation to get your exact coordinates, then computes the bearing angle in degrees from true north. The result tells you exactly how many degrees to rotate from north (measured clockwise) to face the Qibla, which you can then apply using a physical compass or a compass app on your phone. This is especially useful when traveling, setting up prayer space in a new home or office, or double-checking the Qibla direction in an unfamiliar city.

How to use it

Choose whether to select your city from the dropdown of major Pakistani cities or click 'Use my location' to let your browser detect your current coordinates via geolocation (you'll need to allow location access when prompted). Once your location is set, the tool calculates the great-circle bearing from your coordinates to the Kaaba's coordinates in Mecca and displays the result as a degree value measured clockwise from true north, along with a simple visual compass indicator. To use the result physically, hold a compass flat, find true north, and rotate until you're facing the calculated bearing angle. If you're using a phone compass app, be aware that some apps show magnetic north rather than true north, which can introduce a small offset depending on your location.

Frequently asked questions

How accurate is the calculated Qibla direction?

The great-circle bearing calculation is mathematically precise for your entered coordinates. Real-world accuracy then depends on how precisely you align a physical or phone compass to true north.

Why does my phone compass show a different direction than expected?

Many phone compass apps default to magnetic north rather than true north, and magnetic declination varies by location, which can cause a small but noticeable offset from the calculated bearing.

Do I have to allow location access to use this tool?

No, you can instead select your city from the provided dropdown list if you'd rather not share your precise browser location.

What coordinates does this tool use for Mecca?

It uses the widely accepted coordinates of the Kaaba in Mecca as the fixed destination point for the great-circle bearing calculation.

Related tools