hijriGOYour Hijri Calendar, Smarter.

Home › Articles › How the Hijri Calendar Works: Umm al-Qura Explained

How the Hijri Calendar Works: Umm al-Qura Explained

Hijri calendar · 8 min read · Last updated:

The Hijri calendar is lunar: its months follow the Moon's cycle around the Earth, not the Sun. If you have ever wondered why Ramadan moves every year, or why today's date can differ by one day between two countries, you first need to see how this calendar is built. This article explains it step by step, then shows how the Umm al-Qura calendar used by hijriGO works, what it guarantees and what it does not.

From the Moon to the month: why 29 or 30 days?

The time between two new moons, called the synodic month, averages about 29.53 days. A calendar cannot count half a day, so a month has 29 days sometimes and 30 days at other times, keeping the average close to the real lunar cycle.

The figures bear this out. According to Umm al-Qura, the months of 1448 AH, from Muharram to Dhu al-Hijjah, last 29, 30, 29, 30, 30, 29, 30, 30, 29, 30, 29 and 30 days, a total of 355. The months of 1447 AH last 30, 29, 30, 30, 30, 29, 30, 29, 30, 29, 30 and 29 days, also 355. Notice that the pattern of long and short months is not fixed from year to year, because it follows the real crescent, not a repeating rule.

Twelve lunar months add up to about 354.37 days, so a Hijri year is 354 or 355 days, roughly eleven days shorter than a Gregorian year. We unpack the consequences in Hijri vs Gregorian calendar.

Three ways to decide when a month starts

  • Moon sighting: a month begins when the crescent is seen after sunset on the 29th evening; if it is not seen, the month is completed at 30 days. Many countries use this for fasting and festivals. It depends on place and weather, so results can differ between countries.
  • Astronomical calculation with a stated criterion: the conjunction (birth of the new moon) and the Moon's position at sunset are computed in advance, and a fixed rule decides whether the month starts. Umm al-Qura is of this kind.
  • The tabular calendar: a purely arithmetical pattern repeated every thirty years (19 years of 354 days and 11 of 355), ignoring the real Moon. It is a handy approximation for dating but can differ by a day from the other two. This site does not use it.

How does the Umm al-Qura calendar work?

Umm al-Qura is the civil Hijri calendar used in Saudi Arabia for administration and printed calendars, prepared in advance by astronomical calculation for many years. By its published criterion, the new month begins the day after the 29th if two conditions are met on that evening in Mecca: the conjunction occurs before sunset, and the Moon sets after the Sun. If not, the month is completed at thirty days.

Its strength is that it is predictable: you can know the Hijri date of any day far into the future, which is why software and browsers rely on it. Its weakness is that it is one standard based on Mecca time, so it ignores the observing conditions in other countries.

A worked example

By Umm al-Qura, 1 Ramadan 1448 AH falls on Monday 8 February 2027 and 1 Shawwal 1448 (Eid al-Fitr) on Tuesday 9 March 2027, so Ramadan lasts 29 days that year by calculation. If the crescent is sighted on a different night in your country, your official authority may announce a date that differs by one day. That is why this site calls Ramadan and Eid dates "expected" rather than "announced".

First day of each month in 1448 AH

MonthFirst day
Muharram16 June 2026
Safar15 July 2026
Rabi' al-Awwal14 August 2026
Rabi' al-Thani12 September 2026
Jumada al-Ula12 October 2026
Jumada al-Thani11 November 2026
Rajab10 December 2026
Sha'ban9 January 2027
Ramadan8 February 2027
Shawwal9 March 2027
Dhu al-Qi'dah8 April 2027
Dhu al-Hijjah7 May 2027

The gaps between these dates are uneven, 29 days from 16 June to 15 July and 30 from 15 July to 14 August, the fingerprint of a genuinely lunar calendar. Counting the years 1318 to 1500 AH (183 years, 2,196 months), 1,166 months have thirty days and 1,030 have twenty-nine; 115 of those years have 354 days and 68 have 355.

How does hijriGO compute the date?

The site uses the calendar support built into the browser (Intl with the islamic-umalqura calendar), covering 1318 to 1500 AH (about 1900 to 2076 CE). The project tests every day in that range, more than 64,000 days: each Hijri conversion returns to its original Gregorian day, every sequence of days is valid, and month lengths are always 29 or 30. The day changes at midnight on your device's clock, whereas the Islamic day begins at sunset, which the date card points out.

Limits: what the site does not guarantee

  • It does not show any country's official Hijri date and is not proof that Ramadan or Eid has started.
  • The result may differ from your country's official announcement by one day, especially at the start of Ramadan, Shawwal and Dhu al-Hijjah.
  • Dates far in the past or future are estimates because they are calculated.

That is why we offer a day adjustment (plus or minus one day) to match your country's announcement, saved in your browser only. For details read Calculation method and data source and the date accuracy disclaimer.

Reader questions

Is Umm al-Qura the "official" Hijri calendar? It is the official civil calendar in Saudi Arabia. For worship such as fasting and festivals, each country follows its own authority, which may use Umm al-Qura, sighting or another calculation.

Does the date change at sunset? In Islamic practice the day begins at sunset, but browsers and civil calendars change the date at midnight, as this site does. If you read this page after sunset, the "religious day" may be one ahead of the one shown.

What separates Umm al-Qura from the tabular calendar? The tabular calendar is arithmetic repeated over thirty years and can differ by a day in some months; Umm al-Qura rests on real astronomical calculation, which is why we prefer it.

Try it yourself

Pick any date in the Gregorian to Hijri converter or the Hijri to Gregorian converter, browse month lengths in the monthly Hijri calendar, and compare festival dates on the Islamic events page.