Home / Guides / Taxes

Capital gains tax on selling a second home or rental property

The big tax break for home sales — the one that wipes out up to $250,000 or $500,000 of gain — only applies to your main home. Sell a vacation place or a rental and you are usually taxed on the whole profit, plus depreciation recapture if it was rented. Here is exactly how the bill is built, with a worked example.

⚑ Educational information, not tax or legal advice

This is general educational content, not legal or tax advice and not a substitute for a professional. Rates, thresholds and depreciation rules change, and results vary by your state, filing status and the specifics of the property. Before you sell, consult a licensed CPA, enrolled agent or tax attorney about your own situation.

When you sell your main home at a profit, the IRS lets most people shelter a huge chunk of the gain — up to $250,000 if you file single, or $500,000 married filing jointly. That rule is Section 121, the home-sale exclusion, and it is genuinely generous. The trouble is that people assume it covers any property they sell. It does not.

A second home, vacation property or rental that was never your primary residence gets no exclusion. The entire gain is generally taxable, and if you rented the place out, a second tax — depreciation recapture — rides along on top. Understanding how the pieces fit together is the difference between an unpleasant surprise and a number you planned for.

Why the home-sale exclusion does not apply

To use the Section 121 exclusion you have to pass an ownership-and-use test: you must have owned the home and lived in it as your main home for at least two of the five years ending on the sale date. A pure rental fails the "use" half of that test, and a vacation home you visit a few weeks a year almost always fails it too.

There is one partial path: if a property was once your primary residence and later became a rental (or vice versa), you may qualify for a prorated exclusion — but periods of "non-qualified use" after 2008 reduce how much you can shelter, and depreciation taken while it was a rental is still recaptured. For a home that was always a second home or always a rental, assume the exclusion is off the table and plan for tax on the full gain.

How to figure the gain

The headline number is not your sale price — it is your gain, and the gain is smaller than most sellers expect because two things reduce it:

Net sale price − adjusted basis = capital gain

Break that into its real-world parts:

  • Net sale price = sale price − selling costs (agent commission, title and escrow fees, transfer taxes, legal fees). On a $500,000 sale, 6% in commission and closing costs alone is $30,000 that never counts as profit.
  • Adjusted basis = original purchase price + capital improvements (a new roof, an addition, a renovated kitchen — not routine repairs) − depreciation claimed if it was a rental.

Keep every receipt for improvements. Each dollar of legitimate improvement raises your basis and shrinks your taxable gain. The flip side: depreciation lowers your basis while you own a rental, which is what creates recapture when you sell.

Short-term vs long-term rates

As with any capital asset, the holding period sets the rate on the ordinary gain portion:

  • Held one year or less — short-term gain, taxed at your ordinary income rate (10% to 37%).
  • Held more than a year — long-term gain, taxed at 0%, 15% or 20% depending on your taxable income.

Most second homes and rentals are held for years, so the long-term rates usually apply. The 2024 federal long-term brackets are a useful reference point (they shift slightly each year with inflation):

Long-term rateSingle taxable incomeMarried filing jointly
0%Up to $47,025Up to $94,050
15%$47,026 – $518,900$94,051 – $583,750
20%Over $518,900Over $583,750

2024 federal thresholds, shown for reference. A large property gain can itself push you into the 15% or 20% band, so the gain partly sets its own rate. Confirm current-year IRS figures.

Depreciation recapture on a rental (the 25% surprise)

This is the piece that catches landlords off guard. While you rent a property, the tax code makes you depreciate the building (not the land) — residential rentals over 27.5 years — and deduct that amount each year against rental income. Those deductions lowered your basis along the way.

When you sell, the IRS "recaptures" that benefit. The portion of your gain equal to the depreciation you took (or could have taken) is unrecaptured Section 1250 gain, taxed at a maximum federal rate of 25% — higher than the 15% or 20% long-term rate on the rest of the gain.

⚑ You owe recapture even if you never claimed depreciation

The recapture is calculated on depreciation "allowed or allowable." If you forgot to deduct it, the IRS still treats it as taken. That is one reason it pays to file an amended return or a Form 3115 with a CPA before selling a rental you under-depreciated.

NIIT and state tax stack on top

Two more layers can apply to the same gain:

  • Net Investment Income Tax (NIIT) — an extra 3.8% on investment income, including these gains, once your modified adjusted gross income passes $200,000 (single) or $250,000 (married filing jointly). A big sale can lift you over the line all by itself.
  • State income tax — most states tax capital gains as ordinary income, with no special rate. In a high-tax state that can add another 5% to 13% on the entire gain, including the recaptured part.

The lesson: the federal long-term rate is only the starting point. Stacked together, recapture + NIIT + state tax can mean a real combined bite well above the headline 15% or 20%.

Worked example: a rental sold after eight years

Single filer, mid-15% long-term bracket, sells a residential rental held long-term. State tax ignored for clarity.

