How to calculate your capital gain or loss
General rules for computing gain or loss
Section 40 provides the formula for computing a capital gain or loss: proceeds of disposition minus adjusted cost base minus outlays and expenses on disposition.
Plain-language explanation
Section 40 gives the arithmetic for capital gains calculations:
Capital gain = Proceeds − ACB − Outlays and expenses
Proceeds of disposition: What you received for the property — cash, fair market value of non-cash consideration, or in some cases a deemed amount (e.g., at death, the deceased is deemed to have disposed of property at FMV).
Adjusted cost base (ACB): Your original cost plus acquisition costs, adjusted for improvements (real estate), additional purchases of identical shares (averaging), and various elections and rollovers. For identicalshares, you average all purchases.
Outlays and expenses: Costs of disposing — real estate commissions, legal fees on a sale, transfer taxes paid by the seller.
Reserves: Under s.40(1)(a)(iii), if you receive proceeds over time (installment sale), you can claim a reserve — defer recognition of part of the gain to match cash receipt. The reserve must be brought into income no later than 5 years after the disposition (some exceptions for farm/fishing property and small business shares).
Example
Sophie sold a rental condo: proceeds $700,000, ACB $400,000, real estate commission $28,000, legal fees $3,000. Capital gain: $700,000 − $400,000 − $31,000 = $269,000. Taxable capital gain (50%): $134,500.
Amendment history
Significant changes to this provision. Older versions help you understand rules that applied in prior tax years.
Capital gains reserve rules tightened for real estate sold to non-arm's-length purchasers. Previously, sellers could defer gain recognition for up to 5 years using a reserve when taking back a vendor-take-back mortgage. Anti-avoidance rules now prevent artificial deferral through non-arm's-length transactions.
Before
Reserve available in all dispositions with deferred proceeds
After
Reserve limited for non-arm's-length transactions; anti-avoidance applies to abusive defer arrangements
Common questions
Can I deduct real estate agent commissions from my capital gain? +
Yes. Real estate commissions and legal fees paid on a sale are "outlays and expenses" that reduce your capital gain under s.40.
What is a capital gains reserve? +
If you sell property on installments, you can defer part of the gain under a reserve. For each $1 of deferred proceeds, you defer a proportional share of the gain. The full gain must be recognized within 5 years (10 years for qualifying farm/fishing property and small business corporation shares).
How do I calculate ACB for stocks I bought in multiple transactions? +
For identical properties (shares of the same class of the same company), you average your total cost across all purchases. Example: bought 100 shares at $20 = $2,000, then 100 more at $30 = $3,000. Total ACB: $5,000 for 200 shares = $25/share average ACB.
Key terms
Related sections
Source: Income Tax Act, RSC 1985, c. 1 (5th Supp.), section 40. — Read the official text on Justice Canada
These summaries are for educational purposes only and do not constitute legal or tax advice. Speak with a CPA for advice on your specific situation.