← All posts

How prayer times are calculated

The sun, a few angles and a shadow. What the 12 calculation methods in Quba mean, and how to match your mosque.

Prayer times are tied to the sun. Quba works them out on your phone from your location and the date, using the open-source Adhan library. No server is involved, so it works offline.

The five times

  • Fajr begins with true dawn, when light first spreads along the horizon while the sun is still below it.
  • Dhuhr begins just after the sun passes its highest point.
  • Asr begins when a shadow has grown by a set amount beyond its length at noon.
  • Maghrib begins at sunset.
  • Isha begins when the twilight has gone from the sky.

Dhuhr and Maghrib are straightforward to calculate. Fajr and Isha depend on how dark the sky must be, and that is where the methods differ.

Why there are different methods

Scholars and institutions have measured dawn and dusk in different regions and set the sun's angle below the horizon that marks them. Some examples:

Method Fajr Isha
Muslim World League 18° 17°
Egyptian General Authority 19.5° 17.5°
Umm al-Qura, Makkah 18.5° 90 minutes after Maghrib

A larger angle means an earlier Fajr and a later Isha. Far from the equator, especially in summer, the difference between methods can be large.

Quba offers 12 methods and picks one automatically for your country, for example Umm al-Qura in Saudi Arabia, Diyanet in Turkey and the Moonsighting Committee in the UK and North America. You can change it at any time in the prayer settings.

Asr: standard or Hanafi

For Asr, most schools use the time when a shadow equals the length of its object plus its shadow at noon. The Hanafi school uses twice the object's length, which makes Asr later. Quba supports both.

Matching your mosque

Mosques sometimes add a few minutes of caution, or follow a printed timetable. If your mosque's times differ slightly from the app's, you can adjust any single prayer by a few minutes so the two match.