The Prophet has outlined the compensation when a man told him that he had ruined himself by having intercourse with his wife during a day in Ramadan. The Prophet told him to free a slave. When the man mentioned that he did not have any money to buy a slave, the Prophet told him that he should fast two consecutive months. This means that he should fast for 58-60 consecutive days, without a break. If a person is unfit to do this fasting, because of ill health, then he should feed sixty poor people for a day.
Scholars have different views on whether the woman is also required to make such a compensation.
Some scholars are of the view that she need only do that in any case.