If you owned and used 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 and use requirements.
The date of sale appears in box 1 of Form 1099-S.
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.
To figure the gain or loss on the sale of your main home, you must know the selling price, the amount realized, and the adjusted basis. Subtract the adjusted basis from the amount realized to get your gain or loss.
Gain or loss
Gain is the excess of the amount realized over the adjusted basis of the property. Gain is the true amount that is generally taxable but if this was your main home as I described above, you report and then show the exclusion.
Schedule D (Form 1040). Report it on line 1 or line 8 of Schedule D, depending on how long you owned the home. If you qualify for an exclusion , show it on the line directly below the line on which you report the gain. Write "Section 121 exclusion" in column (a) of that line and show the amount of the exclusion in column (f) as a loss (in parentheses).