Each month of the Islamic calendar commences on the birth of the new lunar cycle. Traditionally this is based on actual witnessing of the crescent marking the end of the previous lunar cycle and hence the previous month thereby beginning the new month. Consequently each month can have 29 or 30 days depending on the visibility of the moon, astronomical positioning of the earth and weather conditions. However, certain sects and groups, most notably Dawoodi Bohra Muslims and Shia Ismaili Muslims use a tabular Islamic calendar (see section below) in which odd months have thirty days (and also the twelfth month in a leap year) and even months have 29.

In Arabic, the "first day" of the week corresponds with Sunday of the planetary week. The Islamic weekdays, like those in the Hebrew and Baha'i calendars, begin at sunset. Muslims gather for worship at a mosque at noon on "gathering day" (Yawm al-Jumu‘ah, yawmيوم meaning "day") which corresponds with Friday. Thus "gathering day" is often regarded as the weekly day of rest. This is frequently made official, with many Muslim countries adopting Friday and Saturday (e.g. Egypt, Saudi Arabia) or Thursday and Friday as official weekends, during which offices are closed; other countries (e.g. Iran) choose to make Friday alone a day of rest. A few others (e.g. Turkey, Pakistan) have adopted the Western Saturday-Sunday weekend while making Friday a working day with a long midday break to allow time off for worship.

Inscriptions of the ancient South Arabian calendars reveal the use of a number of local calendars. At least some of these calendars followed the lunisolar system. For Central Arabia, especially Mecca, there is a lack of epigraphical evidence but details are found in the writings of Muslim authors of the Abbasid era. Both al-Biruni and al-Mas'udi suggest that the Ancient Arabs used the same month names as the Muslims, though they also record other month names used by the pagan Arabs.[6]

Research on the pre-Islamic calendar has been summarized in recent Islamic scholarship[7][8] which equates the pre-Islamic months from Muharram to Dhu al-Hijjah with the Hebrew religious year Nisan to Adar with a possible one - month slippage making Muharram equal to Iyyar. In stark opposition to this opinion however, subsequent Christian[9] then Jewish[10] scholars have both tried to equate the pre-Islamic months from Muharram to Jumada II at least with the Hebrew months of Tishrei to Adar I respectively. The Hajj was an equinoctial festival.[11]

The Islamic tradition is unanimous in stating that Arabs of Tihamah, Hejaz, and Najd distinguished between two types of months, permitted (ḥalāl) and forbidden (ḥarām) months. The forbidden months were four months during which fighting is forbidden, listed as Rajab and the three months around the pilgrimage season, Dhu al-Qa‘dah, Dhu al-Hijjah, and Muharram. Information about the forbidden months is also found in the writings of Procopius, where he describes an armistice with the Eastern Arabs of the Lakhmid al-Mundhir which happened in the summer of 541 AD. However, Muslim historians do not link these months to a particular season. The Qur'an links the four forbidden months with Nasī’, a word that literally means "postponement".[6] According to Muslim tradition, the decision of postponement was administered by the tribe of Kinanah,[12] by a man known as the al-Qalammas of Kinanah and his descendants (pl. qalāmisa).[13]

Different interpretations of the concept of Nasī’ have been proposed.[14] Some scholars, both Muslim[15][16] and Western,[6][12] maintain that the pre-Islamic calendar used in Central Arabia was a purely lunar calendar similar to the modern Islamic calendar. According to this view, Nasī’ is related to the Pagan practices of the Meccan Arabs, where they would alter the distribution of the forbidden months within a given year without implying a calendar manipulation. This interpretation is supported by Arab historians and lexicographers, like Ibn Hisham, Ibn Manzur, and the corpus of Qur'anic exegesis.[17] It is also corroborated by an early Sabaic inscription, where a religious ritual was "postponed" (ns'ʾw) due to war. According to the context of this inscription, the verb ns'ʾ has nothing to do with intercalation, but only with moving religious events within the calendar itself. The similarity between the religious concept of this ancient inscription and the Qur'an suggests that non-calendaring postponement is also the Qur'anic meaning of Nasī’.[6] Thus the Encyclopaedia of Islam concludes that the "The Arabic system of [Nasī’] can only have been intended to move the Hajj and the fairs associated with it in the vicinity of Mecca to a suitable season of the year. It was not intended to establish a fixed calendar to be generally observed."[18]

