Hijri to Gregorian Converter (Tabular Islamic Calendar)

Hijri to Gregorian Converter (Tabular Islamic Calendar)

Hijri ⇄ Gregorian through the Julian day number, with all four published 30-year intercalation schemes and both epochs — because they disagree by up to three days. NOT a religious date: Ramadan and Eid depend on sighting the crescent, not on arithmetic.

Tabular Hijri ⇄ Gregorian, with the variant named

A date in either calendar → the other, plus the weekday
1 to 1600 AH, which spans 622 CE to about 2174 CE. Outside that range the page will not answer.
Odd-numbered months have 30 days and even-numbered ones 29, except the twelfth in a leap year, which has 30.
623 to 2170 CE, the range the Hijri years 1 to 1600 cover.
There is more than one tabular Islamic calendar and they disagree by a day in about a fifth of years. Scheme II is the one Microsoft’s Hijri calendar and most software use.
The two differ by exactly one day, always. The civil epoch is the commoner choice.
Two figures, neither a circuit. The top one is the 30-year cycle laid out as two rows of fifteen years, with the leap years drawn TALLER — they are the years of 355 days, in which Dhū al-Ḥijja gets a thirtieth day. Change the scheme in the dropdown and watch which cells are tall: that is the entire difference between the four published tabular calendars, eleven long years in thirty either way, and it is enough to move a date by a day. The tick below the row marks where your own Hijri year sits in the cycle. The lower figure is the drift, and it is drawn from scheme II: the Gregorian day of the year on which 1 Muḥarram falls, for thirty-four consecutive Hijri years running down the page. It marches steadily leftwards at about eleven days a year and wraps round when it passes January — which is why the Islamic year travels through the seasons and completes a full circuit in about 33.6 years, instead of being held in place by an intercalary month.
8Example

1 Ramaḍān 1448 AH, on scheme II with the civil epoch

Advertisement

Both ways, through a day number, with no loops

JDN = epoch + 354(y−1) + ⌊(11y + c)/30⌋ + ⌈29.5(m−1)⌉ + d − 1
y = ⌊(30n + 10649 − c)/10631⌋  ·  m = min(12, ⌊nyear/29.5⌋ + 1)  ·  weekday = JDN mod 7
epoch
1948439 for 15 July 622 CE Julian (the Thursday epoch) or 1948440 for 16 July (the Friday, civil epoch)
c
the intercalation offset that names the scheme: 4, 3, 0 or −2 for schemes I to IV. It reproduces each published leap-year set exactly
n
days elapsed since the epoch
JDN
Julian Day Number, the continuous day count astronomers use. Both calendars convert through it, and the weekday falls out of it for free

Worked example

1 Ramaḍān 1448 AH, on scheme II with the civil epoch
Completed years: 1447 × 354 = 512,238 days
Leap days in them: ⌊(11 × 1448 + 3)/30⌋ = ⌊15,931/30⌋ = 531
Completed months before Ramaḍān: ⌈29.5 × 8⌉ = 236 days
So the Julian day number is 1,948,440 + 512,238 + 531 + 236 + 0 = 2,461,445
Which converts to 8 February 2027, a Monday — because 2,461,445 mod 7 is 0. Change the scheme or the epoch and the answer moves: the eight variants put this date between 6 and 8 February 2027. And it is NOT the date Ramaḍān will begin, which depends on the crescent

Four tabular calendars, and what each makes of 1 Ramadan 1448

