Masturbation and fasting
In the name of Allah, the most Beneficent, the most Merciful.
Answer
Masturbation is haraam and unlawful. With regards to your question, ones fast will break however there is only qadha but no kaffarah (expiation). (Fatawa Darul Uloom Deoband p.417 v.6)
Kaffarah is only compulsory if someone breaks the fast of Ramadhan intentionally by eating, drinking or engaging in sexual intercourse. (Kitabul Fiqh p.906 v.1)
In masturbation, a person is only deriving a partial enjoyment or benefit compared to full sexual intercourse. Therefore, the jurists have said that only qadha will be done for the fast broken through masturbation and there will be no need of a kaffarah. (Maraqi Falah)
Only Allah Knows Best
Mohammed Tosir Miah
Darul Ifta Birmingham