However, as mentioned above there is strong evidence that although originally a lunar calendar about 200 years before the Hijra it was remodelled on the Jewish lunisolar calendar containing an intercalary month added from time to time to keep the pilgrimage within the season of the year when merchandise was most abundant. This interpretation was first proposed by the medieval Muslim astrologer and astronomer Abu Ma'shar al-Balkhi, and later by al-Biruni,[13][19]al-Mas'udi, and some Western scholars.[20] This interpretation considers Nasī’ to be a synonym to the Arabic word for "intercalation" (kabīsa). The Jewish Nasi was the official who decided when to intercalate the Jewish calendar.[21] The Arabs, according to one explanation mentioned by Abu Ma'shar, learned of this type of intercalation from the Jews.[12][13][19] For a comparison between the Islamic and pre-Islamic calendars, see Islamic and Jahili months. Scholars have suggested that the Arabic system was to intercalate three months in eight years (nine in 24), seven in nineteen or eleven in thirty. All these values are in agreement with the cycle of the seasons which requires on average an addition of one month every 33 or 34 months.

Some writers have suggested that the first intercalation doubled the first month Muharram, then on the next adjustment the second month Safar was doubled, continuing until the intercalation had passed through all twelve months of the year and returned to Muharram, when it was repeated. This is explained by one scholar as the writer simply explaining the intercalated calendar in terms of the fixed calendar, which which his readers were familiar. The Qu'ran makes it clear that in intercalary years the number of months was expanded from its usual twelve (see next section). It is affirmed that the divinely ordained number of the months is twelve.

What dates we can fix confirm this picture. Traditionally Muhammad was born in the spring of the year of the elephant (AD 570) on Monday, 12 Rabi'I. This would equate to 2 June, making Muharram equal to Nisan. In the year of the Hejira (AD 622) Muhammad traditionally left Mecca on Sunday night, the start of 24 Safar. This equates to Sunday, 9 May and points to Muharram starting on 18 March, again equivalent to Nisan. He entered Medina traditionally on Monday, 8 Rabi'I (24 May). There he found the Jews observing an important holy day. From the reference to Moses and the Exodus [22] this holy day can be identified with the Feast of Weeks, which is observed on the sixth and seventh days of the third Jewish month. Muhammad's son Ibrahim was traditionally born in Dhu al - Hijjah, the twelfth month, which was the month of the pilgrimage, in AD 630. He is believed to have died in AD 632, possibly at the age of one year ten months and six days or one year ten months and eight days. The date of his death coincided with a solar eclipse. This fixes the date, 29 Shawwal AH 10, as 27 January. With no intercalation the following Muharram corresponds to Nisan, and also Muharram in the present calendar, that being the end of intercalation in the Islamic calendar.

In the tenth year of the Hijra, as documented in the Qur'an (sura 9:36–37), God revealed the "prohibition of the Nasī’".

In the sight of God the number of months is twelve, and so it was decreed on the day He created the heavens and the earth. Of them four are sacred: that is the correct religious practice, so do not wrong yourselves in them and fight the pagans altogether, as they fight you altogether. And know that God is with those who restrain themselves.

Know that intercalation (nasi) is an addition to disbelief. Those who disbelieve are led to error thereby, making it lawful in one year and forbidden in another in order to adjust the number of (the months) made sacred by God and make the sacred ones permissible. The evil of their course appears pleasing to them. But God gives no guidance to those who disbelieve.

It is suggested that the prohibition of Nasi would have been announced when the intercalated month had returned to its position just before the month of Nasi' began. This is demonstrably false. It would only take 33 years for the month to rotate through the calendar, and the system was in use for 200 years. Either way, Western calendar dates commonly cited for key events in early Islam such as the Hijra, the Battle of Badr, the Battle of Uhud and the Battle of the Trench, should be viewed with caution since date calculators do not allow for intercalation.

