Do you add rental property sale profit to income to determine 20% capital gains bracket?

Sold a rental duplex this year that I've held for about nine years. After depreciation recapture I'm trying to figure out how the remaining long-term capital gain gets taxed. My regular W-2 income is somewhere in the middle range and I'm worried the gain from the sale is going to push me into the 20% capital gains bracket. Someone told me you have to stack the gain on top of your ordinary income to see where you land, but my tax software seems to be doing something different. I tried reading the Schedule D instructions but got lost. Do you add rental property sale profit to income to determine 20% capital gains bracket or does it work some other way?

40 comments

Yes, the gain stacks on top of your ordinary income, but you need to be precise about what "stacks" means. Your taxable ordinary income fills the lower brackets first. Then your long-term capital gain sits on top of that. The 0%, 15%, and 20% rates apply to the portion of the gain that falls within each corresponding bracket threshold — the thresholds are based on your total taxable income including the gain. The Schedule D Tax Worksheet (inside the Schedule D instructions) walks through this calculation step by step. The gain doesn't get taxed at 20% unless the combined total pushes past the top bracket threshold.

Marcus N.

Author

So the gain itself can be partly at 15% and partly at 20% if it straddles the threshold?

Exactly. The worksheet slices it. Only the slice above the threshold hits 20%, the rest below stays at 15%.

Worth separating two things here: depreciation recapture and the remaining long-term gain. The recapture — the part equal to depreciation you claimed — on a residential rental building depreciated straight-line is unrecaptured Section 1250 gain, taxed at a maximum 25% rate rather than at ordinary income rates. It's reported on Form 4797 and flows to Schedule D, where the Schedule D Tax Worksheet applies that rate. Only the gain above your adjusted basis (after adding back depreciation) qualifies for long-term capital gain rates. So you actually have two buckets from one sale.

Marcus N.

Author

That part I think I understand — the software did split it. My question was really about the long-term piece after that.

Got it, then yes the stacking rule the other commenter described is what governs the long-term piece.

I sold a rental condo two years ago and had the same stacking question. Uploaded my draft Schedule D and Form 4797 to taxr.ai and it walked through each line, matched the gain amounts to the right rate buckets, and flagged that my recapture was being treated correctly as unrecaptured Section 1250 gain capped at 25%. Helped me see exactly where the 15% portion ended and where the 20% threshold would have kicked in for my income level. The Schedule D Tax Worksheet is the actual computation the IRS wants you to use — it's in the Schedule D instructions as a separate worksheet, not on the form itself.

Marcus N.

Author

Did it also factor in the net investment income tax? I keep seeing that 3.8% mentioned alongside the 20% rate.

Yes it caught that too. The 3.8% NIIT on Form 8960 is a separate layer on top of the capital gains rate for higher earners — it's not part of the bracket question you asked but it matters if your income is above the NIIT threshold, which turns on your MAGI. Form 8960 instructions have the details.

The bracket thresholds for capital gains are not the same lines as the ordinary income brackets, which trips a lot of people up. They're their own thresholds set each year. Your software should have a qualified dividends and capital gains tax worksheet or the Schedule D tax worksheet running in the background — check the printed forms in your return to confirm it's using one of those rather than taxing the gain at ordinary rates.

How do you tell which worksheet your software used?

Print the full return with all worksheets. You'll see either "Qualified Dividends and Capital Gain Tax Worksheet" (used when Schedule D isn't required) or the Schedule D Tax Worksheet. If neither is there that's a problem worth looking into.

One thing people miss: the 20% rate only hits the portion of the long-term gain that sits above the top threshold after stacking. For a lot of sellers, the ordinary income is moderate enough that most of the gain stays in the 15% band. Run the numbers on the worksheet before assuming you owe 20% on the whole gain — you might be paying 15% on most of it.

Passive activity loss carryforwards are worth checking too before you finalize anything. If you had rental losses in prior years that were suspended on Form 8582 because your income was above the phase-out, those suspended losses release when you sell the property in a fully taxable disposition. They're deductible in full against your income, which lowers the ordinary taxable income the gain stacks on, though the gain itself still goes through the calculation in full.

Marcus N.

Author

I do have some carryforward losses from a couple of years the property ran at a loss. So those would reduce the gain first?

Not exactly — they release on the year of sale and are deducted in full against your income, but they don't net against the gain itself. Your Form 8582 carryforward schedule from prior years will show the suspended amount. This can meaningfully reduce your taxable ordinary income and leave more room in the lower rate bands for the gain on Schedule D.

Went through this last year. My ordinary income sat right near the middle of a bracket and the long-term gain pushed the total over the 15%/20% threshold by a small amount. Only a few thousand dollars of the gain actually hit 20% — the rest was at 15%. I was expecting a much bigger bill until I saw the worksheet actually split it.

Marcus N.

Author

That's reassuring. I think I was assuming the whole gain jumps to 20% once you cross the line, like ordinary income brackets work.

