How the Islamic Calendar Works

A plain explanation of the Hijri calendar and how its dates are converted to Gregorian.

Where the Hijri calendar comes from

The Islamic calendar counts its years from the Hijrah, the migration of the Prophet Muhammad (peace be upon him) and his companions from Makkah to Madinah in 622 CE. The calendar itself was put in place some years later, around 17 AH (638 CE), during the caliphate of Umar ibn al-Khattab (may Allah be pleased with him).

The growing Muslim state needed a consistent way to date letters and records. After consulting the companions, Umar chose the year of the Hijrah as year one, and Muharram was kept as the first month. The first day of that first year, 1 Muharram 1 AH, corresponds to 16 July 622 in the Julian calendar.

A calendar that follows the moon

The Gregorian calendar follows the sun. The Hijri calendar follows only the moon. A month starts when the thin new crescent is first seen after sunset and lasts until the next crescent, which is 29 or 30 days later.

Twelve of these months make a year of 354 or 355 days. Other lunar-based calendars, such as the Hebrew and Chinese calendars, add an extra month every few years to stay in line with the seasons. The Islamic calendar does not, so its months move through the seasons. A person who lives a full life will fast Ramadan in the long days of summer and in the short days of winter.

Moon sighting and calculation

Traditionally, a month begins when a trustworthy witness sees the crescent on the evening of the 29th day. If it is not seen, because it is too young or the sky is cloudy, the month is completed as 30 days.

This method depends on place and weather, so different regions can begin a month on different days. To give people a calendar they can plan with, several calculated systems were developed.

  • Umm al-Qura: the official calendar of Saudi Arabia, based on astronomical calculation of the moon's position at Makkah. This site uses it.
  • Tabular (civil) calendar: a purely arithmetic system in which odd months have 30 days and even months 29, with an extra day added to the last month in 11 years out of every 30. Historians use it for older dates.
  • Local sighting: followed in Pakistan, India, Bangladesh, Morocco and other countries, where an official committee confirms each month.

How Hijri to Gregorian conversion works

Converting a date means finding the same day in the other calendar. The dependable way to do this is to count days. Every calendar date can be expressed as a running count of days from a fixed starting point. A converter turns the Hijri date into that day count, then turns the day count into a Gregorian date.

The difficult part is knowing how long each Hijri month was. For the Umm al-Qura calendar this comes from published tables of month lengths. For the tabular calendar it comes from the 30-year cycle. Once the lengths are known, the rest is arithmetic.

For a rough answer you can use a formula. Gregorian year ≈ Hijri year × 0.97 + 622. In the other direction, Hijri year ≈ (Gregorian year − 622) × 1.031. These give the year only and can be off by one near the turn of a year.

How the two calendars compare

The difference of about 11 days a year adds up. Thirty-three Hijri years are almost exactly thirty-two Gregorian years. So each Islamic occasion returns to the same point in the Gregorian calendar roughly every 33 years.

The gap between the year numbers is also shrinking. In 1 AH the difference was 621 years. Today it is about 578. Around the Gregorian year 20874 the two calendars will show the same year number.

  • Basis: Hijri is lunar, Gregorian is solar.
  • Year length: 354 or 355 days in Hijri, 365 or 366 in Gregorian.
  • Month length: 29 or 30 days in Hijri, 28 to 31 in Gregorian.
  • Start of the day: sunset in Hijri, midnight in Gregorian.
  • Year one: the Hijrah in 622 CE for Hijri, the traditional birth year of Jesus for Gregorian.

Where the Hijri calendar is used today

Muslims everywhere use the Hijri calendar to fix religious observances: the fast of Ramadan, the Hajj, the two Eids, the days of fasting in Muharram and Dhu al-Hijjah, and the lunar year after which zakat becomes due.

Saudi Arabia has long used it as an official calendar, and Hijri dates appear on its documents alongside Gregorian ones. In most other Muslim countries the Gregorian calendar is used for everyday business and the Hijri calendar for religious life, which is why converting between the two is such a common need.

More tools and guides