Certainly the Nasi’ is an impious addition, which has led the infidels into error. One year they authorise the Nasi’, another year they forbid it. They observe the divine precept with respect to the number of the sacred months, but in fact they profane that which God has declared to be inviolable, and sanctify that which God has declared to be profane. Assuredly time, in its revolution, has returned to such as it was at the creation of the heavens and the earth. In the eyes of God the number of the months is twelve. Among these twelve months four are sacred, namely, Rajab, which stands alone, and three others which are consecutive.

The three successive forbidden months mentioned by Muhammad (months in which battles are forbidden) are Dhu al-Qa‘dah, Dhu al-Hijjah, and Muharram, months 11, 12, and 1. The single forbidden month is Rajab, month 7.

In pre-Islamic Arabia, it was customary to identify a year after a major event which took place in it. Thus, according to Islamic tradition, Abraha, governor of Yemen, then a province of the Christian Kingdom of Aksum (Ethiopia), attempted to destroy the Kaaba with an army which included several elephants. The raid was unsuccessful, but that year became known as the Year of the Elephant, during which Muhammad was born (sura al-Fil). Most equate this to the year AD 570, but a minority use AD 571.

The first ten years of the Hijra were not numbered, but were named after events in the life of Muhammad according to Abū Rayḥān al-Bīrūnī:[26]

The year of permission.

The year of the order of fighting.

The year of the trial.

The year of congratulation on marriage.

The year of the earthquake.

The year of enquiring.

The year of gaining victory.

The year of equality.

The year of exemption.

The year of farewell.

In AD 638 (17 AH), Abu Musa Ashaari, one of the officials of the CaliphUmar in Basrah, complained about the absence of any years on the correspondence he received from Umar, making it difficult for him to determine which instructions were most recent. This report convinced Umar of the need to introduce an era for Muslims. After debating the issue with his counsellors, he decided that the first year should include the date of Muhammad's arrival at Medina (known as Yathrib, before Muhammad's arrival). Uthman ibn Affan then suggested that the months begin with Muharram, in line with the established custom of the Arabs at that time.[27] The years of the Islamic calendar thus began with the month of Muharram in the year of Muhammad's arrival at the city of Medina, even though the actual emigration took place in Safar and Rabi' I.[3] Because of the Hijra, the calendar was named the Hijra calendar.

The first day of the first month of the Islamic calendar (1 Muharram 1 AH) was set to the first new moon after the day the Prophet moved from Quba' to Medina (originally 26 Rabi' I on the pagan calendar[28]) i.e. Friday, 19 July 622 in the Gregorian calendar or 16 July AD 622, the equivalent civil tabular date (same daylight period) in the Julian calendar.[29][30] The Islamic day began at the preceding sunset on the evening of 15 July. This Julian date (16 July) was determined by medieval Muslim astronomers by projecting back in time their own tabular Islamic calendar, which had alternating 30- and 29-day months in each lunar year plus eleven leap days every 30 years. For example, al-Biruni mentioned this Julian date in the year AD 1000.[31] Although not used by either medieval Muslim astronomers or modern scholars to determine the Islamic epoch, the thin crescent moon would have also first become visible (assuming clouds did not obscure it) shortly after the preceding sunset on the evening of 15 July, 1.5 days after the associated dark moon (astronomical new moon) on the morning of 14 July.[32]

The Islamic calendar is not to be confused with a lunar calendar that is based on astronomical calculations. The latter is based on a year of 12 months adding up to 354.37 days. Each lunar month begins at the time of the monthly "conjunction", when the Moon is located on a straight line between the Earth and the Sun. The month is defined as the average duration of a revolution of the Moon around the Earth (29.53 days). By convention, months of 30 days and 29 days succeed each other, adding up over two successive months to 59 full days. This leaves only a small monthly variation of 44 minutes to account for, which adds up to a total of 24 hours (i.e. the equivalent of one full day) in 2.73 years. To settle accounts, it is sufficient to add one day every three years to the lunar calendar, in the same way that one adds one day to the Gregorian calendar every four years.[33] The technical details of the adjustment are described in Tabular Islamic calendar.

The Islamic calendar, however, is based on a different set of conventions.[34] Each month has either 29 or 30 days, but usually in no discernible order. Traditionally, the first day of each month is the day (beginning at sunset) of the first sighting of the hilal (crescent moon) shortly after sunset. If the hilal is not observed immediately after the 29th day of a month (either because clouds block its view or because the western sky is still too bright when the moon sets), then the day that begins at that sunset is the 30th. Such a sighting has to be made by one or more trustworthy men testifying before a committee of Muslim leaders. Determining the most likely day that the hilal could be observed was a motivation for Muslim interest in astronomy, which put Islam in the forefront of that science for many centuries.

