Fasting six days of Shawwal after the obligatory fast of Ramadan is Sunnah Mustahabbah, not wajib. It is recommended for the Muslim to fast six days of Shawwal. Whoever fasts these six days will have recorded for him a reward as if he had fasted a whole year, as was reported in a sahih hadith from the Prophet (peace and blessings of Allah be upon him). Abu Ayyub (may Allah be pleased with him) reported that the Messenger of Allah (peace and blessings of Allah be upon him) said:
“Whoever fasts Ramadan and follows it with six days of Shawwal, it will be as if he fasted for a lifetime.”
The Prophet (peace and blessings of Allah be upon him) explained this when he said: “Whoever fasts for six days after (‘Eid) Al-Fitr has completed the year: (whoever does a good deed (hasanah) will have ten hasanah like it).” According to another report: “Allah has made for each hasanah ten like it, so a month is like fasting ten months, and fasting six days completes the year.” [An-Nisa’i and Ibn Majah. See also Sahih at-Targhib wa’t-Tarhib, 1/421).
It was also narrated by Ibn Khuzaymah with the wording: “Fasting for the month of Ramadan brings the reward of ten like it, and fasting for six days brings the reward of two months, and that is the fasting of the whole year.”
The Hanbali and Shafi’i fuqaha’ explained that fasting six days of Shawwal after fasting Ramadan makes it as if one has fasted for an entire year of obligatory fasts, because the multiplication of the reward applies even to nafil fasts, because each hasanah brings the reward of ten like it.
Another of the important benefits of fasting six days of Shawwal is that is makes up for any shortfall in a person’s obligatory Ramadan fasts, because no one is free of shortcomings or sins that have a negative effect on his fasting. On the Day of Resurrection, some of his nafil deeds will be taken to make up the shortcomings in his obligatory deeds, as the Prophet (peace and blessings of Allah be upon him) said:
“The first thing for which people will be brought to account on the Day of Resurrection will be their salah (prayer). Our Lord, may He be glorified and exalted, will say to His angels – although He knows best – ‘Look at the salah of My slave, whether it is complete or incomplete.’ If it is perfect, it will be recorded as perfect, and if something is lacking, He will say, ‘Look and see whether My slave did any voluntary (nafil) prayers.’ If he did some voluntary prayers, [Allah] will say, Complete the obligatory actions of My slave from his voluntary actions.’ Then all his actions will be dealt with in a similar manner.”