ca99214
Returning Member

Capital Gain Exclusion Question

I purchased my home on 10/1/2008 as my primary residence and lived in it for several years. I converted it to a rental property on 5/1/2017. I then converted it back to my primary residence on 12/31/2022. I then sold the property on 12/31/2024. So it was my primary residence for 2 of the last 5 years. Can the entire gain from sale be excluded from capital gains tax on my federal income tax return since it was first my primary residence before I rented it out?