How Iftar Time Is Calculated, and Why Two Apps Disagree

Iftar is Maghrib: the moment the sun's disc has completely set at your latitude and longitude. It is computed from your coordinates and the date, with the sun's centre placed about 0.83 degrees below the flat horizon to allow for the sun's own width and for atmospheric refraction. Most differences between apps come from small safety margins and from using different coordinates for the same city.

Get Namaz Time on Google Play

Namaz Time calculates Maghrib on your phone from your own coordinates, and lets you nudge it to match your masjid. Free, works offline.

The one number behind Iftar

Sunset is a geometry problem with a well-known answer. Given your latitude, your longitude and the day of the year, the sun's declination and the equation of time fix where the sun sits in the sky at any instant, and sunset is the moment its upper edge touches the horizon. Because the sun is a disc rather than a point, and because the atmosphere bends its light upward near the horizon, the calculation puts the sun's centre roughly 0.83 degrees below the geometric horizon at that moment. Everything else is arithmetic.

What the calculation needs

  • Latitude and longitude. Longitude sets the clock time of sunset; latitude sets how fast it drifts through the year.
  • The date, which gives the sun's declination and the equation of time.
  • Your time zone and whether daylight saving is in force on that date.
  • A horizon correction, the 0.83 degrees above, and optionally your elevation if you are well above the surrounding land.
  • A safety margin, where the publisher adds one to three minutes after geometric sunset.

Nothing in that list needs the internet, which is why a prayer app can produce the whole month's timetable on the device once it knows where you are.

Why two apps show a different Iftar

  • Coordinates. A city is not a point. The two apps may be using the city hall, the airport or your GPS fix, and 20 km east is about a minute earlier.
  • Safety minutes. Some methods add 1–3 minutes after sunset so that Maghrib is never announced early.
  • Definition. Sunni practice generally takes Maghrib at sunset; Shia practice waits until the redness has left the eastern sky, roughly 15 to 20 minutes later.
  • Elevation and horizon. An app that accounts for altitude will give a later sunset on a hill than one that assumes sea level.
  • Rounding. Rounding down versus to the nearest minute produces a one-minute gap that looks like an error and is not.
  • Time zone data. Around a daylight-saving change, a stale time zone database is worth a full hour of confusion.

How much does your exact location matter?

CityIftar, first fastIftar, last fastAverage fast
Delhi (Delhi)6:06 pm6:25 pm12 h 52 min
Mumbai (Maharashtra)6:35 pm6:46 pm13 h 2 min
Lucknow (Uttar Pradesh)5:53 pm6:11 pm12 h 53 min

Three cities in one country and one time zone, and the Iftar times are minutes apart because they sit at different longitudes and latitudes. Over the month, Iftar in Delhi moves 19 minutes later between the first fast and the last, which is why a single printed time for a whole state is only ever an approximation.

What this site calculates with

Where you areMethod used for Fajr and Maghrib
India, Pakistan, BangladeshUniversity of Islamic Sciences, Karachi (Fajr at 18°)
Saudi ArabiaUmm al-Qura University, Makkah (Fajr at 18.5°)
UK, Europe, AustraliaMuslim World League (Fajr at 18°, Isha at 17°)
United States and CanadaMoonsighting Committee (18° / 18° with seasonal adjustment)
Indonesia and Malaysia20° / 18° (Kemenag / JAKIM)

These are the same defaults the Namaz Time app applies by region, so a timetable on this site and the one on your phone agree.

Match your masjid, do not argue with it

If your masjid announces Iftar a minute or two after your app, it is almost certainly a deliberate margin rather than a mistake. The practical answer is to adjust your app to your masjid's time and then stop thinking about it: the congregation breaking its fast together is worth more than a minute of precision. Namaz Time lets you shift each prayer individually for exactly this reason.

Timetables worked out this way

Questions

Is Iftar at sunset or at Maghrib?
In the majority Sunni view they are the same moment: the fast is broken when the sun has fully set, which is when Maghrib enters. Some methods add a one to three minute margin.
Why is my app's Iftar a minute different from the mosque?
Usually a safety margin or slightly different coordinates for the same city. Adjust the app to match your masjid.
Can prayer times be calculated without the internet?
Yes. Sunset depends only on your coordinates, the date and your time zone, so the whole month can be computed on the device.
Does altitude change Iftar time?
Slightly. From a high vantage point the sun sets a little later, so apps that use elevation show a later Maghrib.
Why does Iftar get later every day in Ramadan?
Because the days are lengthening through February and March in the northern hemisphere. In Delhi, Iftar moves 19 minutes later between the first fast and the last.
Get the free Namaz Time app

Sehri and Iftar for your city, azan alarms that ring on every phone, Qibla, offline. Or see the timetable for your city and when Ramadan starts.

Who publishes this

Each line links to where you can verify it, with the date we last read it. We do not publish reviews, customer names or sales figures here.

  • Every Android app we publish is listed under one Google Play developer account. Source: Google Play developer page, read .

More from the blog

Dates follow the Umm al-Qura calendar and can differ by a day where the month starts after local moon sighting. For religious questions, ask your imam.