Islamic calendar

Convert between the Hijri and Gregorian calendars, either way

—

The observances, each beginning at sunset the evening before its daytime date
ObservanceHijri dateBegins evening ofDaytime dateDays
How this was counted
Hijri date— Gregorian date— Year length— Leap year— Next observance—

The tabular calendar's epoch, its 11-in-30 leap cycle and 1,200 month starts are tested on every build. How it is checked

Choose a direction and enter a Gregorian date or a Hijri date: the page converts it and lists the observances of that Hijri year, with the evening each one begins. It uses the tabular Islamic calendar, which is pure arithmetic, so every conversion is exact and reversible for any year.

Two calendars, and which one this is

The Islamic month begins with the new crescent moon, and the two Islamic calendars in daily use settle that beginning in different ways, so they do not always agree. The observed calendar begins the month when the crescent is sighted, which depends on the sky, the weather, your longitude and the authority you follow, so it 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 converts back cleanly, and it can give you the date of Ramadan in 2094. It is not the calendar a mosque announces, and the two commonly land a day apart and occasionally two. If you are planning around a religious observance, go by the announcement your community follows.

Why Ramadan moves through the seasons

A year of twelve lunar months lasts about 354 days, eleven days less than a solar year, and the Islamic calendar does not add a month to make up the difference. In a leap year it adds a single day, to Dhu al-Hijjah, and that day keeps the months in step with the Moon. So the whole calendar moves backwards through the seasons by roughly eleven days a year and returns to the same place after about thirty-three years.

The drift is by design, and it is the clearest difference from the Hebrew calendar. That calendar is also lunar, but it inserts a thirteenth month seven times in nineteen years to stay in step with the seasons.

A day begins at sunset here too

An Islamic day runs from sunset to sunset, as a Hebrew day does. So each observance starts on the evening before its daytime date, and the table prints both, in the Begins evening of and Daytime date columns.

Questions

Is this the same calendar my mosque uses?
Probably not exactly. This is the tabular Islamic calendar, which replaces crescent sighting with arithmetic, so its dates are exact and can be computed centuries ahead. The other calendar, the observed one, waits for the new crescent to be seen, so its months depend 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, the announcement decides, whatever a calculator says, this one included.
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 has no leap month to close that gap. The leap day added to Dhu al-Hijjah in eleven years out of thirty keeps the arithmetic in step with the Moon and does nothing for the Sun. So each Ramadan starts roughly eleven days earlier in the Gregorian year than the one before, and the calendar comes back round to the same season after about thirty-three years.
How exact is the conversion?
Exact. The tabular calendar is closed arithmetic with nothing to approximate. Its thirty-year cycle holds eleven leap years, its months alternate thirty and twenty-nine days, and only Dhu al-Hijjah varies. The test suite converts all 1,200 month starts from 1400 to 1499 AH to Gregorian dates and back, and every one returns to the day it started from. Any uncertainty in an Islamic date comes from the choice between the tabular calendar and 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. The test suite checks that date two independent ways, because an epoch one day out would put every date one day out, and no round-trip check would notice.
Does the Islamic day start at midnight?
No. It starts 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. The table prints both dates because they are two different facts, and someone counting on one of them needs to know which it is.