How many Ramadans did Prophet Muhammad fast?

Prophet Muhammad, peace be upon him, lived for approximately 63 years and was obligated to fast the month of Ramadan from the time he received the first revelation at the age of 40 until his passing. Assuming he fasted every year from that point onwards, he would have observed around 23 Ramadans. However, due to certain events such as military campaigns and his last illness, there might have been a few Ramadans that he was unable to complete. For instance, there are reports indicating that he broke his fast during one Ramadan during the expedition of Tabuk due to severe weather conditions. Therefore, while the total number is generally estimated to be around 23 Ramadans, there may have been minor exceptions based on specific circumstances.