Maximum period for nifaas is 40 days
Question

What is the longest that nifaas (post-partum bleeding) can last?
Praise be to Allah.There is a difference of opinion among the scholars concerning that. 
1 – Most of the scholars said that the longest that nifaas can last is 40 days; if the bleeding lasts longer than that then it is istihaadah (irregular vaginal bleeding) unless it coincides with her regular period. This is the view of Abu Haneefah and Ahmad, according to one report, and is the well known view of his madhhab. This was also the ruling given by al-Tirmidhi in his Jaami’, narrating from Sufyaan, Ibn Mubaarak, Ishaaq and most of the scholars. 
2 – Maalik, al-Shaafa’i and Ahmad, according to one report, said that the longest it may last is 60 days. 
3 – al-Hasan al-Basri said that it may last between forty to fifty days; if it lasts longer than that then it is istihaadah. 
4 – There are other opinions but these are cases of ijtihaad for which there is no saheeh evidence apart from the first view. It was proven that Ibn ‘Abbaas (may Allaah be pleased with them both) said: “The woman in nifaas should wait for approximately forty days.” (Narrated by Ibn al-Jaarood in al-Muntaqa). 
Ahmad, Abu Dawood, al-Tirmidhi and Ibn Maajah narrated via Massah al-Azdiyyah that Umm Salamah said: “At the time of the Messenger of Allaah (peace and blessings of Allaah be upon him), the woman in nifaas would wait for forty days…” 
There is some dispute concerning this isnaad. Ibn Qattaan classed it as da’eef (weak) in Bayaan al-Wahm wa’l-Ayhaam, as did Ibn Hazm. Al-Haakim classed it as saheeh and al-Nawawi and others classed it as hasan. 
Ibn ‘Abd al-Barr (may Allaah have mercy on him) said in al-Istidhkaar, with regard to the maximum period of nifaas there is no opinion to be followed  except the opinion of those who say that it is forty days. This is the view the companions of the Messenger of Allaah (peace and blessings of Allaah be upon him), and there was no dispute among them concerning this matter. All other opinions are those of people other than the Sahaabah, and in our view no other opinion can be counted because the consensus of the Sahaabah is evidence for those who came after them. Usually everyone feels comfortable with their opinion; how could anyone hold a different view with no evidence from the Sunnah? This view is the correct one, and that is for a number of reasons: 
1-It is the view of the Sahaabah and no one has the right to go against them.
2-It is essential in this case to define a number of days during which a woman may remain in nifaas; it is not permissible to ignore the view of the Sahaabah and accept someone else’s view.
3-This is the view of doctors who are specialized in knowledge of this bleeding. Their view coincides with that of Ibn ‘Abbaas and of most of the scholars.
 With regard to the minimum length of nifaas, most of the scholars have not set any limit for that. If the woman sees that she is pure (taahir) – which is when the bleeding stops – then she should do ghusl and start praying. 
Imaam Abu ‘Eesa al-Tirmidhi (may Allaah have mercy on him) said in al-Jaami’ that the view of the scholars among the Sahaabah, Taabi’een and those who came after them was that the woman in nifaas should not pray for forty days unless she sees that she is pure before that, in which case she should do ghusl and start praying.