Is fasting farz in islam? What are the obligation of fasting?
Fasting in the month of Ramadan is one of the five basic principles of Islam. It was made obligatory upon believers in the second year of the Hijrah. The obligation of fasting is stated in the following verses of the Qur’an:
“ O you who have believed, decreed upon you is fasting as it was decreed upon those before you that you may become righteous.” and, “…So whoever sights [ the new moon of] the month, let him fast…”
Our Prophet (pbuh) stated: “Islam is based on (the following) five (principles): To testify that none has the right to be worshipped but Allah and Muhammad is Allah’s Messenger (pbuh). To offer the (compulsory congregational) prayers dutifully and perfectly. To pay Zakat (i.e. obligatory charity). To perform Hajj. (i.e. Pilgrimage to Mecca). To observe fast during the month of Ramadan.”
In order for the Ramadan fasting to be considered obligatory, it must take place during the time of the month of Ramadan. Allah’s Messenger (pbuh) stated: “Start fasting when you see the crescent of the month of Ramadan.” 
As it is understood from the verses of the Qur’an and the above saying of the Prophet, it is obligatory upon every Muslim who is mukallaf to fast in the month of Ramadan every year. To trivialize the obligation of fasting or to deny it is an obligatory act of worship causes a person to leave the religion of Islam. As for the person who believes that fasting is obligatory but still does not fast without having a valid excuse is regarded as a sinner.
 Al-Baqara, 2: 183.
 Al-Baqara, 2: 185.
 Sahih al-Bukhari, Kitab al-Iman, vol. I. p. 8: Sahih al-Muslim, Kitab al-Iman. 21.
 Sunan al-Tirmidhi, Bab al-Sawm, 683.