Skip to main contentSkip to navigationSkip to footer

Capital Gains Taxation and the Net Investment Income Tax

8 min
3/6

Key Takeaways

  • 2024 LTCG brackets (MFJ): 0% up to $94,050; 15% from $94,051-$583,750; 20% over $583,750.
  • NIIT adds 3.8% on net investment income when MAGI exceeds $250,000 (MFJ)—effectively a 23.8% top LTCG rate.
  • Capital gains calculation: sale price minus selling costs minus adjusted basis (original cost + improvements − depreciation).
  • Depreciation recapture is taxed at up to 25%—higher than the 15% LTCG rate most investors face on remaining gain.

When you sell an investment property, the profit is taxed as a capital gain—but the rate depends on how long you held the asset, your income level, and whether the Net Investment Income Tax (NIIT) applies. This lesson walks through the capital gains tax calculation workflow from sale to tax payment.

Long-Term Capital Gains Tax Brackets (2024)

Assets held for more than one year qualify for preferential long-term capital gains (LTCG) rates. For 2024 (Married Filing Jointly): 0% on taxable income up to $94,050; 15% on taxable income from $94,051 to $583,750; 20% on taxable income over $583,750. These rates apply to the gain from selling investment property (excluding depreciation recapture, which is taxed at up to 25%). The 0% bracket is particularly powerful for investors with modest income—a retired couple with $80,000 in total taxable income can realize up to $14,050 in LTCG completely tax-free at the federal level.

LTCG RateMFJ Taxable Income RangeOpportunity
0%$0–$94,050Powerful for retirees and low-income years; harvest gains tax-free
15%$94,051–$583,750Most common bracket for active investors; plan sales accordingly
20%Over $583,750High-income bracket; consider installment sales to spread gain

2024 Long-term capital gains tax brackets — Married Filing Jointly

Source: IRS Revenue Procedure 2023-34

The Net Investment Income Tax (NIIT)

The NIIT is an additional 3.8% tax on net investment income for taxpayers with modified adjusted gross income (MAGI) exceeding $250,000 (MFJ) or $200,000 (single). Net investment income includes rental income, capital gains, interest, and dividends—but not wages or self-employment income. The NIIT applies to the lesser of: (1) net investment income, or (2) the amount by which MAGI exceeds the threshold. Example: A married couple has $300,000 in MAGI ($200,000 wages + $100,000 rental income/capital gains). MAGI exceeds $250,000 by $50,000. Net investment income is $100,000. NIIT applies to the lesser amount: $50,000 × 3.8% = $1,900. The NIIT effectively increases the top LTCG rate from 20% to 23.8% for high-income investors. There is an important exception: taxpayers who qualify as Real Estate Professional Status (REPS) may be able to exclude rental income from NIIT—a significant planning opportunity covered in a later lesson.

Capital Gains Calculation Workflow

Calculating capital gains on a property sale follows a specific sequence. Step 1: Determine the original cost basis (purchase price + closing costs + capital improvements). Step 2: Calculate the adjusted basis by subtracting accumulated depreciation. Step 3: Determine the net sale price (sale price − selling expenses). Step 4: Calculate total gain (net sale price − adjusted basis). Step 5: Separate the gain into two components: depreciation recapture (taxed at up to 25%) and remaining capital gain (taxed at LTCG rates of 0/15/20%). Step 6: Apply NIIT if MAGI exceeds the threshold. Example: Purchase price $250,000, improvements $30,000, depreciation claimed $40,000. Adjusted basis = $250,000 + $30,000 − $40,000 = $240,000. Sale price $350,000, selling costs $21,000. Net sale price = $329,000. Total gain = $329,000 − $240,000 = $89,000. Depreciation recapture = $40,000 × 25% = $10,000. Remaining gain = $49,000 × 15% = $7,350. Total federal tax = $17,350 (plus NIIT if applicable).

Key Takeaways

  • 2024 LTCG brackets (MFJ): 0% up to $94,050; 15% from $94,051-$583,750; 20% over $583,750.
  • NIIT adds 3.8% on net investment income when MAGI exceeds $250,000 (MFJ)—effectively a 23.8% top LTCG rate.
  • Capital gains calculation: sale price minus selling costs minus adjusted basis (original cost + improvements − depreciation).
  • Depreciation recapture is taxed at up to 25%—higher than the 15% LTCG rate most investors face on remaining gain.

Common Mistakes to Avoid

Forgetting to account for depreciation recapture when calculating the expected tax on a property sale

Consequence: The investor underestimates the tax bill—depreciation recapture is taxed at 25% (Section 1250), which is higher than the standard 15-20% LTCG rate

Correction: Always split the gain into two components: depreciation recapture (taxed at 25%) and remaining capital gain (taxed at 0-20% LTCG rate + potential 3.8% NIIT)

Assuming the NIIT applies only to capital gains and ignoring its application to rental income

Consequence: The 3.8% NIIT applies to all net investment income including rental income, not just capital gains—high-income investors may owe an additional 3.8% on every dollar of net rental profit

Correction: Include the 3.8% NIIT in tax projections for all investment income when MAGI exceeds $200,000 (single) or $250,000 (MFJ)

Test Your Knowledge

1.What is the Net Investment Income Tax (NIIT) rate and to whom does it apply?

2.An investor bought a property for $200,000 and sells it for $350,000 after taking $40,000 in depreciation. What is the adjusted basis?

3.What is the maximum long-term capital gains rate for a married couple with over $583,750 in taxable income in 2024?