Step 1: Determine your amount realized
Your amount realized is everything you receive for the property minus selling costs directly attributable to the sale:
- Sale price: The gross proceeds as reported on Form 1099-S
- Less selling costs: Real estate commissions, title insurance, attorney fees, transfer taxes, recording fees, and other closing costs paid by the seller
- Plus: Any liabilities the buyer assumes (mortgage assumption adds to amount realized)
Example: Sale price $600,000 − real estate commission $36,000 − closing costs $4,000 = Amount realized: $560,000
Step 2: Calculate your adjusted basis
Adjusted basis starts at cost basis and is then adjusted up and down:
- Original purchase price: What you paid (including purchase closing costs added to basis)
- Plus capital improvements: IRC §1016(a)(1) — qualifying improvements made during ownership
- Minus depreciation: IRC §1016(a)(2) — all MACRS depreciation taken (or allowed or allowable) on the property
- Plus/minus other adjustments: Casualty loss deductions, insurance proceeds, etc.
Example: Purchase price $380,000 + improvements $45,000 − depreciation $120,000 = Adjusted basis: $305,000
Step 3: Calculate the total gain
Total gain = Amount realized − Adjusted basis
Using the examples above: $560,000 − $305,000 = $255,000 total gain
Step 4: Characterize the gain
For investment real property held more than 1 year, the gain is first allocated to two (or three) categories:
Tier 1: Unrecaptured §1250 gain (depreciation recapture)
The amount of MACRS straight-line depreciation previously deducted is taxed at a maximum federal rate of 25% under IRC §1(h)(1)(D). This applies even if the property is sold at a loss compared to the original purchase price but with enough depreciation to create a gain over adjusted basis.
In the example: $120,000 (depreciation) × 25% = $30,000 tax
Tier 2: §1231 long-term capital gain (above recapture)
The remaining gain above the depreciation recapture amount is §1231 gain taxed at long-term capital gains rates (0%, 15%, or 20% depending on taxable income). Note: §1231 losses in prior years can recapture §1231 gains as ordinary income.
In the example: ($255,000 − $120,000) = $135,000 × 15% = $20,250 tax
Tier 3: Net Investment Income Tax (NIIT)
If your modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly), a 3.8% NIIT applies to the lesser of your net investment income or the excess MAGI above the threshold.
Step 5: Apply the §121 exclusion (primary residence only)
If the property was your primary residence, you may be able to exclude up to $250,000 ($500,000 married filing jointly) of gain under IRC §121, provided:
- You owned the property for at least 2 of the 5 years before the sale
- You used it as your main home for at least 2 of the 5 years before the sale (the ownership and use tests can be satisfied by different 2-year periods)
- You have not excluded gain from another home sale within the prior 2 years
Form 1099-S: what you'll receive
The settlement agent or title company is required under IRC §6045 to file Form 1099-S (Proceeds From Real Estate Transactions) and provide you a copy by February 15 of the year following the sale. Box 2 reports your gross proceeds. You must reconcile this with your own gain calculation, as 1099-S does not account for your selling costs, basis, or any exclusion.
If you qualify for the full §121 exclusion and certify that fact to the settlement agent on IRS Form W-9 (or equivalent), the settlement agent may not be required to file Form 1099-S — but many still do.
Form 4797 and Schedule D: reporting the sale
For investment or business real property, the sale is reported on Form 4797 (Sales of Business Property):
- Part III (recapture section): Report depreciation recapture. For §1250 property (real estate), this section generally yields zero "ordinary income" recapture because MACRS uses straight-line depreciation (§1250 only recaptures the excess of accelerated over straight-line; for residential real estate placed in service after 1986, there is no excess).
- Part I: Report §1231 transactions (held more than 1 year). Net §1231 gains flow to Schedule D as long-term capital gain.
- Schedule D, Part II: Long-term capital gains summary. Unrecaptured §1250 gain is separately tracked on the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions.
For personal-use property (e.g., primary residence with no business use), report on Form 8949 and Schedule D directly. If gain is excluded under §121, enter "H" in column (f) of Form 8949.
Comprehensive worked example
Facts:
- Property type: Duplex (residential rental), purchased 2014
- Original purchase price: $400,000 (land $60,000; building $340,000)
- Capital improvements: $50,000 (roof $18,000 in 2018; new HVAC $15,000 in 2020; kitchen remodel $17,000 in 2023)
- MACRS depreciation (12 years × $340,000 / 27.5): $148,364
- Depreciation on improvements (varies by year, simplified): $12,000
- Total depreciation taken: $160,364
- Adjusted basis: $400,000 + $50,000 − $160,364 = $289,636
- Sale price: $720,000
- Selling costs: $43,200 (6% commission)
- Amount realized: $676,800
- Total gain: $676,800 − $289,636 = $387,164
Tax calculation (assume 20% LT rate, NIIT applies on full gain):
- Tier 1 — §1250 recapture: $160,364 × 25% = $40,091
- Tier 2 — §1231 LT gain: ($387,164 − $160,364) = $226,800 × 20% = $45,360
- NIIT (3.8% × $387,164): $14,712
- Approximate total federal tax: $100,163
Had the investor completed a §1031 exchange instead of selling, all $100,163 in federal tax would have been deferred.
Installment sales
If the buyer pays you over time (installment sale), you may be able to report the §1231 gain and long-term capital gain pro rata as payments are received under IRC §453 (Installment Method). However, depreciation recapture (unrecaptured §1250 gain) must be recognized in full in the year of sale — it cannot be deferred via installment reporting. Form 6252 is used for installment sale reporting.
Frequently asked questions
When do I owe capital gains tax on a property sale?
You owe capital gains tax when your amount realized (sale price minus selling costs) exceeds your adjusted basis (original purchase price plus improvements minus depreciation). The tax is due for the tax year in which the sale closes. If you have an installment sale you may spread the gain over the payment years, but depreciation recapture is fully recognized in the year of sale.
What forms do I need when selling property?
For investment or business real property, the primary form is Form 4797 (Sales of Business Property). The §1231 gain from Form 4797 flows to Schedule D (Capital Gains and Losses) on Form 1040. You will also receive Form 1099-S from the title company or settlement agent reporting your gross proceeds. If you excluded gain under §121, you may need to report that on Form 8949 as well.
How is depreciation recaptured on a property sale?
When you sell real property that was depreciated (rental or business use), the IRS recaptures the depreciation at up to 25% federal rate under the unrecaptured §1250 gain rules (IRC §1(h)(1)(D)). The recaptured amount is limited to the total straight-line depreciation taken. This portion is reported on Form 4797 and is separate from the regular long-term capital gains portion.
Can I use the §121 exclusion if I rented my home before selling?
Yes, but with limitations. Under the Housing Assistance Tax Act of 2008 (HATA), gain attributable to periods of non-qualified use (rental use after January 1, 2009) is not eligible for the §121 exclusion. You must allocate the gain between qualified (personal) use and non-qualified (rental) use. Depreciation taken on the property is also not excluded and is subject to unrecaptured §1250 recapture rules.
What is the Net Investment Income Tax on property sales?
The Net Investment Income Tax (NIIT) is a 3.8% surtax on net investment income including capital gains from property sales. It applies to the lesser of your net investment income or the amount by which your modified adjusted gross income (MAGI) exceeds $200,000 (single filers) or $250,000 (married filing jointly). These thresholds are not indexed for inflation. The NIIT is reported on Form 8960.
Educational information and estimates only. Not tax advice. Tax rules change and vary by situation; consult a qualified tax professional before acting.
