User Rating 0.0
Total Usage 0 times
Category Time
Adjust ±1 or ±2 for local moon sighting
Is this tool helpful?

Your feedback helps us improve.

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.

gregorian to hijri islamic calendar converter hijri date hijri calendar umm al-qura islamic date AH date converter

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 32075

Stage 2 - Julian Day Number to Hijri

L = JDN + Δd 1948440 + 10632
N = 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 NameTransliterationDaysSignificance
1مُحَرَّمMuḥarram30Sacred month; Ashura on 10th
2صَفَرṢafar29No major observance
3رَبِيع الأَوَّلRabīʿ al-Awwal30Prophet's Birthday (Mawlid) on 12th
4رَبِيع الآخِرRabīʿ ath-Thānī29No major observance
5جُمَادَىٰ الأُولَىٰJumādā al-Ūlā30No major observance
6جُمَادَىٰ الآخِرَةJumādā ath-Thāniyah29No major observance
7رَجَبRajab30Sacred month; Isra and Mi'raj on 27th
8شَعْبَانShaʿbān29Mid-Sha'ban (Laylat al-Bara'at) on 15th
9رَمَضَانRamaḍān30Month of fasting; Laylat al-Qadr ~27th
10شَوَّالShawwāl29Eid al-Fitr on 1st
11ذُو القَعْدَةDhū al-Qaʿdah30Sacred month
12ذُو الحِجَّةDhū al-Ḥijjah29 or 30Sacred 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

Frequently Asked Questions

The tabular Islamic calendar is an arithmetic approximation. Countries like Saudi Arabia, Pakistan, and Turkey rely on local or regional crescent moon sighting committees. The physical visibility of the new moon depends on latitude, longitude, atmospheric conditions, and altitude. This tool uses the standard 30-year tabular cycle. Use the day adjustment parameter (Δd of +1 or −1) to align with your local authority's declaration.
The tabular Hijri calendar follows a 30-year cycle in which 11 years have 355 days (leap) and 19 years have 354 days. The leap years within each cycle are years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, and 29. In a leap year, the 12th month (Dhū al-Ḥijjah) has 30 days instead of 29.
The algorithm is valid for any Gregorian date from 622 CE (the approximate start of the Hijri calendar, corresponding to 1 AH) onward. For dates before July 16, 622 CE, the Hijri year will compute to 0 or negative, which is historically meaningless. The tool accepts dates from year 622 to 2200 CE for practical use.
The day adjustment (Δd) is added to the Julian Day Number before the Hijri conversion. Setting Δd = +1 shifts the result forward by one day, as if the new moon was sighted one day later than the arithmetic prediction. Setting Δd = −1 does the opposite. Most users should keep it at 0 and only adjust if their local calendar authority consistently differs from the tabular calendar.
No. The Umm al-Qura calendar uses precomputed astronomical data for moon visibility at Makkah coordinates and is published by the Institute of Astronomical and Geophysical Research (KACST). This tool uses the simpler tabular (arithmetic) algorithm, which agrees with Umm al-Qura for most dates but may deviate by ±1 day around month boundaries. For Saudi government or legal purposes, consult the official Umm al-Qura tables.
This tool is designed for Gregorian-to-Hijri conversion. The reverse algorithm (Hijri-to-Gregorian) inverts the same JDN-based computation. While the underlying math is symmetric, a separate tool would be needed for validated reverse input handling.