TLDR: You calculate the capital gain by taking into account the sale price, the acquisition price and eligible fees or expenses. An exemption may apply to the first sale of a property other than your main residence if you reinvest all or part of the proceeds in the purchase or construction of your main residence within twenty-four months.
Calculating the capital gain
You determine the taxable capital gain by subtracting the acquisition price from the sale price.
The sale price is reduced by the taxes and costs borne by the seller in connection with the sale. The acquisition price may be increased by certain acquisition costs as well as construction, reconstruction, extension, renovation or improvement expenses, subject to the applicable conditions.
The capital gain therefore does not necessarily correspond to the simple difference between the price at which you bought the second home and the price at which you resell it.
A possible exemption in the event of reinvestment
Upon the first sale of a property other than your main residence, you may benefit from an exemption subject to reinvesting the sale proceeds in the purchase or construction of a property intended to become your main residence.
The reinvestment may be total or partial. When it concerns a construction, the amount reinvested may include the purchase price of the land and the construction cost, provided that these amounts can be substantiated.
The twenty-four-month period
You must make the reinvestment within twenty-four months following the sale of the second home.
For a construction, the expenses corresponding to the land and the work must be substantiated no later than the end of this period.
If the reinvestment made is less than the planned amount
If you ultimately reinvest an amount lower than the amount declared to obtain the exemption, you must file an amended return. This return indicates the portion of the capital gain that remains taxable and is accompanied by payment of the corresponding tax.
The taxable portion must also be reported on the comprehensive income tax return.
The main residence is subject to a separate regime
The sale of a property constituting your main residence is subject to an exemption regime separate from the one applicable to the sale of a second home.