No — if someone genuinely forgets they are fasting and eats or drinks, their fast remains valid and they should simply stop and continue fasting as soon as they remember. The Prophet was explicit about this: 'If someone forgets while fasting and eats or drinks, he should complete his fast, for it is Allah who fed him and gave him drink' (Sahih al-Bukhari 1933, Sahih Muslim 1155). This is one of the clearest examples in Islamic law of how intention is central to a valid or invalid act of worship — the fast is only broken by a deliberate choice to eat, drink, or do anything else that invalidates it, not by an accident. The same principle is generally extended by scholars to other accidental situations, such as water unintentionally entering the mouth while rinsing during wudu. The one condition is genuine forgetfulness: as soon as a person realizes what has happened, they must stop immediately and not continue eating or drinking, since continuing at that point becomes a deliberate act. This ruling is a source of real comfort for many fasting people, removing unnecessary anxiety over honest mistakes and reflecting the Quran's broader theme that Allah does not burden a soul beyond what it can bear.
Q&A · Fasting
If I accidentally eat or drink while fasting out of forgetfulness, is my fast broken?
References
Sahih al-Bukhari 1933Sahih Muslim 1155
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.