The first step is to calculate if you realize any gain on the sale?
The gain is calculated as (selling price) MINUS (adjusted basis) MINUS (selling expenses)
The basis is the original purchase price.
That basis is adjusted by improvements and some other items.
If you realize the gain - we need to verify eligibility to exclude the gain.
You can exclude up to $250,000 of gain ($500,000 if married filing jointly) on the sale of your home if you meet the Eligibility test.
Determine whether you meet the ownership requirement. If you owned the home for at least 24 months (2 years) during the last 5 years leading up to the date of sale (date of the closing), you meet the ownership requirement.
Determine whether you meet the residence requirement. If your home was your residence for at least 24 of the months you owned the home during the 5 years leading up to the date of sale, you meet the residence requirement. The 24 months of residence can fall anywhere within the 5-year period. It doesn't even have to be a single block of time. All you need is a total of 24 months (730 days) of residence during the 5-year period.
Determine whether you meet the look-back requirement. If you did not exclude gain for selling a home on your tax returns for the previous two years (and you do not intend to do so on any returns or amended returns for the past two years that are not yet filed), you meet the look-back requirement.