LineAmount
Sale price$520,000
Less selling costs (~6%)−$31,000
Net sale price$489,000
Original purchase price$300,000
Plus capital improvements+$40,000
Less depreciation claimed−$60,000
Adjusted basis$280,000
Total taxable gain$209,000

Now split the $209,000 gain into its two tax buckets and apply the rates:

Portion of gainAmountRateTax
Recaptured depreciation (Sec. 1250)$60,00025%$15,000
Long-term gain (the rest)$149,00015%$22,350
NIIT, if over threshold$209,0003.8%$7,942
Estimated federal total$45,292

Illustrative only. Actual recapture is capped at total gain, NIIT only applies above the MAGI threshold and on the lesser of net investment income or the excess over it, and state tax would add more. Confirm with a CPA.

Notice the recaptured $60,000 costs $15,000 at the 25% rate, versus the $9,000 it would have cost at 15%. That gap is the price of the depreciation you deducted in earlier years — useful then, taxed back now.

→ Estimate your own second-home or rental gain

Enter your purchase price, improvements, selling costs, holding period and income to see your short-term vs long-term tax side by side. Use it to sanity-check a sale before you sign anything.

Open the Capital Gains Tax Calculator →

The 1031 exchange: defer the tax on a rental

If the property is a rental or investment property — not a personal-use vacation home — a 1031 like-kind exchange lets you roll the proceeds into another investment property and defer both the capital gains tax and the depreciation recapture. You do not pay now; the gain carries over into the new property's basis.

The deadlines are unforgiving: you have 45 days from closing to formally identify replacement property and 180 days to close on it, and you cannot touch the sale proceeds yourself — a qualified intermediary must hold them. Done wrong, the whole deferral collapses and the tax is due. A 1031 defers rather than erases the tax, but for landlords who keep reinvesting, it can postpone the bill for decades. This is firmly professional-help territory.

A few ways to keep the bill down

Document every improvement

Capital improvements raise your basis and directly cut the gain. Keep invoices for the new HVAC, the addition, the re-roof. Routine repairs do not count, but real improvements do.

Mind the holding period and your income year

Selling after the one-year mark secures the lower long-term rate on the non-recaptured gain. Selling in a year when your other income dips can keep more of the gain in the 15% (or even 0%) band and below the NIIT threshold. If a bonus or raise is also in play, our paycheck calculator helps you picture the bracket you'll actually be in.

Consider a 1031 if you're staying in real estate

If you plan to buy another rental anyway, deferring through a 1031 keeps your capital working instead of handing a chunk to the IRS up front.

Frequently asked questions

Do I get the $250,000 home-sale exclusion on a second home?

No. The Section 121 exclusion ($250,000 single, $500,000 married filing jointly) applies only to a main home you owned and lived in for at least two of the five years before the sale. A second home, vacation home or pure rental that was never your primary residence does not qualify, so the entire gain is generally taxable.

How do I calculate the gain on a second home or rental?

Start with the net sale price (sale price minus selling costs such as the agent commission and closing fees). Subtract your adjusted basis — the original purchase price plus capital improvements, minus any depreciation you claimed on a rental. The result is your taxable gain. Selling costs and improvements lower the gain; depreciation raises it through recapture.

What is depreciation recapture and what rate applies?

When you rent out property you deduct depreciation each year, which lowers your basis. On sale, the portion of your gain equal to that depreciation is unrecaptured Section 1250 gain, taxed at a maximum federal rate of 25% rather than the lower long-term rates. You owe recapture even if you never actually claimed the depreciation you were allowed to take.

Will I owe the 3.8% net investment income tax when I sell?

You may. The 3.8% net investment income tax (NIIT) applies to capital gains, including gains on a second home or rental, once your modified adjusted gross income passes $200,000 single or $250,000 married filing jointly. A large gain can push you over the threshold, so the NIIT often stacks on top of the regular capital gains and recapture tax.

Can a 1031 exchange help me avoid the tax?

A 1031 like-kind exchange lets you defer capital gains and depreciation recapture on investment or business real estate by reinvesting the proceeds into another investment property within strict deadlines (45 days to identify, 180 days to close). It applies to rentals and investment property, not a personal-use second home, and the tax is deferred rather than erased. The rules are technical, so use a qualified intermediary and a tax professional.

KH
Karim Haddad

Karim researches money, tax and legal-claims topics for AMAADOR and writes from hands-on research. This is general education, not financial, tax or legal advice — verify current figures and consult a licensed professional.

Sources & further reading

  1. IRS — Publication 523, Selling Your Home (Section 121 exclusion and ownership/use test), irs.gov.
  2. IRS — Publication 544, Sales and Other Dispositions of Assets, and Topic No. 409, Capital Gains and Losses.
  3. IRS — Publication 527, Residential Rental Property, and the Unrecaptured Section 1250 Gain Worksheet (Schedule D instructions).
  4. IRS — Topic No. 559 / Form 8960, Net Investment Income Tax; and Form 8824, Like-Kind Exchanges (Section 1031).

Last updated: 19 June 2026. Read our full disclaimer →

Advertisement