The Islamic Hijri calendar is purely lunar, so its dates drift through the Gregorian seasons by about 11 days each year. This converter maps dates between the two systems with the widely used tabular (arithmetic) algorithm, which is deterministic and matches the calendars built into most software.
How it works
Both dates are converted through the chronological Julian Day Number (JDN), then into the target calendar:
Gregorian (y,m,d) ─► JDN ─► Hijri (y,m,d)
Hijri (y,m,d) ─► JDN ─► Gregorian (y,m,d)
The Hijri side uses the standard 30-year cycle in which years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 are leap years of 355 days; the rest have 354. Odd months are 30 days, even months 29, with Dhu al-Hijjah taking the extra leap day.
The twelve months of the Hijri calendar
| # | Month | Days (ordinary / leap) |
|---|---|---|
| 1 | Muharram | 30 |
| 2 | Safar | 29 |
| 3 | Rabi al-Awwal | 30 |
| 4 | Rabi al-Thani | 29 |
| 5 | Jumada al-Ula | 30 |
| 6 | Jumada al-Akhirah | 29 |
| 7 | Rajab | 30 |
| 8 | Shaban | 29 |
| 9 | Ramadan | 30 |
| 10 | Shawwal | 29 |
| 11 | Dhu al-Qadah | 30 |
| 12 | Dhu al-Hijjah | 29 / 30 |
In leap years Dhu al-Hijjah gains one day, taking the total year length from 354 to 355 days.
Worked examples
- 1 January 2000 → 24 Ramadan 1420 AH. Ramadan is the ninth month and falls in the middle of winter in northern latitudes in that year.
- 6 June 2026 → 20 Dhu al-Hijjah 1447 AH, placing the date in the month of Hajj.
- 1 Muharram 1446 AH → 7 July 2024 in the Gregorian calendar, marking the Islamic New Year that year.
Because the Hijri year is roughly 11 days shorter than the solar year, each Islamic date moves earlier through the Gregorian seasons by about 11 days annually. Over 33 years Ramadan completes a full cycle through all seasons.
Tabular vs. moon-sighted dates
The tabular calendar used here is a mathematical approximation of the true lunar calendar. It is reliable for civil, legal, and historical purposes, and it is what most software libraries and international organisations use. However, religious observance in most Muslim-majority countries — including the start of Ramadan, the date of Eid al-Fitr, and Eid al-Adha — is determined by the actual sighting of the new crescent moon (hilal) by local or national religious authorities.
The result from this tool may therefore differ from the announced date by one day in either direction, depending on location, weather conditions, and the criterion used (naked-eye sighting, telescope-assisted sighting, or calculated visibility). For prayer times and religious observance, always defer to the ruling of the relevant religious authority for your location.
When Gregorian-to-Hijri conversion is useful
- Historical documents: dating letters, deeds, or records that use AH years to find the corresponding Gregorian date for archives or genealogy research.
- Contract deadlines: some Islamic finance agreements express milestone dates in both calendars; conversion helps cross-check which Gregorian date corresponds to a given Hijri deadline.
- Event planning: planning around Ramadan, Hajj season, or public holidays in countries that observe the Islamic calendar alongside the Gregorian one.
- Academic research: translating dates in medieval Islamic manuscripts or historical chronicles to a common reference frame.