Gregorian to Hijri Date Converter
Convert any Gregorian (CE) date to Hijri (Islamic/AH) calendar date instantly. Supports day adjustment, Arabic month names, and day-of-week output.
About
The Islamic (Hijri) calendar is a purely lunar system of 12 months totaling 354 or 355 days per year. Because it is approximately 11 days shorter than the Gregorian solar year, Hijri dates drift through the seasons on a 33-year cycle. Incorrect conversion leads to wrong scheduling of Ramadan, Hajj, and legal contract dates in jurisdictions that use the Hijri calendar for official records. This tool implements the tabular Islamic calendar algorithm, computing the Julian Day Number JDN from a Gregorian input and then deriving the Hijri year YH, month MH, and day DH arithmetically. A day adjustment parameter Δd allows you to account for local moon-sighting differences, which commonly vary by ±1 to ±2 days between countries.
This converter approximates the standard tabular calendar assuming a 30-year leap cycle with 11 leap years. Actual observed Hijri dates in Saudi Arabia, Iran, or other regions may differ by 1 - 2 days due to local crescent sighting committees. For legal or religious obligations, always verify with your local authority.
Formulas
The conversion proceeds in two stages. First, the Gregorian date is converted to a Julian Day Number JDN. Then JDN (adjusted by Δd) is converted to a Hijri date.
Stage 1 - Gregorian to Julian Day Number
JDN = INT(1461 × (Y + 4800 + INT(M − 1412))4) + INT(367 × (M − 2 − 12 × INT(M − 1412))12) − INT(3 × INT(Y + 4900 + INT(M − 1412)100)4) + D − 32075Stage 2 - Julian Day Number to Hijri
L = JDN + Δd − 1948440 + 10632N = INT(L − 110631)
L = L − 10631 × N + 354
J = INT(10985 − L5316) × INT(50 × L17719) + INT(L5670) × INT(43 × L15238)
L = L − INT(30 − J15) × INT(17719 × J50) − INT(J16) × INT(15238 × J43) + 29
MH = INT(24 × L709)
DH = L − INT(709 × MH24)
YH = 30 × N + J − 30
Where Y, M, D are the Gregorian year, month, and day. YH, MH, DH are the resulting Hijri year, month, and day. Δd is the user-specified day adjustment (typically 0, ±1, or ±2). INT denotes the integer floor function.
Reference Data
| Month # | Arabic Name | Transliteration | Days | Significance |
|---|---|---|---|---|
| 1 | مُحَرَّم | Muḥarram | 30 | Sacred month; Ashura on 10th |
| 2 | صَفَر | Ṣafar | 29 | No major observance |
| 3 | رَبِيع الأَوَّل | Rabīʿ al-Awwal | 30 | Prophet's Birthday (Mawlid) on 12th |
| 4 | رَبِيع الآخِر | Rabīʿ ath-Thānī | 29 | No major observance |
| 5 | جُمَادَىٰ الأُولَىٰ | Jumādā al-Ūlā | 30 | No major observance |
| 6 | جُمَادَىٰ الآخِرَة | Jumādā ath-Thāniyah | 29 | No major observance |
| 7 | رَجَب | Rajab | 30 | Sacred month; Isra and Mi'raj on 27th |
| 8 | شَعْبَان | Shaʿbān | 29 | Mid-Sha'ban (Laylat al-Bara'at) on 15th |
| 9 | رَمَضَان | Ramaḍān | 30 | Month of fasting; Laylat al-Qadr ~27th |
| 10 | شَوَّال | Shawwāl | 29 | Eid al-Fitr on 1st |
| 11 | ذُو القَعْدَة | Dhū al-Qaʿdah | 30 | Sacred month |
| 12 | ذُو الحِجَّة | Dhū al-Ḥijjah | 29 or 30 | Sacred month; Hajj on 8th - 12th; Eid al-Adha on 10th. 30 days in leap years. |
| Leap years in the 30-year cycle: 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 | ||||