This traditional practice is still followed in the overwhelming majority of Muslim countries. Each Islamic state proceeds with its own monthly observation of the new moon (or, failing that, awaits the completion of 30 days) before declaring the beginning of a new month on its territory. But, the lunar crescent becomes visible only some 17 hours after the conjunction, and only subject to the existence of a number of favourable conditions relative to weather, time, geographic location, as well as various astronomical parameters.[35] Given the fact that the moon sets progressively later than the sun as one goes west, with a corresponding increase in its "age" since conjunction, Western Muslim countries may, under favorable conditions, observe the new moon one day earlier than eastern Muslim countries. Due to the interplay of all these factors, the beginning of each month differs from one Muslim country to another, during the 48 h period following the conjunction. The information provided by the calendar in any country does not extend beyond the current month.

A number of Muslim countries try to overcome some of these difficulties by applying different astronomy-related rules to determine the beginning of months. Thus, Malaysia, Indonesia, and a few others begin each month at sunset on the first day that the moon sets after the sun (moonset after sunset). In Egypt, the month begins at sunset on the first day that the moon sets at least five minutes after the sun. A detailed analysis of the available data shows, however, that there are major discrepancies between what countries say they do on this subject, and what they actually do.[36][37]

If the Islamic calendar were prepared using astronomical calculations, Muslims throughout the Muslim world could use it to meet all their needs, the way they use the Gregorian calendar today. But, there are divergent views on whether it is licit to do so.[38]

A majority of theologians oppose the use of calculations (beyond the constraint that each month must be not less than 29 nor more than 30 days) on the grounds that the latter would not conform with Muhammad's recommendation to observe the new moon of Ramadan and Shawal in order to determine the beginning of these months.[39][40][41]

However, some jurists see no contradiction between Muhammad's teachings and the use of calculations to determine the beginnings of lunar months.[42] They consider that Muhammad's recommendation was adapted to the culture of the times, and should not be confused with the acts of worship.[43][44][45]

The major Muslim associations of France also announced in 2012 that they would henceforth use a calendar based on astronomical calculations, taking into account the criteria of the possibility of crescent sighting in any place on Earth.[53] But, shortly after the official adoption of this rule by the French Council of the Muslim Faith (CFCM) in 2013, the new leadership of the association decided, on the eve of ramadan 2013, to follow the Saudi announcement rather than to apply the rule just adopted. This resulted in a division of the Muslim community of France in two camps, with some members following the new rule, and others following the Saudi announcement.

Turkish Muslims also use an Islamic calendar which is calculated several years in advance (currently up to 1437 AH/2015 CE) by the Turkish Presidency of Religious Affairs (Diyanet Isleri Baskanligi).[54] Since 1 Muharrem 1400 AH (21 November 1979) the computed Turkish lunar calendar is based on the following rule: “The lunar month is assumed to begin on the evening when, within some region of the terrestrial globe, the computed centre of the lunar crescent at local sunset is more than 5° above the local horizon and (geocentrically) more than 8° from the Sun.”[55]

Saudi Arabia uses the sighting method to determine the beginning of each month of the Hijri calendar. Since AH 1419 (1998/99) several official hilal sighting committees have been set up by the government to determine the first visual sighting of the lunar crescent at the beginning of each lunar month. Nevertheless, the religious authorities also allow the testimony of less experienced observers and thus often announce the sighting of the lunar crescent on a date when none of the official committees could see it.

The country also uses the Umm al-Qura calendar, based on astronomical calculations, but this is restricted to administrative purposes. The parameters used in the establishment of this calendar underwent significant changes over the past decade.[56][57]

Before AH 1420 (before 18 April 1999), if the moon's age at sunset in Riyadh was at least 12 hours, then the day ending at that sunset was the first day of the month. This often caused the Saudis to celebrate holy days one or even two days before other predominantly Muslim countries, including the dates for the Hajj, which can only be dated using Saudi dates because it is performed in Mecca.

