# Tabular Islamic calendar

The Tabular Islamic calendar (Arabic: التقويم الهجري المجدول, romanized: altaqwim alhijriu almujadwal) is a rule-based variation of the Islamic calendar. It has the same numbering of years and months, but the months are determined by arithmetical rules rather than by observation or astronomical calculations. It was developed by early Muslim astronomers of the second hijra century (the 8th century of the Common Era) to provide a predictable time base for calculating the positions of the moon, sun, and planets. It is now used by historians to convert an Islamic date into a Western calendar when no other information (like the day of the week) is available. Its calendar era is the Hijri year. An example is the Fatimid or Misri calendar.
It is used by some Muslims in everyday life, particularly in Ismaili and Shi'a communities, believing that this calendar was developed by Ali. It is believed that when Ali drew up this calendar, the previous events of the earlier prophets also fell into line with this calendar. It is their belief that all Fatimid Imams and their Da'is have followed this tradition.
Each year has 12 months. 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.

## Intercalary schemes
### 30-year cycle

In its most common form there are 11 leap years in a 30-year cycle. Noting that the average year has 354+11⁄30 days and a common year has 354 days, at the end of the first year of the 30-year cycle the remainder is 11⁄30 day. Whenever the remainder exceeds a half day (15⁄30 day), then a leap day is added to that year, reducing the remainder by one day. Thus at the end of the second year the remainder would be 22⁄30 day which is reduced to −8⁄30 day by a leap day. Using this rule the leap years are year number 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 of the 30-year cycle.
If leap days are added whenever the remainder equals or exceeds a half day, then all leap years are the same except 15 replaces 16 as the sixth long year per cycle.
The Ismaili Tayyebi community delays three leap days by one year: the third to year 8, the seventh to year 19 and the tenth to year 27 in their 30-year cycle. There is another version where, in addition, the fourth leap day is postponed to year 11 and the last leap day is in the last year of the 30-year cycle.
The mean number of days per month in the 30-year cycle is 29.53056 days, or 29d 12h 44m. Six months of 29 days and six with 30 days, plus 11 days of the leap years. (29 days × 6 months + 30 days × 6 months) × 30 years + 11 leap days = 10,631 days and 10,631 / 360 = 29.53056 (360 is number of months in 30 years). And this is approximately how long it takes for the moon to make full lunar cycle.
Microsoft's Kuwaiti algorithm is used in Windows to convert between Gregorian calendar dates and Islamic calendar dates. There is no fixed correspondence defined in advance between the algorithmic Gregorian solar calendar and the Islamic lunar calendar determined by actual observation. As an attempt to make conversions between the calendars somewhat predictable, Microsoft claims to have created this algorithm based on statistical analysis of historical data from Kuwait. According to Rob van Gent, the so-called "Kuwaiti algorithm" is simply an implementation of the standard Tabular Islamic calendar algorithm used in Islamic astronomical tables since the 11th century.
Overview of various 30-year leap cycles :
| Origin or usage | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Long lunar years (nth/30) | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year | Gap till next long year |
| Origin or usage | #1 | #2 | #3 | #4 | #5 | #6 | #7 | #8 | #9 | #10 | #11 | #1 | #2 | #3 | #4 | #5 | #6 | #7 | #8 | #9 | #10 | #11 |
| Kūshyār ibn Labbān, Ulugh Beg, Taqī ad-Dīn Muḥammad ibn Maʾruf | 2 | 5 | 7 | 10 | 13 | 15 | 18 | 21 | 24 | 26 | 29 | 3 | 2 | 3 | 3 | 2 | 3 | 3 | 3 | 2 | 3 | 3 |
| al-Fazārī, al-Khwārizmī, al-Battānī, Toledan Tables, Alfonsine Tables, Microsoft "Kuwaiti algorithm" | 2 | 5 | 7 | 10 | 13 | 16 | 18 | 21 | 24 | 26 | 29 | 3 | 2 | 3 | 3 | 3 | 2 | 3 | 3 | 2 | 3 | 3 |
| Muḥammad ibn Fattūḥ al-Jamāʾirī of Seville | 2 | 5 | 8 | 10 | 13 | 16 | 18 | 21 | 24 | 26 | 29 | 3 | 3 | 2 | 3 | 3 | 2 | 3 | 3 | 2 | 3 | 3 |
| Fāṭimid / Ismāʿīlī / Ṭayyibī / Bohorā calendar, Ibn al-Ajdābī | 2 | 5 | 8 | 10 | 13 | 16 | 19 | 21 | 24 | 27 | 29 | 3 | 3 | 2 | 3 | 3 | 3 | 2 | 3 | 3 | 2 | 3 |
| Ḥabash al-Ḥāsib, al-Bīrūnī, Elias of Nisibis | 2 | 5 | 8 | 11 | 13 | 16 | 19 | 21 | 24 | 27 | 30 | 3 | 3 | 3 | 2 | 3 | 3 | 2 | 3 | 3 | 3 | 2 |

### 8-year cycle

Tabular Islamic calendars based on an 8-year cycle (with 2, 5 and 8 as leap years) were also used in the Ottoman Empire and in South-East Asia. The cycle contains 96 months in 2835 days, giving a mean month length of 29.53125 days, or 29d 12h 45m.
Though less accurate than the tabular calendars based on a 30-year cycle, it was popular due to the fact that in each cycle the weekdays fall on the same calendar date. In other words, the 8-year cycle is exactly 405 weeks long, resulting in a mean of exactly 4.21875 weeks per month.

### 120-year cycle

In the Dutch East Indies (now Indonesia) into the early 20th century, the 8-year cycle was reset every 120 years by omitting the intercalary day at the end of the last year, thus resulting in a mean month length equal with that used in the 30-year cycles.