What is the ruling on the prayers and days that the questioner spent without performing ghusl or knowing the ruling on what is emitted from him, given that he has repented and stopped practicing masturbation?
There is no obligation to make up prayers and fasts that were performed before puberty, because the person who performed them was not yet accountable.
As for after puberty, you must make up the prayers you performed while in a state of major ritual impurity (janabah) if you are certain that what was discharged from you was semen. Purity is a condition for the validity of prayer, and this is the fatwa (religious edict) adopted by us. If you do not know their number, then exert effort in estimating them.
As for fasting, if semen was discharged from you during the daytime in Ramadan, and you knew that it invalidates the fast, then you must make up that day. However, if you were ignorant that it invalidates the fast, then your fast is valid, and you are not required to make it up.
Be keen to stay away from this bad habit and to keep company with the righteous.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/121789