Can You Break a Voluntary Fast?
Question

If a person intends to observe a supererogatory fast, then he is invited to eat when visiting some relatives and he eats, is there any sin on him, or does he have to repeat that day so long as he intended to fast?
Praise be to Allah.If a Muslim intends to fast one day and starts to fast, then he wants to break that fast, he may do so, because completing a voluntary fast is not obligatory . But it is recommended for him to complete it if he has no reason for not doing so or no reason for breaking it; if there is a reason for breaking his fast there is no sin in doing so. 
This is indicated by a number of Hadiths, including the following: 

Muslim (1154) narrated that `Aishah (may Allah be pleased with her) said: The Prophet (peace and blessings of Allah be upon him) entered upon me one day and said: “Do you have anything (any food)?” We said, “No.” He said, “Then I am fasting.” Then he came to us another day and we said, “O Messenger of Allah, we have been given some hays (a kind of food made from dates and ghee).” He said, “Show it to me, for I started the day fasting.” Then he ate. 

An-Nawawi (may Allah have mercy on him) said: 
“This clearly supports the view of Ash-Shafi`i and those who agreed with him, that a supererogatory fast may be broken , and one may eat during the day and cancel the fast, because it is a voluntary fast, and the person has the choice whether to start it and continue it. Among those who were of this view are a number of the Companions, Ahmad, Ishaq and others, but all of them (may Allah have mercy on them), and Ash-Shafi`i too, agreed that it is recommended to complete the fast. Abu Hanifah and Malik (may Allah have mercy on them) said that it is not permissible to break the fast and doing so is a sin. This is also the view of Al-Hasan Al-Basri, Makhul and An-Nakh`i (may Allah have mercy on them); they said that it is obligatory for the one who breaks the fast without an excuse to make it up. Ibn `Abd Al-Barr (may Allah have mercy on him) said: They unanimously agreed that the one who has an excuse for breaking the fast does not have to make it up. And Allah knows best.” 

Ahmad (26353) narrated from Umm Hani’ (may Allah be pleased with her) that the Messenger of Allah (peace and blessings of Allah be upon him) entered upon her and called for something to drink, and drank some, then he passed it to her and she drank some. She said: “O Messenger of Allah, I was fasting.” The Messenger of Allah (peace and blessings of Allah be upon him) said: “The one who is observing a voluntary fast is his own master; if he wishes he may (continue to) fast and if he wishes he may break his fast.” (Classed as authentic by Al-Albani in Sahih Al-Jami`, 3854) 

It says in Tuhfat Al-Ahwadhi, commenting on this Hadith: 
“The Hadiths on this topic indicate that it is permissible for the one who is observing a voluntary fast to break it, especially if he is invited to eat by a Muslim .” 

Al-Bayhaqi (may Allah have mercy on him) narrated that Abu Sa`id Al-Khudri (may Allah be pleased with him) said: Some food was made for the Prophet (peace and blessings of Allah be upon him) and when it was served a man said: “I am fasting.” The Messenger of Allah (peace and blessings of Allah be upon him) said: “Your brother has invited you and made this effort for you. Break your fast and make it up later if you wish.” Ibn Hajar (may Allah have mercy on him) said: “Its chain of narration is good.”

And Allah knows best.