can you write off stock losses against real estate gains
Offsetting stock losses against real estate gains
This article addresses the practical tax question: can you write off stock losses against real estate gains, and if so, how does that work in different jurisdictions? Early answer: in many countries (including the U.S. and Canada) capital losses from stocks generally offset capital gains from the sale of real property — but the full picture depends on how the real‑estate gain is broken down (capital appreciation vs depreciation recapture), the taxpayer’s filing status, anti‑avoidance rules (wash sale / superficial loss), and reporting requirements. This guide explains the rules, gives numeric examples, and lists a step‑by‑step checklist so you can follow through when you sell stocks or property.
Note on sources and timing: as of June 1, 2024, according to IRS publications and guidance and Canada Revenue Agency material, the core netting rules described here were in effect; consult the source documents listed under References for the latest updates. — 截至 2024-06-01,据 IRS Publication 544 和 CRA 指南 报道,这些净额规则为主流指南。
Keyword note: this guide repeatedly answers the question "can you write off stock losses against real estate gains" with jurisdictional detail and examples so you can apply the rule to your situation.
Key concepts
Before applying rules, define the central terms used throughout this guide.
- Capital gain / capital loss: the increase or decrease in value realized when you sell a capital asset (stocks, bonds, investment real estate) for more or less than your adjusted basis. If selling price > basis → capital gain. If selling price < basis → capital loss.
- Ordinary income: income taxed at ordinary rates (wages, business income, some recapture items). Ordinary income is distinct from capital gain for tax‑netting rules.
- Adjusted basis (U.S.) / Adjusted cost base (ACB, Canada): the asset’s original cost adjusted for improvements, depreciation taken, commissions, and other items — used to compute gain or loss.
- Inclusion rate (Canada): the portion of a capital gain that is included in taxable income (e.g., if the inclusion rate is 50%, only half of the capital gain is taxable). Inclusion rates can change and affect the taxable impact of gains and losses.
- Netting hierarchy: how gains and losses are combined by category (short‑term vs long‑term, capital vs ordinary) before arriving at a taxable amount.
This guide will return to these definitions as they apply to the U.S. and Canada.
How netting works (general principles)
In many tax systems, realized capital losses are applied against realized capital gains before considering other offsets. The high‑level steps are:
- Separate realized gains and losses by character (capital vs ordinary). For capital assets, separate short‑term and long‑term where applicable.
- Net same‑category gains and losses (e.g., long‑term gains minus long‑term losses). If one side is larger, a net gain or loss remains.
- If both short‑term and long‑term nets exist, they are combined following system rules (for example, in the U.S. a net short‑term loss may offset net long‑term gain and vice versa at Schedule D netting).
- If a net capital loss remains, rules determine whether it reduces ordinary income (U.S.: up to $3,000 per year for individuals) or must be carried forward/carryback (Canada: carryback 3 years, carryforward indefinitely for net allowable capital losses).
Across jurisdictions, the common principle is: capital losses first attack capital gains. So, to the question "can you write off stock losses against real estate gains," the typical short answer is yes — stock capital losses can reduce taxable capital gains from selling real estate — but there are important caveats below.
Short‑term vs long‑term netting
Many tax systems distinguish short‑term and long‑term capital gains and losses (U.S. tax law is a clear example). Short‑term typically means assets held one year or less; long‑term is more than one year. The netting sequence typically goes:
- Net short‑term gains and losses into a single short‑term figure.
- Net long‑term gains and losses into a single long‑term figure.
- Combine short‑term and long‑term nets to arrive at an overall capital gain or loss.
When you ask "can you write off stock losses against real estate gains," note that whether a stock loss offsets a real‑estate gain may depend on the holding periods of each asset: a short‑term stock loss may first offset short‑term real‑estate gain; after category netting, any remaining capital loss offsets remaining capital gain regardless of original holding periods, per the jurisdiction’s netting rules.
Treatment of real estate sale gains — components that matter
A sale of real property typically produces multiple tax components:
- Appreciation in property value (capital gain component). This is usually capital in character and can be offset by capital losses.
- Depreciation recapture (if property was used for business or rental and depreciation was taken). Portions recaptured as ordinary income cannot always be offset by capital losses.
- Unrecaptured depreciation taxed at special rates (e.g., U.S. unrecaptured Section 1250 gain) — this is treated as a capital gain but may be taxed at different maximum rates.
- Gain attributable to inventory or dealer activity (if you are a property dealer, you may treat sales as ordinary business income rather than capital gains).
Because these components carry different tax characters, the simple question "can you write off stock losses against real estate gains" requires examining which component you are trying to offset.
Depreciation recapture and its tax character
Depreciation recapture rules change the character of part of a real‑estate sale gain: amounts equal to prior depreciation deductions are often recaptured as ordinary income (fully or partially) rather than capital gain. Key U.S. distinctions:
- Section 1245 property (generally personal property and certain depreciable property) has recapture taxed as ordinary income when sold at a gain.
- Section 1250 property (real property) historically had some ordinary recapture, but most depreciation on real property created a capital gain; current U.S. rules treat certain 1250 recapture as "unrecaptured Section 1250 gain" and tax it at a maximum 25% rate (treated as capital gain for netting but has special rate treatment). However, some 'additional compensation' may be ordinary income if accelerated depreciation methods were used for real property.
The practical consequence: when you sell a rental building that you depreciated, some portion of the gain attributable to depreciation may be taxed as ordinary income (or subject to special 25% cap rules); capital losses from stocks typically cannot offset ordinary income recapture dollar‑for‑dollar — they can only offset capital gain components unless special rules permit otherwise.
United States — applicable rules and examples
U.S. federal rules summarized (based on IRS guidance, Publication 544 and Schedule D/Forms guidance):
- Capital losses offset capital gains. Net capital loss is deductible against ordinary income up to $3,000 per year for individuals ($1,500 if married filing separately). Excess net capital loss carries forward indefinitely to future years.
- Depreciation recapture: portions of gain equal to prior depreciation deductions on property used in a trade or business may be recaptured as ordinary income under Sections 1245 or treated as unrecaptured Section 1250 gain; these portions may not be fully offset by capital losses, because they are ordinary income (Section 1245) or specially treated capital (unrecaptured 1250).
- Reporting: sales of stocks and other securities are reported on Form 8949 and Schedule D. Sales of business property (including depreciable property) are reported on Form 4797 for ordinary gains due to recapture; capital gain portions flow to Schedule D. Netting between Forms 4797 and Schedule D follows the tax rules to combine capital and ordinary categories appropriately.
Can you write off stock losses against real estate gains in the U.S.? Yes — stock capital losses first offset stock capital gains; if a net capital loss remains, it may offset capital gain from a real estate sale (the capital portion). However, depreciation recapture taxed as ordinary income generally remains taxable and is not directly offset by capital losses except to the limited extent allowed by the $3,000 annual net capital loss ordinary offset rule for individuals.
Example (U.S.)
Example 1 — typical individual investor situation:
- You sell publicly traded stock at a $50,000 long‑term capital loss.
- In the same year you sell a rental property with total gain $60,000. That gain comprises $45,000 of appreciation (capital in character) and $15,000 of depreciation recapture taxed as ordinary income (Section 1245/1250 effects).
Netting steps:
- Capital items: $45,000 capital gain (property) vs $50,000 capital loss (stocks) → net capital loss of $5,000.
- Ordinary items: $15,000 depreciation recapture remains ordinary income.
- Apply net capital loss rule: Up to $3,000 of net capital loss can reduce ordinary income in the current year; the remaining $2,000 capital loss carries forward.
Result:
- The $50,000 stock loss more than offsets the $45,000 capital gain portion of the property sale; the taxpayer has a $5,000 net capital loss, of which $3,000 reduces ordinary income (saving tax now) and $2,000 carries forward.
- The $15,000 depreciation recapture remains taxable as ordinary income; capital losses do not directly eliminate that ordinary recapture (except via the $3,000 rule), so the taxpayer remains liable for tax on that recapture amount.
This shows how you can write off stock losses against the capital portion of a real‑estate gain, but you generally cannot fully neutralize depreciation recapture with capital losses.
Canada — applicable rules and examples
Canada Revenue Agency (CRA) rules differ from the U.S., but follow the same general idea: allowable capital losses can be used against taxable capital gains, subject to inclusion rates and carryover rules.
Key points for Canada:
- Capital losses can only be deducted against taxable capital gains (not against other types of income). They cannot be used to offset employment income or business income directly.
- CRA allows capital losses to be carried back up to three years or carried forward indefinitely to offset future taxable capital gains.
- Canada applies an inclusion rate to capital gains (commonly 50% in recent years) so the taxable portion of gains depends on the inclusion rate in effect.
- Superficial loss rules prevent claiming a capital loss if you (or an affiliated person) repurchase the same or identical property within 30 calendar days before or after the sale.
Can you write off stock losses against real estate gains in Canada? If the real‑estate gain is a capital gain (e.g., sale of an investment property, not a principal residence), an allowable capital loss from stocks can be applied against the taxable capital gain from the property. However, if the property sale involves recapture of CCA (capital cost allowance) for depreciable property (i.e., business/rental), that recapture may be treated as taxable income rather than a capital gain; capital losses cannot offset such recapture.
Example (Canada)
- You sell shares at an allowable capital loss of CAD 40,000.
- You sell an investment property with a capital gain of CAD 60,000. If the inclusion rate is 50%, the taxable capital gain is CAD 30,000.
CRA netting:
- The CAD 40,000 capital loss first applies to the capital gain of CAD 60,000 → net capital gain CAD 20,000.
- Taxable capital gain after inclusion (50% of 20,000) = CAD 10,000 taxable income.
- Alternatively, if your loss exceeds the gain, you may carryback up to 3 years or carry forward indefinitely.
If the property triggered recapture of previously claimed CCA (treated as taxable income), capital losses cannot offset that recapture.
Wash sale / superficial loss and similar anti‑avoidance rules
Tax authorities restrict transactions designed solely to create deductible losses while keeping an economic position in the same asset. The two main rules:
- U.S. wash sale rule: disallows a loss deduction on the sale of a security if you buy the same or a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the basis of the newly purchased securities.
- Canada superficial loss rule: disallows the capital loss if you or an affiliated person acquire the same or identical property within 30 days before or after the disposition and you still own the property at the end of that 30‑day period.
Why this matters: if your plan is to realize a stock loss to offset a real‑estate capital gain, be careful not to repurchase the same or substantially identical stock within the forbidden window or you may lose the tax benefit. Consider using substantially different securities, exchange‑traded funds with different composition, or a brief waiting period if maintaining market exposure is important.
Practical alternatives to remain invested without triggering the rule:
- Buy a similar but not "substantially identical" security (e.g., sector ETF vs single stock), or a diversified fund that tracks a different index.
- Use cash and wait out the 31+ days (U.S.) or 31+ days (Canada) before reentering the same security.
- Use non‑identical derivatives cautiously; the IRS treats many synthetic positions as substantially identical in complex cases.
Reporting, documentation and timing
Accurate reporting and records are essential when you offset stock losses against real estate gains.
U.S. reporting highlights:
- Stocks and securities: report sales on Form 8949 and Schedule D (Form 1099‑B from brokerages provides transaction details). Include acquisition date, sale date, proceeds, cost basis, and adjustments.
- Real property: sales often require Form 4797 (for business property) and Schedule D (for capital portions). Depreciation recapture calculations must be supported by depreciation schedules and prior years’ Form 4562 filings.
- Keep documentation for basis adjustments: purchase price, closing statements, improvements, commissions, settlement dates, evidence of depreciation claimed.
Canada reporting highlights:
- Report capital gains and losses on Schedule 3 of the T1 return; keep records of adjusted cost base (ACB), dispositions, sales documents, improvement receipts, and depreciation (CCA) schedules.
- If carrying back losses, file the appropriate requests (e.g., T1 adjustments) and maintain the supporting documentation.
Timing considerations:
- Realized vs unrealized: only realized gains/losses (completed sales) are used in the netting computation.
- Settlement date vs trade date: for securities, brokers usually report trade date or settlement date; follow tax authority guidance for which date governs the character and timing of the sale.
- Year‑end planning: tax‑loss harvesting often occurs late in the tax year to offset gains realized during the year; be mindful of wash sale / superficial loss windows when planning replacements.
Practical considerations and planning strategies
Several practical tactics can help you make effective use of stock losses when you also have real‑estate gains:
- Tax‑loss harvesting: sell losing securities to realize losses that offset capital gains. This is especially useful when you have large capital gains from property sales.
- Match gains and losses in the same tax year when possible to avoid withholding cash to pay taxes; if you can offset gains with losses, you preserve liquidity.
- Preserve market exposure: buy a non‑identical security to maintain market exposure without violating wash sale / superficial loss rules.
- Monitor holding periods: converting short‑term losses into long‑term attributes by repurchase strategies can affect future tax rates and netting.
- Consider installment sales or like‑kind exchanges (where applicable) to defer gains — but these strategies have complex rules and tradeoffs (like‑kind exchanges for real property have special rules and are not available for stocks).
- For properties with business use or rental: review depreciation recapture potential; accelerating or deferring deductions may change recapture timing.
Corporate, partnership, trust, and estate taxpayers have different netting and carry rules, so consult a tax advisor for entity‑specific planning.
Special situations and exceptions
- Principal residence: in many jurisdictions (U.S., Canada), gain on sale of a primary residence may be excluded from capital gains taxation up to specific limits (U.S.: Section 121 exclusion), so capital losses from stocks cannot generally be used to offset excluded residence gain because the gain is excluded.
- Dealer inventory and active traders: if you are a property dealer or a dealer in securities, gains and losses may be treated as ordinary business income/loss and subject to different netting rules.
- Installment sales: gain reported over multiple years; capital losses realized in a single year may not fully offset installment gain recognized in later years; consult rules on installment sale reporting.
- Like‑kind exchanges: current rules often restrict like‑kind exchange treatment to real property only; sales exchanged under Section 1031 (U.S.) defer gain but also complicate the ability to offset with contemporaneous losses.
- NIIT and surtaxes: capital gains may be subject to additional taxes (e.g., Net Investment Income Tax in the U.S.); reducing taxable capital gains through realized capital losses can affect exposure to surtaxes, but rules differ and professional advice helps.
Jurisdictional differences and cross‑border issues
Major differences to note:
- U.S.: individuals can deduct net capital loss against ordinary income up to $3,000 per year; carryforward rules apply indefinitely for excess losses. Depreciation recapture often produces ordinary income or special capital categories with distinct rate caps.
- Canada: capital losses can only offset taxable capital gains, and may be carried back 3 years or forward indefinitely. Inclusion rate (commonly 50%) makes taxable impact different from the U.S. Partial offsets against ordinary income are not permitted.
Cross‑border issues:
- Residency matters: nonresidents selling property located in one country may have withholding obligations or different tax treatment; double tax treaties can change how gains are taxed and whether foreign losses may offset domestic gains.
- Consultation with a cross‑border tax professional is essential when you have investments in multiple jurisdictions; timing, reporting, and available offsets can vary widely.
Step‑by‑step checklist for taxpayers
Follow these steps when you consider using stock losses to offset property gains:
- Identify all realized gains and losses for the tax year; separate capital vs ordinary items.
- Compute adjusted basis / ACB for each asset (stocks, property), including commissions and adjustments.
- Determine how much of the property gain is capital vs depreciation recapture or ordinary income.
- Apply netting rules: net short‑term and long‑term gains/losses per jurisdictional rules.
- Check wash sale / superficial loss rules before repurchasing similar securities.
- Prepare the proper forms (U.S.: Form 8949, Schedule D, Form 4797; Canada: Schedule 3 and relevant CRA forms) and maintain supporting documentation.
- Consider carryback/carryforward options for excess capital losses and whether carrying back makes sense for tax refunds.
- Consult a qualified tax advisor for complex cases (installment sales, exchanges, cross‑border issues, estate matters).
Frequently asked questions
Q: Can I use a stock loss to eliminate all tax on a property sale? A: Often you can use stock capital losses to offset the capital portion of a property sale, so yes for the capital component — but depreciation recapture (ordinary income) usually remains taxable and cannot be fully eliminated by capital losses except for limited annual offsets (U.S. $3,000 rule). See the U.S. and Canada sections for details.
Q: What about depreciation recapture — can capital losses offset it? A: Generally no. Depreciation recapture taxed as ordinary income is not offset by capital losses except via limited annual provisions (U.S. individuals) or other special treatments. Capital losses primarily offset capital gains.
Q: Can I carry losses back or forward? A: U.S.: net capital losses for individuals carry forward indefinitely; up to $3,000 may offset ordinary income each year. Canada: allowable capital losses carry back up to three years and forward indefinitely to offset taxable capital gains. Check local rules for other countries.
Q: Does the wash sale rule apply if I sell stock for a loss to offset a property gain? A: Yes. If you repurchase the same or substantially identical security within the prohibited window (U.S. 30 days before or after sale), the loss may be disallowed under wash sale rules. Canada has similar superficial loss provisions. Plan replacement trades carefully.
Q: If I hold a property as my primary home, does a stock loss offset its gain? A: Often gains on a primary residence are eligible for exclusion (U.S. Section 121) and therefore may not result in taxable capital gain to offset. If the property sale is excluded, there is no capital gain to offset. Check local principal residence rules.
References and further reading
Sources used in this guide include authoritative tax publications and reputable investment/tax planning articles. Readers should consult the original documents for details:
- IRS Publication 544, Sales and Other Dispositions of Assets (U.S. federal guidance)
- IRS guidance on capital gains and losses, depreciation recapture, and reporting (Forms 8949, Schedule D, Form 4797)
- Canada Revenue Agency (CRA) guidance on capital gains and allowable capital losses
- Industry guidance and planning articles on tax‑loss harvesting and wash/superficial loss rules (examples: bank and wealth management publications)
(For exact publication dates and latest updates, consult the IRS and CRA official sites and the referenced publications. As of 2024‑06‑01 these materials reflected the rules summarized above.)
Practical next steps and Bitget recommendation
If you actively trade securities and also hold real property, coordinate trading and property sale timing to optimize netting. When moving assets, maintain meticulous records of acquisition and sale dates, bases, commissions, and depreciation schedules.
If you use crypto or other digital assets as part of your portfolio, consider using Bitget Wallet for custody and Bitget exchange services for trading (Bitget provides trading and wallet tools that can help track realized gains and losses). Always follow anti‑avoidance rules (wash sale / superficial loss) when planning tax‑loss harvesting and consult a tax professional for personalized guidance.
Explore Bitget Wallet to help manage asset activity and maintain transaction records that support accurate tax reporting — immediate recordkeeping can simplify later reporting for capital gains and losses.
Disclaimer
This article is for informational purposes only and does not constitute tax, legal, or investment advice. Tax laws change and vary by jurisdiction; consult a qualified tax advisor or attorney for advice specific to your situation. The examples herein simplify rules for explanation and may omit special cases or exceptions.
HTML snippet for quick reference
References (selected): IRS Publication 544; IRS Form 8949 / Schedule D / Form 4797 instructions; CRA Capital Gains guidance; industry articles on tax‑loss harvesting and wash/superficial loss rules.























