2 out of 5 year rule for home sale exclusion after renting it out — does my situation qualify?
Trying to figure out if I still qualify for the home sale exclusion after renting my place out for a few years. I bought the house in 2018, lived in it as my main home until early 2022, then rented it out. Just accepted an offer and I'm closing next month. I've seen the phrase "2 out of 5 year rule" thrown around but I'm not totally sure how it works when you've had renters. My total gain is going to be substantial so this matters a lot. I've been reading Publication 523 on irs.gov but the ownership vs. residence test language is a bit confusing to me. Does my rental period reset anything? And does it matter that the 2 years of residence weren't right before the sale — they ended a couple years ago?