VariantLeap years in the 30-year cycleLeap count formulaWith the Thursday epochWith the Friday epochYears out of 1600 where 1 Muharram differs from scheme IIWho used it
Scheme I2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29⌊(11y +4)/30⌋7 February 20278 February 202753Kūshyār ibn Labbān, Ulugh Beg, Taqī al-Dīn
Scheme II2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29⌊(11y +3)/30⌋7 February 20278 February 20270al-Khwārizmī, al-Battānī, the Toledan and Alfonsine tables, and Microsoft’s Kuwaiti algorithm
Scheme III2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29⌊(11y +0)/30⌋6 February 20277 February 2027160the Fāṭimid / Ismāʿīlī / Bohorā calendar
Scheme IV2, 5, 8, 11, 13, 16, 19, 21, 24, 27, 30⌊(11y -2)/30⌋6 February 20277 February 2027266Ḥabash al-Ḥāsib, al-Bīrūnī, Elias of Nisibis
The four schemes come from R.H. van Gent’s survey at Utrecht University and they are all genuinely published calendars, not variants somebody invented. All four put eleven leap years in thirty, so all four give a mean year of exactly 10631/30 = 354.366667 days; they differ only in WHICH years are long. That is enough to move a date by one day in 319 of the 1600 years — about a fifth. On top of that the two epochs differ by exactly one day, always. Take the eight combinations of scheme and epoch and 1 Ramadan 1448 lands anywhere from 6 February 2027 to 8 February 2027 — a three-day spread before any question of sighting the moon arises. This page defaults to scheme II with the civil epoch, which is what Microsoft’s Hijri calendar and most software use, and it names the choice rather than hiding it.

The twelve months, and how long the arithmetic makes them

#MonthDaysDays before it in the yearLeap-year exception
1Muḥarram300—
2Ṣafar2930—
3Rabīʿ al-awwal3059—
4Rabīʿ al-thānī2989—
5Jumādā al-ūlā30118—
6Jumādā al-ākhira29148—
7Rajab30177—
8Shaʿbān29207—
9Ramaḍān30236—
10Shawwāl29266—
11Dhū al-Qaʿda30295—
12Dhū al-Ḥijja2932530 in a leap year
Odd months 30 days, even months 29, twelfth month 30 in a leap year. The fourth column is ⌈29.5 × (m − 1)⌉, which is how the alternation is expressed in one formula — and it is also the giveaway that this is a calendar of arithmetic rather than of observation. A real lunar month is 29.530589 days, so real months run 29 or 30 days in a pattern that is not a simple alternation and that cannot be predicted exactly from a rule. The tabular mean month is 29.5305556 days, which is 2.9 seconds short of the true synodic month — a difference that takes about 2,502 Hijri years to accumulate a single day. The arithmetic is excellent. It is simply not the same thing as looking.

1 Muharram on the tabular calendar, scheme II with the civil epoch

Hijri yearTabular Gregorian dateWeekdayDays in that Hijri yearDay of the Gregorian year
144012 September 2018Wednesday354255
144430 July 2022Saturday354211
14468 July 2024Monday354190
144727 June 2025Friday355178
144817 June 2026Wednesday354168
14496 June 2027Sunday354157
145025 May 2028Thursday355146
150028 November 2076Saturday354333
16006 December 2173Monday355340
The last column is the drift, and it is the most striking thing about the calendar: the Islamic year is 354.367 days against the Gregorian 365.2425, so it arrives 10.88 days earlier each Gregorian year and works its way right round the seasons in about 33.6 Hijri years. That is why Ramadan moves through the calendar rather than sitting in one season, and it is a feature of a purely lunar calendar rather than a defect. IMPORTANT: these are TABULAR dates. Saudi Arabia’s Umm al-Qura calendar puts 1 Muharram 1447 on 26 June 2025 where the tabular calendar says 27 June, and observed dates elsewhere may differ again. The tabular column is arithmetic; the observed one is a fact about the sky and about who was looking.

Arithmetic, not observation — and the difference matters

Read this first: the date this page gives you is not a religious date, and must not be used as one. What it computes is the TABULAR Islamic calendar — a purely arithmetic scheme, built so that dates can be calculated in advance and reproduced by anyone. The dates of Ramadan, of Eid al-Fitr and Eid al-Adha, and of every other observance are not fixed by arithmetic. They depend on the actual sighting of the new crescent, which varies with where you are standing, with the weather, and with the authority whose judgement your community follows. Tabular dates can be a day or two early or late against any of those, and different countries routinely begin the same month on different days. If you need to know when Ramadan starts, ask your local mosque or religious authority. Nothing on this page can answer that, and it is not an oversight — it is what the difference between a calculation and an observation means.

What the tabular calendar is. Twelve lunar months of alternating 30 and 29 days, giving a 354-day year, with a thirtieth day added to the twelfth month in eleven years out of every thirty. Eleven long years in thirty puts 10,631 days in the cycle and gives a mean month of 29.5305556 days — within 2.9 seconds of the true synodic month of 29.530589 days, which means the arithmetic takes about 2,502 Hijri years to drift a single day from the mean moon. That is a remarkably good approximation, and it is still not the same as looking at the sky, because the real moon is not on a mean orbit.

