Does masturbation invalidate fasting?
Fasting is a training of self control with the aspect of consciously abstaining from desires of nafs (inner self). It is an effective method to take desires of nafs under control, and purify and exalt the soul. It turns out that those who are defeated by their lustful desires have failed in this training of will.
Masturbating while observing fasting invalidates the fast and requires a one-day make up (qada). Those who commit this act need to both perform qada for the invalidated fasting and repent to Allah to be forgiven.
The fact that masturbating does not require kaffarah (atonement) does not mean that it is an insignificant sin. On the contrary, those who invalidate their fast witout a valid excuse commit a major sin (Zaylai, Tabyin, I, 323; Ibn Nujaym, al-Bahr, II, 293).
Source: Presidency Of Religious Affairs The Turkey, High Board of Religious Affairs FATWAS,