Prayer Times Widget

Add calculated Islamic prayer times to your website for your city or any coordinates, using the calculation method, Asr school and high-latitude rule your community follows.

Time & Date Calculator Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/prayer-times" title="Prayer Times by A2Z Tools" width="100%" height="800" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

Each prayer is defined by the Sun's position. Dhuhr is solar noon; Sunrise and Maghrib are when the Sun's upper edge meets the horizon; Fajr and Isha are when the Sun is a set angle below the horizon, which is what distinguishes the calculation methods (for example 18 and 17 degrees for the Muslim World League, 15 and 15 for ISNA), except that Umm al-Qura and Qatar set Isha 90 minutes after Maghrib. Asr is when a shadow equals the object's noon shadow plus its height (Shafi'i, Maliki, Hanbali) or twice its height (Hanafi). The Sun's position comes from the NOAA/Meeus solar equations and each time is refined with the Sun's position at that moment. At high latitudes in summer the Sun may never go deep enough for Fajr or Isha, so a high-latitude rule assigns them a share of the night.

Calculation method

  • Hour angle for altitude a: cos H = (sin a - sin(lat) sin(decl)) / (cos(lat) cos(decl)); time = solar noon -/+ H x 4 minutes
  • Sunrise / Maghrib: a = -0.833 deg; Fajr: a = -(method Fajr angle); Isha: a = -(method Isha angle) or Maghrib + 90 min
  • Asr: a = arccot(k + tan|lat - decl|), k = 1 (standard) or 2 (Hanafi)
  • High latitudes: night = sunset to next sunrise; Fajr/Isha limited to angle/60, 1/2 or 1/7 of the night from sunrise/sunset
  • Methods: MWL 18/17, ISNA 15/15, Egypt 19.5/17.5, Umm al-Qura 18.5/90 min, Karachi 18/18, Tehran 17.7/14 (Maghrib 4.5), Kuwait 18/17.5, Qatar 18/90 min, Singapore 20/18

Times are calculated from astronomical formulas for guidance only. Local mosques may use a different method, add safety minutes or publish their own timetable; follow your local mosque or authority.

Limitations

  • Times are calculated, not taken from any mosque or authority; precautionary minutes (ihtiyat) and local fixed times are not added.
  • No elevation correction: on a hill or a high-rise, the visible sunset and Maghrib can be a minute or more later.
  • Umm al-Qura's Ramadan rule (Isha 120 minutes after Maghrib) is mentioned but not applied automatically, and there is no Hijri date.
  • Jafari midnight and Imsak are not shown, and the calculation parameters of each body can change; check the organisation's current rule.

Where publishers use it

  • Mosque and Islamic centre websites showing today's times alongside their own jamaat times
  • Community and student association sites for a city
  • Halal travel and food blogs with times for a destination
  • Ramadan pages showing Fajr and Maghrib for suhoor and iftar

Questions

Which calculation method should I choose?

The one your local mosque or national authority uses: Umm al-Qura in Saudi Arabia, Karachi in Pakistan, India and Bangladesh, ISNA in North America, Egypt in much of Africa, Muslim World League in Europe and elsewhere. Ask locally if unsure.

Why do the times differ from my mosque's timetable?

Mosques may use a different method, add a few minutes of precaution, adjust for elevation or fix times by local agreement. Use the widget as a guide and follow your mosque.

What is the high-latitude rule?

In places like the UK in summer, the Sun never goes 18 degrees below the horizon, so Fajr and Isha by angle do not exist. The rule gives them a portion of the night instead: the angle-based rule (angle/60 of the night), the middle of the night or one-seventh of the night.

How is Isha set in Ramadan with Umm al-Qura?

Umm al-Qura uses 120 minutes after Maghrib during Ramadan instead of 90. The widget uses 90 and notes the Ramadan rule.

Sources

  1. Prayer Times Calculation (methods table, Asr and high-latitude rules) - PrayTimes.org (Hamid Zarrabi-Zadeh) . Fajr/Isha angles for MWL, ISNA, Egypt, Umm al-Qura, Karachi and Tehran; Asr shadow factor; angle-based, middle-of-night and one-seventh rules
  2. Adhan calculation methods (METHODS.md) - Batoul Apps, adhan-js . Parameters for Kuwait (18/17.5), Qatar (18 / 90 min) and Singapore (20/18), and the Umm al-Qura Ramadan +30 min note
  3. NOAA Solar Calculator: calculation details - NOAA Global Monitoring Laboratory . Solar declination and equation of time behind every prayer time

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools Prayer Times
https://a2z.tools/embed/prayer-times

Preview