No, it doesn't work that way. Capital gains brackets are marginal just like ordinary income brackets — you only pay the higher rate on the slice above the threshold, not on the entire gain.

To be clear about what goes into "income" for the stacking: you use taxable income, not gross income or AGI. That means after the standard deduction or itemized deductions. So if your W-2 income after deductions is lower than you think, there may be more room in the 15% band than you expect before the gain reaches the 20% threshold.

Does the deduction for QBI factor in here too?

Yes, the QBI deduction reduces taxable income, and taxable income is what the worksheet uses as the starting point. So if you have pass-through business income with a QBI deduction that lowers taxable income, it creates more room in the lower rate bands for capital gains.

Had a rental I sold with both a large depreciation recapture piece and a long-term gain piece. I ran my numbers through Taxr and it built out the full stacking picture — ordinary income, then recapture as unrecaptured 1250 gain at a maximum 25%, then the long-term gain sitting on top — and showed me which rate applied to which slice. Made the Schedule D Tax Worksheet a lot easier to verify by hand afterward. The key thing it confirmed was that recapture and the long-term gain are taxed under completely different rules even though they come from the same sale.

Marcus N.

Author

Did it account for state taxes separately or just federal?

Just federal — most states have their own rules on capital gains that don't follow the federal brackets, so that part I had to check with my state's instructions separately.

If this is a large gain, an enrolled agent or CPA who specializes in real estate is worth talking to before you file. The interplay between depreciation recapture, the long-term gain stacking, suspended passive losses, and potential NIIT can add up to a lot of moving parts. Getting one piece wrong can mean underpaying or overpaying by a meaningful amount.

Just to clarify how recapture flows mechanically: the unrecaptured Section 1250 gain (the portion of gain attributable to straight-line depreciation on real property) is a special category taxed at a maximum 25% rate, not ordinary income rates. It's different from Section 1245 recapture which does go to ordinary income. For a residential rental building depreciated straight-line under MACRS, most of the recapture is unrecaptured 1250 gain, capped at 25%. The Schedule D Tax Worksheet handles this rate tier too.

This is an important correction. For residential rental property held long-term, the recapture isn't ordinary income — it's the unrecaptured 1250 rate tier at max 25%. Section 1245 recapture to ordinary income would apply more to equipment or personal property.

Marcus N.

Author

So I might have three tiers — 25% unrecaptured 1250, then 15% long-term gain, then possibly some at 20% if the total stacks high enough?

Exactly. The worksheet layers them in that order and the 20% rate only touches whatever long-term gain remains above the highest threshold after everything else stacks underneath it.

Uploaded my closing statement and prior depreciation schedule to Taxr and it mapped out all three rate tiers for my sale — the unrecaptured 1250 piece, the 15% long-term slice, and the small 20% slice at the top. Then I cross-checked each number against the Schedule D Tax Worksheet line by line and everything matched. Really clarified what the software was doing in the background that I couldn't see before.

Marcus N.

Author

How did you know your depreciation schedule was right to begin with? Mine might be off if I didn't take depreciation some years.

That's a real issue. If you didn't take depreciation in some years, the IRS still reduces your basis as if you had (the "allowed or allowable" rule). You'd want to look at Form 4562 from prior years and potentially file amended returns or use Form 3115 to catch up. A CPA or enrolled agent is the right call if depreciation was missed across multiple years — it changes your adjusted basis and therefore your gain.

The "allowed or allowable" rule the previous commenter mentioned is worth flagging explicitly: even if you forgot to claim depreciation on your rental in past years, the IRS computes your gain as if you had taken it. So your adjusted basis is reduced either way, and you can't avoid recapture by simply not having claimed the deduction. Publication 527 covers this in the depreciation section.

Does anyone know how installment sales interact with this? If I sold on installment terms instead of all cash, does the gain still stack in the year of sale or does each payment get its own rate calculation?

Each payment received in a given year carries its own proportional gain, reported on Form 6252. The stacking calculation happens each year based on that year's ordinary income plus that year's installment gain — not all at once in the sale year. Can spread the gain across years and potentially keep more of it in lower rate bands depending on how income looks each year.

That changes the math considerably if ordinary income varies year to year.

Publication 527 at irs.gov is the foundational document for residential rental property tax rules including depreciation, basis, and what happens on sale. The Schedule D instructions and Form 4797 instructions cover the reporting side. If you're uncertain whether your software is handling the stacking right, printing all worksheets from the return and tracing each line back to those instructions is the best way to verify before filing.

To bring the original question full circle: yes, the long-term gain from the rental sale stacks on top of ordinary income to determine which rate band applies, but "20% on everything" is almost never the right reading. The worksheet carves out each slice — 25% unrecaptured 1250, then 15% long-term gain, then 20% only on whatever spills past the top threshold. Most sellers end up with the gain split across two or even all three tiers.

Marcus N.

Author

This whole thread gave me a much clearer picture. I'm going to print the full return with worksheets and trace each line. If the depreciation issue turns out to be real I'll get an enrolled agent involved before filing.