Islamic calendar

Convert between the Hijri and Gregorian calendars, either way

There are two Islamic calendars in daily use and they do not always agree. This one is tabular: pure arithmetic, exact and reversible for any year. The other begins each month when the new crescent is actually sighted, which depends on where you are and whom you follow. They differ by a day fairly often. Nothing here pretends otherwise.

Hijri date Gregorian date Year length Leap year Next observance
The observances — tabular dates; each begins at sunset the evening before
ObservanceHijri dateBegins evening ofDaytime dateDays

Two calendars, and which one this is

The Islamic month begins with the new crescent moon. What counts as the beginning depends on which question you are asking. The observed calendar begins the month when the crescent is actually sighted — which is a fact about the sky, the weather, your longitude and the authority you follow, and which cannot be known in advance. The tabular calendar replaces sighting with arithmetic: a thirty-year cycle containing eleven leap years, months alternating thirty and twenty-nine days, and nothing to observe.

This page computes the tabular calendar. It is exact, it reverses cleanly, and it will tell you the date of Ramadan in 2094. It is also not what a mosque will announce, and the two commonly land a day apart and occasionally two. Anyone planning around a religious observance should take the announcement, not a calculator — including this one.

That is worth saying plainly because the alternative is worse: a converter that prints a single confident date and never mentions that a different, equally correct answer exists.

Why Ramadan moves through the seasons

Twelve lunar months come to about 354 days, eleven short of a solar year, and the Islamic calendar makes no attempt to close the gap. There is no leap month — the leap day in a leap year is a single day added to Dhu al-Hijjah to keep the arithmetic aligned with the Moon, not with the Sun. So the whole calendar walks backwards through the seasons by roughly eleven days a year and returns to the same place after about thirty-three.

This is a design choice rather than a shortcoming, and it is the clearest difference from the Hebrew calendar, which is also lunar but inserts a thirteenth month seven times in nineteen years precisely to stay locked to the seasons. Two lunar calendars, opposite answers to the same problem.

A day begins at sunset here too

As with the Hebrew calendar, an Islamic day runs from sunset to sunset, so every observance in the table begins the evening before the daytime date shown beside it. The 1st of Ramadan listed as a Wednesday begins on the Tuesday evening. Both columns are given rather than one.

Questions

Is this the same calendar my mosque uses?
Probably not exactly. This is the tabular Islamic calendar, which replaces crescent sighting with arithmetic and is therefore exact and computable centuries ahead. The observed calendar begins each month when the new crescent is actually seen, which depends on location, weather and the authority followed, and cannot be known in advance. The two commonly differ by a day and occasionally by two. For anything that matters religiously, take the announcement rather than a calculator, including this one.
Why does Ramadan move earlier every year?
Because twelve lunar months come to about 354 days, eleven short of a solar year, and the Islamic calendar makes no attempt to close that gap. There is no leap month. The leap day added to Dhu al-Hijjah in eleven years out of thirty keeps the arithmetic aligned with the Moon, not with the Sun. So the calendar walks backwards through the seasons by roughly eleven days a year and comes back round after about thirty-three.
How exact is the conversion?
Exact, in the sense that the tabular calendar is a closed piece of arithmetic with nothing to approximate: a thirty-year cycle with eleven leap years, months alternating thirty and twenty-nine days, and only Dhu al-Hijjah varying. The conversion reverses cleanly for every month start over any century tested. The uncertainty in an Islamic date is not in this arithmetic; it is in whether you want the tabular calendar or the observed one.
Which tabular variant is this?
The civil variant, sometimes called the Kuwaiti algorithm, with leap years at positions 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 of each thirty-year cycle. Other intercalation patterns exist and shift some dates by a day. The epoch is 1 Muharram 1 AH, which is Friday 16 July 622 in the Julian calendar — pinned in the test suite from both directions, because an epoch that is one day out produces a calendar that is one day out everywhere and no round-trip check would notice.
Does the Islamic day start at midnight?
No, at sunset, as in the Hebrew calendar. Every observance in the table begins the evening before the daytime date shown beside it: the 1st of Ramadan listed as a Wednesday begins on Tuesday evening. Both columns are given here rather than one, because they are two different facts and picking one silently is how a converter misleads someone who was counting on it.