November 20, 2026 · Everyday Math · 10 min read
Two Calendars, One Date: How Hijri–Gregorian Conversion Works
The Gregorian calendar tracks the sun; the Hijri (Islamic) calendar tracks the moon. Both count days faithfully, but their years disagree — which is why converting between them is genuinely a calculation, not just a relabeling.
Why the calendars drift apart
A lunar month — one new moon to the next — averages about 29.53 days, so twelve lunar months come to roughly 354 days. The solar year is about 365.24 days. The gap of about 11 days per year means every Hijri date moves about 11 days earlier in the Gregorian calendar each year, completing a full cycle of the seasons roughly every 33 Gregorian years. Ramadan, fixed in the lunar calendar, therefore rotates through spring, winter, autumn and summer over a lifetime — while a Gregorian anniversary like December 25 stays in the same season forever.
Calculated calendars vs. moon sighting
Because the new moon isn't visible everywhere at the same time, Muslim communities have historically announced month starts after local sighting. For civil purposes, though, countries need dates decided in advance. The Umm al-Qura calendar — the official civil calendar of Saudi Arabia and the most widely referenced tabular Hijri calendar — precomputes month lengths so planners, airlines and software can agree on dates years ahead. A converter built on Umm al-Qura, like the one in your browser's internationalization system, may differ from a local moon-sighting announcement by a day; that's expected, not an error.
Month lengths and the missing day 30
Hijri months have 29 or 30 days, depending on when the following new moon falls. When you enter day 30 for a month that Umm al-Qura assigns only 29 days, the date simply doesn't exist — a good converter rejects it and suggests day 29 rather than silently shifting. The twelve months run Muharram, Safar, Rabiʻ al-awwal, Rabiʻ al-thani, Jumada al-ula, Jumada al-akhirah, Rajab, Shaʻban, Ramadan, Shawwal, Dhu al-Qiʻdah and Dhu al-Hijjah.
What conversion is used for
- Religious planning: finding the Gregorian dates of Ramadan, Eid al-Fitr and Eid al-Adha for the years ahead.
- Official paperwork: documents issued in Gulf countries often carry Hijri dates that need a Gregorian equivalent for visas, contracts and insurance forms.
- Anniversaries: checking Islamic commemorations against your everyday calendar.
- Curiosity: knowing today's date in both systems at a glance.
One more wrinkle worth knowing: reliable tabular conversion covers roughly Hijri years 1300–1600 — Gregorian years from the late 1800s to the late 2100s. Outside that window, honest tools warn you instead of inventing an answer.
Counting time the other way? Age Math: How Old Are You in Days, Hours and Minutes? explores exact age from a date of birth.
Common mistakes in Hijri–Gregorian conversion
- Expecting astronomical precision from the tabular calendar. The Islamic calendar used in software (the "tabular" or civil Kuwaiti algorithm) alternates 29- and 30-day months in a fixed 30-year cycle. Actual moon sighting can shift the start of a month by a day — and different countries often declare Ramadan or Eid on different days. A converter gives the arithmetic calendar, not the announced religious date.
- Assuming the Hijri year is exactly 354 days. Tabular years alternate between 354 and 355 days (11 leap years per 30-year cycle), averaging about 354.37. Multiplying "years × 354" accumulates an error of months over centuries.
- Ignoring the epoch offset details. The Hijri era begins with the migration (Hijra) in 622 CE, but day 1 Muharram 1 AH corresponds to 19 July 622 CE in the tabular reckoning (16 July in the astronomical variant). Off-by-one-day confusion at the epoch is one of the oldest problems in this conversion.
- Treating the day boundary as midnight. Traditional Islamic days start at sunset, not midnight. A date "as of evening" can belong to the next calendar day in the religious reckoning — matters for planning events that span the boundary.
- Not validating the month name against the day number. Every Hijri month has 29 or 30 days — never 31. If a conversion returns 31 days in a month, something is wrong in the pipeline (usually a library using a generalized calendar).
Frequently asked questions
Why does the Hijri year drift about 11 days earlier each year against the Gregorian?
The lunar year of about 354.37 days is roughly 10.9 days shorter than the solar year of 365.24 days. Nothing in the Islamic calendar adds leap months to re-align with the seasons (unlike the Hebrew calendar), so Islamic dates cycle through all seasons every ~33 years. That is why Ramadan moves through winter and summer across a lifetime — by design, so fasting is practiced in every season.
Which variant does the calculator use, and can I trust it for religious dates?
The calculator uses the widely implemented tabular (arithmetic) calendar, the same basis as most software libraries and the Kuwaiti algorithm. It is reliable for everyday conversion of historical and administrative dates. For religious observance, the announced date in your community or country takes precedence — moon sighting committees can and do declare a day different from the tabular computation.
How do I express a Hijri date correctly in writing?
Standard form is day, month name, then year with AH (Anno Hegirae): "14 Ramadan 1447 AH" corresponds to roughly mid-March 2026. Note that a single Hijri date spans two Gregorian dates (it begins at sunset), which is why formal documents sometimes state both. When precision matters — legal or archival — record the calendar system explicitly; a bare "3/9/1447" is ambiguous to readers outside the tradition.
Can I find my Hijri birthday, or an anniversary in advance?
Yes, and it is a genuinely interesting calculation: enter your Gregorian birth date and read the Hijri equivalent — that Hijri date then recurs each year roughly 11 Gregorian days earlier. For anniversaries tied to the Islamic calendar (weddings, memorial dates), run the Hijri date forward year by year to get the matching Gregorian dates for planning. Just remember the ±1 day moon-sighting caveat near month starts.
Why do some libraries differ by a day from each other?
Implementations differ on epoch convention (16 vs 19 July 622 CE), on the leap-year distribution within the 30-year cycle, and on whether the day boundary is midnight or sunset. The differences are all defensible historically, which is why two reputable sources can disagree by exactly one day on a boundary date. When a one-day difference matters, choose one authoritative implementation and stick to it consistently across your records.