There is more than one tabular calendar, and this page makes you choose. R.H. van Gent’s survey at Utrecht University lists four published 30-year intercalation schemes. All four have eleven leap years; they disagree about which. Scheme II — long years at 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 — is the commonest, and is what Microsoft’s Hijri calendar implements, the “Kuwaiti algorithm” in Windows. Scheme I moves the sixth long year from 16 to 15; scheme III is the Fāṭimid calendar; scheme IV is Ḥabash al-Ḥāsib’s and al-Bīrūnī’s. On top of that there are two epochs, 15 and 16 July 622 CE in the Julian calendar, the Thursday and the Friday, and they differ by exactly one day. Take the eight combinations and a single Hijri date can land on three different Gregorian days. This page defaults to scheme II with the civil epoch and prints the spread so you can see how much the choice is worth.

How the arithmetic is done, since this calculator has no loops. Both directions go through the Julian Day Number, the running count of days used in astronomy, and both are closed forms. Forward: the day number is the epoch, plus 354 days for each completed year, plus ⌊(11y + c)/30⌋ for the leap days, plus ⌈29.5(m − 1)⌉ for the completed months, plus the day. The offset c is what distinguishes the four schemes: 4, 3, 0 and −2 respectively, and that single number reproduces each published leap-year set exactly. Backwards, the year is ⌊(30n + 10649 − c)/10631⌋, where n is the day count from the epoch; the offset 10649 was found by search and then verified, and the whole inverse was checked against a day-by-day walk for every day of every Hijri year from 1 to 1600, for all four schemes and both epochs — four and a half million dates, with no disagreement. The Gregorian side uses the standard integer conversions, round-tripped over two million consecutive day numbers and checked against Python’s own calendar for good measure.

The Gregorian calendar has a hole in it, and this range crosses it. The Gregorian reform skipped ten days: Thursday 4 October 1582 in the Julian calendar was followed by Friday 15 October in the Gregorian, and many countries did not change over until much later — Britain and its colonies in 1752, Russia in 1918. Hijri year 1 begins in 622 CE, which is 960 years before the reform, so most of this page’s range is in Julian-calendar territory. The page handles it by giving both: the PROLEPTIC Gregorian date, which extends the modern rules backwards and is what software means by a date, and the JULIAN calendar date, which is what a historian or a contemporary document would use. For 622 CE they are three days apart; the page prints the gap for whatever date you give it. For any date after 15 October 1582 the two answers are the same thing and the Julian rows are just curiosities.

What else this page does not do. It is not the Umm al-Qura calendar, the astronomical calendar Saudi Arabia uses for civil purposes, which is computed from new-moon times and a visibility criterion rather than from a 30-year cycle and which typically differs from the tabular date by a day. It is not any national civil calendar. It does not know about local sighting announcements, which is the whole point. For week numbering and day-of-week arithmetic in the Gregorian calendar see the ISO week number calculator; for clock time as a decimal, the time to decimal hours converter.

Advertisement

Frequently asked questions

Can I use this to find out when Ramadan starts?

No, and please do not. This page computes the tabular Islamic calendar, which is arithmetic. The start of Ramadan depends on the sighting of the new crescent, which varies by country and by local authority and can differ from the tabular date by one or two days. Ask your local mosque or the religious authority your community follows. What this page is good for is ordinary date conversion: reading a Hijri date on a document, working out someone’s approximate Gregorian birth year, dating a historical event.

Why does this page give a different date from my phone?

Almost certainly because your phone uses the Umm al-Qura calendar, which is astronomical rather than tabular, or a sighting-based calendar for your country. The tabular calendar is typically a day away from Umm al-Qura: for 1 Muharram 1447 the tabular scheme II date is 27 June 2025 and Umm al-Qura gives 26 June. It may also be that your phone uses one of the other three intercalation schemes, or the other epoch, both of which this page lets you select.

How many tabular Islamic calendars are there?

Four published intercalation schemes and two epochs, so eight combinations. All four schemes put eleven leap years in a 30-year cycle; they disagree about which years. They differ on the date of 1 Muharram in about a fifth of years, and the two epochs differ by exactly one day always. Scheme II with the civil epoch — the default here — is what Microsoft’s Hijri calendar and most software use, and is often called the Kuwaiti algorithm.

