Ibn Musayyib (may Allah have mercy on him) narrated that Umar ibn al-Khattab (may Allah be pleased with him) said: "If a woman is divorced and then she experiences one or two menstrual cycles, and after that her menstruation stops, she should wait for nine months. If pregnancy becomes apparent, then that is the duration of her waiting period. Otherwise, after nine months, she should wait for another three months, and then her waiting period will be complete."
Hadith Referenceمسند الإمام الشافعي / كتاب العدد والسكنى والنفقات / 1297
Hadith Takhrijاسناده صحیح اخرجه البيهقي : 7/ 419 - وفى المعرفة السنن والآثار له (4626) - وعبد الرزاق (11095)۔ و ابن ابی شیبة (18990)۔