Quick overview
When you sell real estate you may owe taxes on the profit (capital gain) and must often report the sale to the IRS. Which taxes apply and how you report the transaction depend on the property’s use (personal, rental/investment, or business), whether you claimed depreciation, and whether you qualify for exclusions such as the primary residence exclusion. The IRS’s guidance and forms commonly involved include Publication 523 (Selling Your Home), Form 8949 and Schedule D (Capital Gains), Form 4797 (Sale of Business Property), and Form 8824 (Like‑Kind Exchanges) [see IRS Pub. 523; IRS Form 8949 instructions; IRS Form 4797 and Form 8824 pages].
This article explains reporting mechanics, common adjustments to basis, how exclusions and depreciation recapture work, and practical strategies I use in client planning. It’s educational and not personalized tax advice—consult a CPA for transaction‑specific guidance.
How gain is calculated (cost basis and adjusted basis)
- Starting point: Cost basis usually equals the purchase price plus certain acquisition costs (e.g., settlement fees). Add qualifying capital improvements (e.g., an addition, new roof) that increase the value or life of the property.
- Reduce basis by allowable depreciation taken while the property was used for rental or business.
- Amount realized equals sale price minus selling costs (agent commissions, some closing costs).
- Taxable gain = Amount realized − Adjusted basis.
Example: Buy for $300,000, make $40,000 in qualifying improvements, and sell later for $500,000 with $30,000 in selling costs. Adjusted basis = $300,000 + $40,000 = $340,000. Amount realized = $500,000 − $30,000 = $470,000. Real gain = $470,000 − $340,000 = $130,000.
If the property was rented at any point, part of that gain may be treated as depreciation recapture and taxed differently (see section below).
Primary residence exclusion (ownership and use tests)
If the property was your main home, you may exclude up to $250,000 of gain ($500,000 for married filing jointly) if you meet both tests:
- Ownership test: you owned the home for at least 2 of the 5 years before the date of sale.
- Use test: you lived in the home as your main residence for at least 2 of the 5 years before sale.
These two years do not need to be continuous and short absences (temporary work assignment, illness) often don’t disqualify you. The exclusion generally can only be used once every two years. If you qualify and exclude the entire gain, you often don’t need to report the sale on your return (IRS Publication 523). If you received Form 1099‑S or can’t exclude the whole gain, report the sale on Form 8949 and Schedule D.
There are limited exceptions and partial exclusions when the sale is due to certain unforeseeable events or changes in employment; these rules are detailed in IRS guidance.
Sources: IRS Publication 523; IRS Topic 701.
Reporting: which forms and when to file
- Primary residence fully excluded: generally no reporting required (Pub. 523), unless you receive Form 1099‑S or have a disallowed deduction or other reporting trigger.
- Sales with taxable gain: report on Form 8949 (Sales and Other Dispositions of Capital Assets) and carry totals to Schedule D (Capital Gains and Losses).
- Sales of business or property used in a trade: may need Form 4797 (Report of Sale of Business Property) to report ordinary income portions and recapture.
- Like‑kind exchanges to defer tax on investment real estate: report using Form 8824.
- Installment sales: use Form 6252 to report payments received over time.
Always keep closing statements (HUD‑1/Closing Disclosure), receipts for improvements, and records of depreciation claimed. These documents substantiate your basis and any excluded or taxable gain.
Sources: IRS Form 8949 instructions; IRS Form 4797; IRS Form 8824.
Depreciation recapture and special tax rates
If you claimed depreciation on rental or business real estate, a portion of the gain attributable to that depreciation is “recaptured” and taxed differently:
- Unrecaptured Section 1250 gain (from depreciation on real property) is taxed at a maximum federal rate of 25% for individuals. This is separate from long‑term capital gains tax rates (0%, 15%, 20%) that apply to other appreciated gain above basis.
- For Section 1250 issues and sales of depreciable property used in a trade, report the appropriate amounts on Form 4797 and include the remaining net capital gain on Schedule D.
Because depreciation lowers your basis, it increases the realized gain; track depreciation carefully to avoid surprises.
Source: IRS guidance on depreciation recapture and Form 4797.
Inherited property and step‑up in basis
Property inherited from a decedent generally receives a stepped‑up basis to fair market value on the date of death (or alternate valuation date if chosen by the estate), which can dramatically reduce or eliminate capital gains tax when sold soon after inheritance. This is different from property you sell that you purchased.
If you’re dealing with inherited property, see related guidance on basis and timing; for more detailed planning on this topic, see our glossary entry “Capital Gains Considerations for Inherited Property”.
Internal link: Capital Gains Considerations for Inherited Property — https://finhelp.io/glossary/capital-gains-considerations-for-inherited-property/
Common planning strategies I recommend
- Maximize the primary residence exclusion when possible: If you or your spouse qualify, the $250k/$500k exclusion can eliminate thousands in tax.
- Time a sale for a low‑income year: Long‑term capital gains rates are income‑based (0/15/20%). Realizing gain in a year with lower taxable income can reduce or eliminate federal capital gains tax.
- Use a 1031-like strategy for investment real estate: A properly executed like‑kind exchange (deferred using Form 8824) can postpone tax when you reinvest proceeds in qualifying property. Note: Section 1031 exchanges for real property remain available for business/investment real property but no longer apply to personal property. Consult a qualified intermediary and tax advisor.
- Consider an installment sale: Spreading receipts over years may lower taxable income in each year and reduce the effective tax rate.
- Account for depreciation recapture: If a property was rented, expect some portion of gain to be recaptured and taxed at higher rates. Consider net‑effective tax costs when pricing or negotiating sales.
For deeper tactical pieces about reducing gains from property sales, see our related article “Strategies to Reduce Tax on Capital Gains from Property Sales”.
Internal link: Strategies to Reduce Tax on Capital Gains from Property Sales — https://finhelp.io/glossary/strategies-to-reduce-tax-on-capital-gains-from-property-sales/
Common mistakes and compliance pitfalls
- Failing to document capital improvements: Missing receipts or proof for improvements reduces your allowable basis.
- Ignoring depreciation history: Not recapturing or misreporting depreciation can trigger IRS adjustments and penalties.
- Not checking for reporting triggers: Even if you expect exclusion, receiving Form 1099‑S or having nonqualified use can mandate reporting.
- Overlooking state taxes: Many states tax capital gains from property sales; rules and rates vary widely.
Example scenarios (concise)
1) Primary home sale — full exclusion: Married couple bought for $300,000, sold for $600,000 after >2 years’ ownership and use. Gain = $300,000; exclusion = $500,000 MFJ → no federal tax and likely no reporting required under Pub. 523.
2) Rental converted to primary residence: Owner rented a house for 5 years (claimed depreciation) then moved in and sold after meeting the 2‑year use test. They qualify for the exclusion for gain attributable to nondepreciation appreciation, but must recapture depreciation (taxed as unrecaptured Section 1250 at up to 25%).
3) Investment property with 1031 exchange: Seller defers tax by rolling proceeds into like‑kind property using a qualified intermediary and filing Form 8824. Taxes are deferred until a later taxable disposition.
Recordkeeping checklist (what to keep and for how long)
- Closing disclosures (purchase and sale)
- Receipts/invoices for capital improvements
- Records of mortgage interest and property tax payments (for prior deductions)
- Depreciation schedules and tax returns showing depreciation taken
- Forms 1099‑S, Form 8824, Form 4797, Form 8949, and Form 6252 if applicable
Keep records for at least three to seven years after filing, and longer if the property transaction affects basis or depreciation recapture—consult your tax advisor for retention policies tailored to your situation.
Final notes and professional perspective
In my 15+ years advising clients on property sales, the single most common surprise is underestimating the effect of depreciation and missing documentation for basis adjustments. Early planning—documenting improvements, considering timing relative to income, and consulting a CPA before executing complex transactions such as 1031 exchanges—reduces audit risk and often saves tax.
This article is educational and does not replace personalized tax advice. For transaction‑specific guidance, consult a licensed CPA or tax attorney.
Authoritative resources
- IRS Publication 523, “Selling Your Home” (irs.gov)
- IRS Instructions for Form 8949 and Schedule D (irs.gov)
- IRS Form 4797 and instructions (irs.gov)
- IRS Form 8824, “Like‑Kind Exchanges” (irs.gov)
- Consumer Financial Protection Bureau — home buying/selling resources (consumerfinance.gov)
Disclaimer: This content is for general information only and is not tax, legal, or financial advice. Individual facts vary; consult a qualified tax professional before acting.

