In the Forty Hadith Qudsi compiled by Imam an-Nawawi, it’s interesting that hadith nine relate the importance of expiating missed obligatory fasting, and right after in hadith ten, the Imam relates the importance of fasting, as if tying the two together for one that is need of expiation.

Hadith 9, Forty Hadith Qudsi of Imam an-Nawawi

On the authority of Abu Hurayrah (may Allah be pleased with him), who said that the Messenger of Allah (may the blessings and peace of Allah be upon him) said:

The first of his actions for which a servant of Allah will be held accountable on the Day of Resurrection will be his prayers. If they are in order, then he will have prospered and succeeded; and if they are wanting, then he will have failed and lost. If there is something defective in his obligatory prayers, the Lord (glorified and exalted be He) will say: ‘See if My servant has any supererogatory prayers with which may be completed that which was defective in his obligatory prayers. Then the rest of his actions’ will be judged in like fashion.

It was related by at-Tirmidhi (also by Abu Dawud, an- Nasa’i, Ibn Majah and Ahmad).

Hadith 10, Forty Hadith Qudsi of Imam an-Nawawi

On the authority of Abu Hurayrah (may Allah be pleased with him) from the Prophet (may the blessings and peace of Allah be upon him), who said: Allah (mighty and sublime be He) says:

Fasting is Mine and it is I who give reward for it. [A man] gives up his sexual passion, his food and his drink for My sake. Fasting is like a shield, and he who fasts has two joys: a joy when he breaks his fast and a joy when he meets his Lord. The change in the breath’ of the mouth of him who fasts is better in Allah’s estimation than the smell of musk.

It was related by al-Bukhari (also by Muslim, Malik, at-Tirmidhi, an-Nasa’i and Ibn Majah).

The Prophet (saw) said:

The one who repents from sin is like the one who never sinned. (Ibn Majah)

The Fiqh

The Hanafi fiqh scholars mention that before one start their journey to expiate previous prayers and fasting one should seek sincere tawba.

Making up Obligatory Prayers

With regards to your prayers:

  1. Make a reasonable, safe estimate of the number of prayers that you think you have missed.
  2. Make a manageable schedule, and pray them consistently, without fail.
  3. Strive to complete them as they were due (with the sunna actions) and making the intention of drawing closer to one’s Lord.

Making up Obligatory Fasts

As for your obligatory (Ramadan) fasts, you will need to:

  1. Perform a single expiation. The expiation is to fast sixty consecutive days. Ensure that either Eid does not fall in one’s sixty day period.
  2. Next, make a reasonable, safe estimate of the number of fasts that you think you have missed. Do this by:
    1. Assuming there are thirty days of Ramadan each year
    2. Counting the number of years of Ramadan between puberty and the time one is reasonably sure that one was fasting the whole month. (For example, 15 years would be 450 fasts)
    3. Making a reasonable, safe judgement on how many of these were valid and how many were not. (For example, assuming 5 fasts were valid each year, 300 fasts would need to be made up)
    4. And then commit to fasting them until you lift them entirely from your dues. [Shurunbulali, Maraqi al-Falah; Ala al-Din Abidin, al-Hadiyya al-`Ala’iyya]

The Hanafi and Maliki madhhab concur that 60 days of consecutive fasting are necessary, the Shafi’i and Hanbali method said it’s not required to be consecutive.