← Blog

qiblakompasamaliyot

The qibla: a direction and a compass

Why Tashkent’s qibla is about 240°, how al-Biruni solved it a thousand years ago, and why the compass in your phone needs a figure eight.

SBy Safa jamoasi · July 30, 2026 · 5 min read · 🤲 1 duas

Ask a friend in Tashkent to point towards Makkah and most people will point somewhere south-west, as if drawing a straight line across a school map. They will be close, but not quite right. The true direction from Tashkent starts at about 240 degrees from north — that is, about thirty degrees south of due west.

Where does the difference come from? From two things that are easy to mix up: the shape of the Earth, and the compass in your phone. This article is about both.

فَوَلِّ وَجْهَكَ شَطْرَ ٱلْمَسْجِدِ ٱلْحَرَامِ ۚ وَحَيْثُ مَا كُنتُمْ فَوَلُّوا۟ وُجُوهَكُمْ شَطْرَهُۥ

“So turn your face towards al-Masjid al-Haram. And wherever you are, turn your faces towards it” (translation of the meaning).

Qur’an 2:144

A direction on a round Earth

On a sphere, the shortest path between two places is not the straight line you would draw on a flat map. It is an arc of a great circle — a circle whose centre is the centre of the Earth, like the route a long-distance plane flies. The qibla is the direction in which that shortest arc sets off from where you stand.

From Tashkent to the Kaaba is about 3,530 kilometres along that arc, and it leaves at about 240°. If instead you follow a line of constant bearing — a straight line on the common Mercator map — you get about 231°. Nine degrees is not a lot, but it is exactly the kind of error a careful compass should not add to.

Here is the qibla, measured from true north, for several cities in Uzbekistan (rounded to the nearest degree):

  • Fergana — 245°
  • Tashkent — 240°
  • Samarkand — 240°
  • Bukhara — 236°
  • Khiva — 227°
  • Nukus — 224°

The shape of the Earth matters most where the map misleads most. In North America in the 1970s, Muslims debated whether to face south-east, as a flat map suggests, or north-east, along the great circle. Most communities eventually accepted the great-circle direction, following a 1978 book by S. Kamal Abdali.

How the qibla was found before phones

For the first generations, the qibla was often found by what historians call folk astronomy: the rising and setting points of the sun at the solstices and equinoxes, certain bright stars, even the prevailing winds. These methods were practical and close enough for daily life.

From the ninth century, Muslim mathematicians turned the question into precise geometry. Habash al-Hasib, working in Baghdad and Damascus around 850, and later scholars developed the tools of spherical trigonometry partly to answer it. Al-Biruni, born in 973 in Kath in Khwarazm — in today’s Karakalpakstan — solved the qibla problem in several independent ways in his book on the coordinates of cities, the Tahdid. By the fourteenth century, Shams al-Din al-Khalili in Damascus had compiled a table giving the qibla for 2,880 combinations of latitude and longitude.

A qibla compass decorated with views of the holy sanctuaries (Khalili Collection). Instruments like this combined a magnetic needle with tables of directions.
A qibla compass decorated with views of the holy sanctuaries (Khalili Collection). Instruments like this combined a magnetic needle with tables of directions.

There is also a beautiful natural check that anyone can use. Twice a year the sun stands directly over the Kaaba at midday in Makkah: on 27 or 28 May at 12:18 Makkah time, and on 15 or 16 July at 12:27. At that moment, all over the half of the world where it is daytime, a vertical stick’s shadow points directly away from the qibla. In Tashkent those moments are at 14:18 and 14:27 local time.

Magnetic north and true north

The qibla is calculated from true north — the direction of the geographic North Pole. A compass needle, and the magnetic sensor in your phone, point to magnetic north, which is somewhere else. The angle between the two is called magnetic declination, and it changes from place to place and slowly over the years.

According to the World Magnetic Model (WMM2025), the declination today is about 5.7° east in Tashkent, 5.3° in Samarkand and 7° in Nukus; in Moscow it is about 12°. So in Tashkent, a plain compass that ignores declination will put the qibla about six degrees off. Put the other way: on a simple magnetic compass, Tashkent’s qibla reads about 234–235°, not 240°.

Safa’s compass corrects for this: it works out the declination for your location and shows the qibla against true north.

Why the phone’s compass wanders

Your phone feels the Earth’s magnetic field with a tiny sensor called a magnetometer. That field is weak — about 54 microtesla in Tashkent. An ordinary fridge magnet is roughly a hundred times stronger, so almost anything magnetic nearby can overpower it.

  • A magnet in the phone case, a magnetic car mount or a magnetic charger.
  • A laptop, a speaker, a metal table, a reinforced concrete wall or floor.
  • The inside of a car or a lift — almost always unreliable.

The phone also carries its own small magnetic “fingerprint” from its speaker and other parts. Moving it slowly in a figure of eight lets the software measure that fingerprint from many angles and subtract it. That is why Safa asks you to trace a figure eight when the reading is poor, and keeps a small warning under the dial until the compass settles.

An ordinary magnetic compass points to magnetic north. In Tashkent that is about 5.7° east of true north.
An ordinary magnetic compass points to magnetic north. In Tashkent that is about 5.7° east of true north.

The best compass in the room

A mosque already knows the qibla: its mihrab, the niche in the front wall, was set by people who measured carefully, and the rows of worshippers follow it. When you pray in a mosque, follow the rows and leave the phone in your pocket — in that room it is the least accurate instrument.

The mihrab and minbar of the Kalon Mosque in Bukhara. The mihrab marks the qibla for everyone in the hall.
The mihrab and minbar of the Kalon Mosque in Bukhara. The mihrab marks the qibla for everyone in the hall.

And a word of calm. Classical scholars, including the Hanafi school followed in Uzbekistan, explain that someone far from Makkah is required to face the direction of the Kaaba as best they can; a few degrees do not spoil a prayer made in good faith. If you have a specific question, ask your local imam.

The qibla mission in Safa’s alarm uses the same compass: to switch the alarm off, you turn to face the qibla and hold the phone steady for a few seconds. It gets you out of bed and starts the morning with a direction. If the compass cannot be trusted, the alarm never traps you — the emergency exit is always there.

Find the qibla in Safa ↗

Sources

ShareTelegram

More to read

All posts →