The Islamic Hijri calendar, explained
Updated September 7, 2026 · My Birthday Almanac

The Islamic, or Hijri, calendar is the timekeeping system of the Muslim world — the one that sets Ramadan, the two Eids and the Hajj. Unlike the Gregorian calendar it is purely lunar, which is why Islamic dates move through the seasons over the years. Here is how it works and how a Gregorian birth date converts to it.
Where the Hijri era begins
The calendar counts from the Hijrah — the Prophet Muhammad's migration from Mecca to Medina in 622 CE — which is why years are written with the suffix AH (Anno Hegirae, “in the year of the Hijrah”). Year 1 AH began in that year.
A purely lunar year
Each Hijri month follows the cycle of the Moon and lasts either 29 or 30 days. Twelve of them add up to about 354 days — roughly eleven days shorter than the solar year. That gap is why the whole calendar drifts about 11 days earlier against the Gregorian calendar each year, and why Ramadan slowly rotates through every season over a cycle of roughly 33 years.
The twelve Hijri months
In order, the months are:
- 1. Muharram — one of the four sacred months; its 10th day is Ashura.
- 2. Safar
- 3. Rabi al-Awwal — associated with the Prophet's birth (Mawlid).
- 4. Rabi al-Thani
- 5. Jumada al-Awwal
- 6. Jumada al-Thani
- 7. Rajab — a sacred month.
- 8. Shaban
- 9. Ramadan — the month of fasting.
- 10. Shawwal — begins with Eid al-Fitr.
- 11. Dhul-Qadah — a sacred month.
- 12. Dhul-Hijjah — the month of the Hajj; it includes Eid al-Adha.
Moon sighting vs. the tabular calendar
Traditionally, a new month begins when the crescent Moon is physically sighted, so the exact start can vary by a day from country to country. For civil and computing purposes a tabular (arithmetic) calendar is used instead, which fixes month lengths by a formula. The two usually agree to within about a day.
How a birth date is converted
To convert a Gregorian date to Hijri, it is first turned into a Julian Day Number — a continuous count of days used in astronomy — and then mapped onto the tabular Hijri sequence. That is the method the age calculator uses to show your Hijri day, month and year; because it is the arithmetic version, it may differ by a day from a local moon-sighting announcement.
Related reading
The Hijri calendar is lunar; for the solar and sidereal systems the almanac also converts your birthday into, see the Desi Bikrami calendar and the 27 Vedic Nakshatras.