Azanly calculates prayer times using a location’s latitude and longitude, a calendar date, a time-zone offset and a set of calculation parameters. This page explains how our current calculator works, which defaults it uses and where its results need additional local verification.
Our schedules are calculated estimates. They are not a live feed of mosque announcements or an official timetable for every country. For congregation times and locally adopted prayer or fasting schedules, consult your mosque or religious authority.
The information used in each calculation
- Location: the coordinates stored for the selected city or locality. These represent a reference point, not your exact address or device location.
- Date: the Gregorian date used for the calculation. The position of the sun changes throughout the year, so the schedule is calculated separately for each date.
- Calculation preset: Fajr and Isha parameters selected automatically from the country code.
- Time-zone offset: an offset from UTC obtained for the selected time zone and calculation date.
The engine uses approximate solar-declination and equation-of-time formulas to estimate solar noon and the sun’s position before and after it. It does not incorporate your building height, local terrain, an obstructed horizon or real-time atmospheric measurements. Displayed times are rounded to the nearest minute; this display precision is not a guarantee of one-minute accuracy.
How each displayed time is calculated
Fajr
Fajr is calculated for the morning when the sun reaches the depression angle specified by the selected preset. The angle is measured below the horizon. Different twilight-angle choices can produce different Fajr times for the same city and date.
Sunrise
Sunrise uses a solar zenith angle of 90.833°, equivalent to the sun’s centre being approximately 0.833° below the geometric horizon. It is shown as a reference event alongside the five daily prayers, not as a sixth obligatory prayer.
Dhuhr
The current engine uses calculated solar noon for Dhuhr. It does not add a separate precautionary delay after solar noon. A local timetable that includes such a delay can therefore show a later time.
Asr
Asr uses a shadow factor of 1: an object’s shadow reaches its height plus its shadow at solar noon. This setting applies across all current presets, including Karachi. The active calculator does not switch automatically to the factor-2 Asr calculation commonly associated with the Hanafi convention.
Maghrib and sunset
Azanly’s current Maghrib calculation is different from its sunset calculation. Sunset is calculated with the same 90.833° zenith threshold used for sunrise. Maghrib is calculated when the sun is 4.5° below the horizon in the evening, across all presets.
Where both events can be calculated, this places Maghrib after sunset. A timetable that starts Maghrib at sunset will therefore differ. Do not assume that Azanly’s Maghrib label is interchangeable with sunset or with your local authority’s iftar time.
Isha
Most presets calculate Isha using an evening twilight angle. The preset labelled UmmAlQura instead adds 90 minutes to Azanly’s calculated Maghrib. In the active calculation path, this interval remains 90 minutes during Ramadan; it does not change to 120 minutes.
Calculation presets used by Azanly
The values below describe the parameters implemented in our calculator. The preset names are labels for those settings, not a claim that Azanly reproduces every rule, adjustment or published timetable of the institution associated with a name.
- Tehran: Fajr 17.7°; Isha 14°.
- ISNA: Fajr 15°; Isha 15°.
- MWL: Fajr 18°; Isha 17°.
- Egypt: Fajr 19.5°; Isha 17.5°.
- Karachi: Fajr 18°; Isha 18°.
- UmmAlQura: Fajr 18.5°; Isha 90 minutes after the calculated Maghrib.
All angular values in this list are solar depression angles below the horizon. The Maghrib and Asr settings explained above remain the same across these presets.
How the default preset is selected
The calculator uses the following country-based defaults. These are Azanly’s software settings; they should not be read as a list of official national methods or proof that every mosque in a country uses the same convention.
- Tehran: Iran.
- UmmAlQura: Saudi Arabia, United Arab Emirates, Qatar, Kuwait, Jordan, Lebanon and Syria.
- Egypt: Egypt, Libya, Sudan, Tunisia, Algeria and Morocco.
- Karachi: Pakistan, Bangladesh, India and Afghanistan.
- ISNA: United States, Canada and United Kingdom.
- MWL: all remaining country codes, including Turkey, Malaysia, Indonesia, Singapore, France, Germany, Spain and Italy.
City pages identify the selected calculation preset. A country-based default cannot represent every local mosque, school of jurisprudence or regional religious authority.
Local time, daylight saving and the displayed date
The current calculator obtains candidate time zones from PHP’s time-zone database using the country code. For countries with several zones, it chooses the zone whose reference coordinates are closest to the city in a simple latitude-and-longitude comparison. It then obtains that zone’s UTC offset for the calculation date.
This approach can account for daylight-saving rules recorded for the chosen zone. However, choosing the nearest reference point is an approximation: it does not check the actual time-zone boundary and can select the wrong zone, particularly near borders. Results also depend on the time-zone data installed on the server. If no suitable country time zone is found, the current calculation falls back to a zero-hour UTC offset.
City-specific time-zone records are being prepared, but the reviewed calculation path does not yet use them. Adding a time-zone identifier to the location database alone does not change the calculation.
There is also a current date-handling limitation: the main city timetable defaults to the server’s calendar date, which can differ from the city’s date around midnight. The seven-day table uses separately supplied dates, while the selected-city timetable on a country page uses a date derived from its selected time zone. Check the displayed date as well as the city when comparing schedules.
City schedules, country pages and the seven-day table
Two cities can share the same official clock time and still have different prayer schedules because their coordinates differ. There is no single prayer timetable that applies to an entire country.
Where a country page includes a selected-city timetable, it applies only to the named city. Open your own city page for the relevant schedule.
The seven-day table calculates each of the next seven dates separately using the city’s coordinates and the same preset. It does not simply repeat today’s times. The same calculation and time-zone limitations apply to those results.
High latitudes and unavailable solar events
At some latitudes and seasons, the sun may not reach a required twilight angle, or normal sunrise and sunset may not occur. The active calculation path does not apply a high-latitude adjustment such as an angle-based, middle-of-the-night or one-seventh-of-the-night rule.
Unavailable results are not yet reliably distinguished from clock times by the current formatting layer. A displayed value such as 00:00 must not automatically be treated as a valid prayer time. For these locations and dates, use a locally adopted timetable from a qualified religious authority.
How the Qibla direction is calculated
The city Qibla card uses the city’s stored coordinates and an approximate Kaaba reference point at 21.422487° N, 39.826206° E. It calculates the initial great-circle bearing on a spherical Earth model.
The result is measured clockwise from true north: 0° is north, 90° east, 180° south and 270° west. It is not a magnetic-compass bearing and does not apply a magnetic-declination correction. It also represents the stored city location rather than your exact position. See our Qibla Finder guide for help using a direction.
Why a mosque or another app may show different times
Differences can come from twilight angles, Asr shadow factors, sunset versus a later Maghrib threshold, precautionary minute adjustments, coordinates, time zones or high-latitude rules. A mosque’s iqamah time is also a separate congregation schedule and may be later than the calculated beginning of a prayer period.
Compare the same city, date, calculation settings and type of time before drawing conclusions. Differences are not always only a matter of rounding: a wrong location, date or time zone can cause a much larger discrepancy.
Checking a possible error
If a result appears incorrect, record the city-page URL, displayed date, affected prayer, displayed calculation preset and the local timetable you are comparing it with. Include the reference source and whether its time is a prayer-start time or an iqamah time. Those details help distinguish a calculation-setting difference from a location or time-zone error.
This methodology describes the calculation code reviewed on 20 October 2026. It should be updated when the active calculation settings, time-zone selection or handling of exceptional dates changes.
