All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
Shaykh Ibn ‘Uthaymeen said: "According to scholars, if a woman has a miscarriage after the third month, she should not pray because at this time the fetus is formed and the blood that comes out is post-partum bleeding. Scholars have stated that the formation of the fetus might be seen after eighty-one days and this is less than three months. This woman should remember whether or not the miscarriage took place before the eighty days. If the miscarriage was before this, she should make up for the prayers that she missed. If she does not know the exact number, she should do her best to estimate the number of days and pray what she thinks she missed."
Allaah Knows best.