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
1 Ramaḍān 1448 AH, on scheme II with the civil epoch
Both ways, through a day number, with no loops
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
| Variant | Leap years in the 30-year cycle | Leap count formula | With the Thursday epoch | With the Friday epoch | Years out of 1600 where 1 Muharram differs from scheme II | Who used it |
|---|---|---|---|---|---|---|
| Scheme I | 2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29 | ⌊(11y +4)/30⌋ | 7 February 2027 | 8 February 2027 | 53 | Kūshyār ibn Labbān, Ulugh Beg, Taqī al-Dīn |
| Scheme II | 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 | ⌊(11y +3)/30⌋ | 7 February 2027 | 8 February 2027 | 0 | al-Khwārizmī, al-Battānī, the Toledan and Alfonsine tables, and Microsoft’s Kuwaiti algorithm |
| Scheme III | 2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29 | ⌊(11y +0)/30⌋ | 6 February 2027 | 7 February 2027 | 160 | the Fāṭimid / Ismāʿīlī / Bohorā calendar |
| Scheme IV | 2, 5, 8, 11, 13, 16, 19, 21, 24, 27, 30 | ⌊(11y -2)/30⌋ | 6 February 2027 | 7 February 2027 | 266 | Ḥabash al-Ḥāsib, al-Bīrūnī, Elias of Nisibis |
The twelve months, and how long the arithmetic makes them
| # | Month | Days | Days before it in the year | Leap-year exception |
|---|---|---|---|---|
| 1 | Muḥarram | 30 | 0 | — |
| 2 | Ṣafar | 29 | 30 | — |
| 3 | Rabīʿ al-awwal | 30 | 59 | — |
| 4 | Rabīʿ al-thānī | 29 | 89 | — |
| 5 | Jumādā al-ūlā | 30 | 118 | — |
| 6 | Jumādā al-ākhira | 29 | 148 | — |
| 7 | Rajab | 30 | 177 | — |
| 8 | Shaʿbān | 29 | 207 | — |
| 9 | Ramaḍān | 30 | 236 | — |
| 10 | Shawwāl | 29 | 266 | — |
| 11 | Dhū al-Qaʿda | 30 | 295 | — |
| 12 | Dhū al-Ḥijja | 29 | 325 | 30 in a leap year |
1 Muharram on the tabular calendar, scheme II with the civil epoch
| Hijri year | Tabular Gregorian date | Weekday | Days in that Hijri year | Day of the Gregorian year |
|---|---|---|---|---|
| 1440 | 12 September 2018 | Wednesday | 354 | 255 |
| 1444 | 30 July 2022 | Saturday | 354 | 211 |
| 1446 | 8 July 2024 | Monday | 354 | 190 |
| 1447 | 27 June 2025 | Friday | 355 | 178 |
| 1448 | 17 June 2026 | Wednesday | 354 | 168 |
| 1449 | 6 June 2027 | Sunday | 354 | 157 |
| 1450 | 25 May 2028 | Thursday | 355 | 146 |
| 1500 | 28 November 2076 | Saturday | 354 | 333 |
| 1600 | 6 December 2173 | Monday | 355 | 340 |
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.
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
- 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.
- 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.
- 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.
