The Short Answer
The tabular Hijri calendar, the one that software uses when it needs a Hijri date without looking at the sky, repeats every 30 years. Those 30 years hold 360 months and 10,631 days, which means 11 of the 30 years are leap years with one extra day.
The number 30 is not arbitrary. We tested every cycle of whole Hijri years from 1 to 100 years against the real length of the lunar month. The 30-year cycle is the first one that comes within 17 minutes of 360 real months. Nothing shorter does better, and the next cycle that beats it is 79 years long. The price of the shortcut is small: the calendar's average month is 2.9 seconds shorter than the Moon's, so it drifts a whole day out of step with the Moon only about every 2,500 years.
The Problem
The Moon takes 29.530589 days, on average, to go from one new moon to the next. A calendar month has to be a whole number of days, so the months are 29 or 30 days long. The simplest rule alternates them: 30, 29, 30, 29 and so on. Six of each give a year of 354 days.
Twelve real months last 12 x 29.530589 = 354.367 days. The calendar year is short by 0.367 of a day, which is 8 hours and 49 minutes. After three years the calendar has drifted a whole day away from the Moon. So some years need an extra day, a leap day, added to the last month (Dhul-Hijjah). The question is how often.
Counting the Error
Pick a cycle of N whole years. It holds 12N lunar months, which last 12N x 29.530589 days: a number with a fraction. The calendar has to round it to a whole number of days. The difference is the error that builds up in each cycle.
We tried every cycle from 1 to 100 years. These are the ones that were more accurate than every shorter cycle:
| Years | Months | Days in the cycle | Leap days | Error per cycle |
|---|---|---|---|---|
| 1 | 12 | 354 | 0 | 8 h 49 min short |
| 2 | 24 | 709 | 1 | 6 h 23 min long |
| 3 | 36 | 1,063 | 1 | 2 h 26 min short |
| 8 | 96 | 2,835 | 3 | 1 h 31 min long |
| 11 | 132 | 3,898 | 4 | 54 min short |
| 19 | 228 | 6,733 | 7 | 37 min long |
| 30 | 360 | 10,631 | 11 | 17 min short |
| 79 | 948 | 27,995 | 29 | 2.5 min long |
"Leap days" is the number of days above 354 per year that the cycle needs. "Short" means the calendar's days add up to a little less than the real months, "long" a little more.
The Ladder, Drawn
Each dot in the chart is one cycle length from 1 to 100 years. The higher the dot, the larger the error. The gold dots are the record setters in the table above, and the ringed one is the 30-year cycle of the tabular calendar. Both scales are logarithmic, so each gridline is ten times smaller than the one above it.
The pattern is a staircase. A new record needs a longer cycle each time, and the gains slow down: going from 19 to 30 years roughly halves the error, and going from 30 to 79 years cuts it by a factor of seven but needs more than two and a half times as many years.
Why Not 8 Years or 19 Years?
An 8-year cycle with 3 leap days is easy to remember, but it is off by 91 minutes per cycle, five times worse than 30 years. After a century it would be nearly a day out of step with the Moon.
A 19-year cycle with 7 leap days is off by 37 minutes. The number 19 is famous for another reason: in lunisolar calendars, 19 solar years hold almost exactly 235 lunar months (the Metonic cycle). That is a different problem, because there the aim is to keep the months in step with the seasons. Here the only aim is to keep whole days in step with the months.
What about 79 years? It is seven times more accurate than 30, with only 2.5 minutes of error. But the leap-year pattern would have 29 leap years in 79 and be much harder to remember and check by hand. The 30-year cycle is the shortest one precise enough that its error is invisible in everyday use.
Which Years Are Leap?
The usual pattern, called the Kuwaiti algorithm, gives the extra day to years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 of each 30-year cycle. The leap days are spread through the cycle rather than bunched together. Some other tables move one or two of these leap years, which is one reason two tabular calendars can differ by a day on some dates.
What the Cycle Does Not Do
The cycle makes the average month right. It says nothing about any single month. The real lunar month is not constant: individual months run from about 29.27 to 29.83 days, a spread of roughly 13 hours, and the real new moon can arrive a day or more away from the day the tabular calendar picks. That is why the tabular calendar can be one or two days off a real sighting even though its long-run average is almost perfect.
This is also the difference between the tabular calendar and the others on this site. The Umm al-Qura calendar uses an astronomical rule for each month, and a sighting calendar uses the sky itself. The tabular calendar uses only arithmetic. The triple-engine post compares all three, and you can switch between them on the calendar page.
Frequently Asked Questions
Is 30 the best possible cycle?
Among cycles of whole years, yes, for anything shorter than 79 years: no shorter cycle comes closer. Longer cycles can be more accurate, but they are harder to use.
Will the tabular calendar ever need correcting?
In about 2,500 years it will be a day out of step with the Moon on average, and someone would have to add an extra day. Whether anyone will still be using it then, and exactly how long the day and the month will be by that time, nobody can say.
Why is the extra day added to the last month?
It is a convention. The last month, Dhul-Hijjah, has 29 days in an ordinary year and 30 in a leap year. Putting the leap day at the end of the year keeps every other month the same length every year.
Where do the 10,631 days come from?
354 days x 30 years = 10,620 days, plus 11 leap days = 10,631. That is 360 months of 29.530556 days each. The real mean month is 29.530589 days, 2.9 seconds longer.
See Also
- The triple-engine Hijri calendar
- The Umm al-Qura calendar explained
- The four kinds of lunar month
- How the Islamic lunar calendar works
- Which year will have two Eids?
- The calendar page, to compare the three engines on any date.
- Ramadan Through the Seasons: How Long the Days of Ramadan Are, Year by Year, from London to Cape Town
References
- Meeus, J. (1998). Astronomical Algorithms (2nd ed.). Willmann-Bell. Chapter 49, phases of the Moon: the mean synodic month, 29.530588861 days.
- The numbers and the chart in this post are reproduced by
docs/research/tabular-cycles.mjsandpackages/astronomy/src/tabularCycles.tsin the Hilal Vision source.