For AH 1420–22, if moonset occurred after sunset at Mecca, then the day beginning at that sunset was the first day of a Saudi month, essentially the same rule used by Malaysia, Indonesia, and others (except for the location from which the hilal was observed).

Since the beginning of AH 1423 (16 March 2002), the rule has been clarified a little by requiring the geocentric conjunction of the sun and moon to occur before sunset, in addition to requiring moonset to occur after sunset at Mecca. This ensures that the moon has moved past the sun by sunset, even though the sky may still be too bright immediately before moonset to actually see the crescent.

In 2007, the Islamic Society of North America, the Fiqh Council of North America and the European Council for Fatwa and Research announced that they will henceforth use a calendar based on calculations using the same parameters as the Umm al-Qura calendar to determine (well in advance) the beginning of all lunar months (and therefore the days associated with all religious observances). This was intended as a first step on the way to unify, at some future time, Muslims' calendars throughout the world.[58][59]

The Tabular Islamic calendar is a rule-based variation of the Islamic calendar, in which months are worked out by arithmetic rules rather than by observation or astronomical calculation. It has a 30-year cycle with 11 leap years of 355 days and 19 years of 354 days. In the long term, it is accurate to one day in about 2,500 years. It also deviates up to about one or two days in the short term.

Microsoft uses the "Kuwaiti algorithm", a variant of the tabular Islamic calendar,[60] to convert Gregorian dates to the Islamic ones. Microsoft claims that the variant is based on a statistical analysis of historical data from Kuwait.

Civil and Hijri establishment dates of a library in Old City, Jerusalem

Conversions may be made online (see list below), by using the Tabular Islamic calendar (see Tabular Islamic calendar), or, for greatest accuracy (one day in 15,186 years), via the Jewish calendar. Theoretically, the days of the months correspond in both calendars if the displacements which are a feature of the Jewish system are ignored. The table below gives, for nineteen years, the Muslim month which corresponds to the first Jewish month.

Year AD

Year AH

Muslim
month

2011

1432

5

2012

1433

5

2013

1434

5

2014

1435

6

2015

1436

6

2016

1437

7

2017

1438

7

2018

1439

7

2019

1440

8

2020

1441

8

Year AD

Year AH

Muslim
month

2021

1442

8

2022

1443

9

2023

1444

9

2024

1445

10

2025

1446

10

2026

1447

10

2027

1448

11

2028

1449

11

2029

1450

11

This table may be extended since every nineteen years the Muslim month number increases by seven. When it goes above twelve, subtract twelve and add one to the year AH. From AD412 to AD632 inclusive the month number is 1 and the calculation gives the month correct to a month or so. AD622 corresponds to BH1 and AH1. For earlier years, year BH = (623 or 622) – year AD).

An example calculation: What is the civil date and year AH of the first day of the first month in the year AD 20875?

We first find the Muslim month number corresponding to the first month of the Jewish year which begins in AD20874. Dividing 20874 by 19 gives quotient 1098 and remainder 12. Dividing 2026 by 19 gives quotient 106 and remainder 12. The two years are therefore (1098–106)=992x19 years apart. The Muslim month number corresponding to the first Jewish month is therefore (992x7)=6944 higher than in 2026. To convert into years and months divide by twelve – 6944/12=578 years and 8 months. Adding, we get 1447y 10m + 20874y – 2026y + 578y 8m = 20874y 6m. Therefore, the first month of the Jewish year beginning in AD20874 corresponds to the sixth month of the Muslim year AH20874. The worked example in Conversion between Jewish and civil dates, shows that the civil date of the first day of this month (ignoring the displacements) is Friday, 14 June. The year AH20875 will therefore begin seven months later, on the first day of the eighth Jewish month, which the worked example shows to be 7 January, AD20875 (again ignoring the displacements). The date given by this method, being calculated, may differ by a day from the actual date, which is determined by observation.

A reading of the section which follows will show that the year AH20875 is wholly contained within the year AD20875, also that in the Gregorian calendar this correspondence will occur one year earlier. The reason for the discrepancy is that the Gregorian year (like the Julian) is slightly too long, so the Gregorian date for a given AH date will be earlier and the Muslim calendar catches up sooner.

