Abdullah bin Muhammad bin Abd al-Aziz (may Allah have mercy on him) said: Imam Ahmad bin Hanbal (may Allah have mercy on him) was asked about women in nifas, while I was listening (to the conversation): how long should they sit when they see blood? He said: Forty days, then they will perform ghusl.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحيض / 1612