Why does the Islamic year move through the seasons?

Because it is purely lunar, with no intercalary month to hold it against the solar year. Twelve lunar months is 354.37 days against the Gregorian 365.243, so each Hijri year starts about 10.9 days earlier in the Gregorian calendar than the last, and the cycle comes round in roughly 34 Hijri years. The Hebrew calendar avoids this by adding a thirteenth month in seven years out of nineteen; the Islamic calendar does not, deliberately.

How accurate is the 30-year cycle?

As a model of the mean moon, very. Eleven long years in thirty gives 10,631 days for 360 months, a mean month of 29.5305556 days, which is 2.9 seconds short of the true synodic month — about one day of drift in 2,502 Hijri years. But the real moon is not on a mean orbit: individual months run 29 or 30 days in a pattern the cycle cannot capture, which is why an observed calendar and a tabular one can differ by a day or two in any given month even though they agree over centuries.

What date is Hijri year 1?

1 Muharram AH 1 is 16 July 622 CE in the Julian calendar on the civil epoch, which was a Friday — and this page confirms the weekday from the day number rather than taking it on trust. The astronomical epoch puts it on 15 July 622, a Thursday. In the proleptic Gregorian calendar the civil epoch is 19 July 622, three days later, because the two calendars had diverged by three days by then.

Does this handle dates before the Gregorian reform of 1582?

Yes, and it tells you both answers. For any date before 15 October 1582 it gives the PROLEPTIC Gregorian date — the modern rules run backwards, which is what software means by a date — and also the JULIAN calendar date, which is what a contemporary document would say. The two are three days apart in 622 CE and ten days apart just before the reform. Note that many countries changed over much later: Britain in 1752, Russia in 1918.

What is the Julian Day Number the page shows?

A continuous count of days used in astronomy, starting from a conventional origin in 4713 BCE. It is how both conversions are actually done: any calendar date becomes a day number, and any day number becomes a date in any calendar. It is also the reason the day of the week is exact — the weekday is the day number modulo seven, with no calendar rules involved at all.

What range of dates does this cover?

Hijri years 1 to 1600, which is 622 CE to about 2174 CE, and Gregorian years 623 to 2170. Outside that the page returns nothing rather than extrapolating. The limit is a deliberate one: the closed-form inverse was verified exhaustively over exactly that range, and a conversion that has not been checked is not one to publish.

Related calculators

References

  1. van Gent, R.H., Utrecht University. The Islamic Calendar — Tabular Islamic calendar variants (webspace.science.uu.nl/~gent0113). Fetched. The source for the four 30-year intercalation schemes used here, with their exact leap-year sets and the authorities that used each: scheme I (Kūshyār ibn Labbān, Ulugh Beg), scheme II (al-Khwārizmī, al-Battānī, the Toledan and Alfonsine tables, and Microsoft’s Hijri calendar), scheme III (the Fāṭimid calendar) and scheme IV (Ḥabash al-Ḥāsib, al-Bīrūnī). It also gives the two epochs: 15 July 622 CE, “astronomical or Thursday”, and 16 July 622 CE, “civil or Friday”. Both weekdays are confirmed here from the Julian day numbers 1948439 and 1948440.
  2. Wikipedia, Tabular Islamic calendar. “The odd numbered months have 30 days and the even numbered months have 29 days, except in a leap year when the 12th and final month Dhu al-Hijjah has 30 days”; eleven leap years in a 30-year cycle at years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 “in its most common form”; “Microsoft’s Kuwaiti algorithm is used in Windows”; and the sentence this page exists to carry: dates from the tabular calendar “can occur one or two days too early or too late” against the calendars actually used for religious purposes.
  3. ISO 8601-1:2019, Date and time — Representations for information interchange — Part 1: Basic rules, edition 1, published February 2019, with Amendment 1:2022 (technical corrections). It replaced ISO 8601:2004, and a further edition is in development. The standard is paywalled and was not read; the number, title, date and replacement record above are from ISO’s own catalogue entry, which was fetched. Its week-date rule is reproduced from the free sources below and checked against 335,000 dates.