An Islamic year will be entirely within a Gregorian year of the same number in the year 20874, after which year the number of the Islamic year will always be greater than the number of the concurrent civil year. The Islamic calendar year of 1429 occurred entirely within the civil calendar year of 2008. Such years occur once every 33 or 34 Islamic years (32 or 33 civil years). More are listed here:

Islamic year within civil year

Islamic

Civil

Difference

1060

1650

590

1093

1682

589

1127

1715

588

1161

1748

587

1194

1780

586

1228

1813

585

1261

1845

584

1295

1878

583

1329

1911

582

1362

1943

581

1396

1976

580

1429

2008

579

1463

2041

578

1496

2073

577

1530

2106

576

1564

2139

575

Because a hijri or Islamic lunar year is between 10 and 12 days shorter than a civil year, it begins 10–12 days earlier in the civil year following the civil year in which the previous hijri year began. Once every 33 or 34 hijri years, or once every 32 or 33 civil years, the beginning of a hijri year (1 Muharram) coincides with one of the first ten days of January. Subsequent hijri New Years move backward through the civil year back to the beginning of January again, passing through each civil month from December to January.

The Islamic calendar is now used primarily for religious purposes, and for official dating of public events and documents in Muslim countries.[61] Because of its nature as a purely lunar calendar, it cannot be used for agricultural purposes and historically Islamic communities have used other calendars for this purpose: the Egyptian calendar was formerly widespread in Islamic countries, and the Iranian calendar and the 1789 Ottoman calendar (a modified Julian calendar) were also used for agriculture in their countries. In the Levant and Iraq the Aramaic names of the Babylonian calendar are still used for all secular matters. In Morocco, the Berber calendar (another Julian calendar) is still used by farmers in the countryside. These local solar calendars have receded in importance with the near-universal adoption of the Gregorian calendar for civil purposes. As noted above, Saudi Arabia uses the Islamic calendar to date religious occasions such as Ramadan, Hajj, etc. and the Umm-al-Qura calendar, based on calculations, for administrative purposes and daily government business.[62] In Indonesia, the Javanese calendar, created by Sultan Agung in 1633, combines elements of the Islamic and pre-Islamic Saka calendars.

British author Nicholas Hagger writes that after seizing control of Libya, Muammar Gaddafi "declared" on 1 December 1978 "that the Muslim calendar should start with the death of the prophet Mohammed in 632 rather than the hijra (Mohammed's 'emigration' from Mecca to Medina) in 622". This put the country ten solar years behind the standard Muslim calendar.[63] However, according to the 2006 Encyclopedia of the Developing World, "More confusing still is Qaddafi's unique Libyan calendar, which counts the years from the Prophet's birth, or sometimes from his death. The months July and August, named after Julius and Augustus Caesar, are now Nasser and Hannibal respectively."[64] Reflecting on a 2001 visit to the country, American reporter Neil MacFarquhar observed, "Life in Libya was so unpredictable that people weren't even sure what year it was. The year of my visit was officially 1369. But just two years earlier Libyans had been living through 1429. No one could quite name for me the day the count changed, especially since both remained in play. ... Event organizers threw up their hands and put the Western year in parentheses somewhere in their announcements."[65]

^Some theologians also interpret Surah al-Baqarah 2:185 as requiring direct sighting, but they represent only a minority. The Quranic verse reads as follows : "185. The month of Ramadân in which was revealed the Qur'ân, a guidance for mankind and clear proofs for the guidance and the criterion (between right and wrong). So whoever of you sights (the crescent on the first night of) the month (of Ramadân i.e. is present at his home), he must observe Saum (fasts) that month, and whoever is ill or on a journey, the same number [of days which one did not observe Saum (fasts) must be made up] from other days. God intends for you ease, and He does not want to make things difficult for you. (He wants that you) must complete the same number (of days), and that you must magnify God [i.e. to say Takbîr ("Allāhu-Akbar", [i.e.] "God is the Most Great") on seeing the crescent of the months of Ramadân and Shawwâl] for having guided you so that you may be grateful to Him."

^The dynasty of Fatimids in Egypt used a tabular pre-calculated calendar over a period of two centuries, between the 10th and 12th centuries, before a change of political regime reactivated the procedure of observation of the new moon.