CPAFIRE

How Capital Gains Stack on Ordinary Income: A CPA's Guide

By · Updated

TL;DR: Long-term capital gains and qualified dividends are taxed after ordinary income, stacked on top of it. Ordinary income determines how much of the 0% and 15% capital gains bands are left. Adding a Roth conversion can push gains from 0% to 15%, making the conversion's real marginal cost 27% instead of 12%.

Educational only, not tax, legal, or investment advice. Examples are illustrations, not predictions. Rules and limits change; verify current figures and talk to a qualified professional about your situation.

Capital gains always sit on top of the tax cake, like an expensive candle. Understanding the stacking order is the key to almost every early retirement tax trick: 0% gain harvesting, sizing Roth conversions, and avoiding nasty surprises where a modest IRA withdrawal causes a much larger tax bill than the bracket table suggests.

This guide walks through the stacking rules with 2026 numbers from IRS Rev. Proc. 2025-32.

CPA Warning Label: A Roth conversion can raise the tax on your capital gains even though the conversion itself is taxed at 12%. Your software knows. Your mental math may not.

Ordinary income fills first

Your return has two kinds of taxable income. Ordinary income includes wages, self-employment income, interest, non-qualified dividends, short-term capital gains, IRA and 401(k) distributions, Roth conversions, pensions, rental income and the taxable part of Social Security. Preferential income is net long-term capital gain plus qualified dividends.

Deductions reduce ordinary income first. Then ordinary taxable income is taxed using the regular brackets, starting at 10%. Preferential income is placed above it. The capital gains rate depends on where each dollar of preferential income falls, measured against total taxable income.

Where gains land

For 2026, the capital gains bands by taxable income are:

Status0%15%20%
Married filing jointlyup to $98,900$98,901 to $613,700above $613,700
Singleup to $49,450$49,451 to $545,500above $545,500
Head of householdup to $66,200$66,201 to $579,600above $579,600

Example: a joint filer with $70,000 of ordinary taxable income and $50,000 of long-term gains has $120,000 of taxable income. The first $28,900 of gains (up to $98,900) is taxed at 0%; the remaining $21,100 at 15%.

Some gains have special maximum rates: collectibles up to 28% and unrecaptured section 1250 gain from depreciated real estate up to 25% (IRS Topic 409). These are stacked in a specific order on the Schedule D worksheet, but the basic idea is the same.

Qualified dividends treatment

Qualified dividends are taxed at the same 0%, 15% and 20% rates as long-term gains and stack in the same layer. They use up 0% room before any gain you choose to harvest, because they arrive whether you like it or not. A $1 million taxable portfolio yielding 1.5% produces about $15,000 of dividends each year, mostly qualified for a U.S. stock index fund. See qualified vs ordinary dividends.

Net investment income tax threshold

The 3.8% net investment income tax is calculated separately. It applies to the smaller of net investment income or the amount by which modified AGI exceeds $250,000 (joint), $200,000 (single or head of household) or $125,000 (married filing separately). These thresholds are not indexed for inflation (IRS Topic 559). Roth conversions are not investment income, but they raise MAGI, which can cause investment income to be hit by NIIT. See the NIIT guide.

Worked example with a conversion

Illustration. Assumptions: married couple filing jointly, 2026, standard deduction $32,200. Income: $40,000 of IRA withdrawals and $60,000 of long-term capital gains plus qualified dividends.

Without a conversion: ordinary taxable income is $7,800 ($40,000 − $32,200), taxed at 10%: $780. Gains stack from $7,800 to $67,800, all under $98,900, so they are taxed at 0%. Total federal tax: $780.

Add a $40,000 Roth conversion: ordinary taxable income becomes $47,800. Tax on that: $2,480 on the first $24,800 plus 12% of $23,000, or $5,240. Gains now stack from $47,800 to $107,800. The portion above $98,900, which is $8,900, is taxed at 15%: $1,335. Total: $6,575.

The conversion added $5,795 of tax on $40,000 of extra income, an effective 14.5%. The first $31,100 of conversion cost 12% (with a little at 10%); the last $8,900 cost 12% on the conversion plus 15% on the gains it pushed out of the 0% band, or 27%. The bracket table said 12%. The stacking rules said otherwise.

Second illustration: single filer near the line

Illustration. Assumptions: single filer, 2026, standard deduction $16,100. Income: $30,000 of IRA withdrawals and $30,000 of long-term gains.

  • Ordinary taxable income: $13,900. Tax: $1,240 on the first $12,400 plus 12% of $1,500, or $1,420.
  • Gains stack from $13,900 to $43,900, all under the $49,450 single threshold. Tax on gains: $0. Total: $1,420.
  • Now add $10,000 more of IRA withdrawals. Ordinary taxable income is $23,900 and tax on it is $2,620. Gains stack from $23,900 to $53,900; $4,450 of them are above $49,450 and taxed at 15%, or $667.50. Total: about $3,288.

The extra $10,000 of IRA money cost about $1,868, or 18.7%: the first $5,550 at 12%, the last $4,450 at 27%. A single filer hits the 27% zone at much lower income than a married couple, because the 0% band is half as wide.

The 27% zone, explained

When ordinary income rises while gains are sitting just above it, each extra dollar of ordinary income is taxed at the ordinary rate and moves one dollar of gain from 0% to 15%. In the 12% bracket that produces a combined 27% marginal rate. In the 22% bracket, near the top of the 0% band for some filers, it would be 37%. The zone ends when all gains are above the 0% threshold, after which the marginal rate falls back to the ordinary rate.

Practical response: if you have both gains and a planned conversion, compare the full tax with and without, rather than applying the bracket rate. The tax bracket calculator handles stacking.

How the IRS worksheet does it

On the return itself, stacking is handled by the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions (or the Schedule D Tax Worksheet when collectibles or section 1250 gain are involved). In plain language, the worksheet:

  1. Takes total taxable income.
  2. Subtracts qualified dividends and net long-term gain to find ordinary taxable income.
  3. Figures how much of the preferential income fits under the 0% threshold, then the 15% threshold.
  4. Taxes ordinary income with the regular brackets and adds the tax on the preferential layers.
  5. Compares the result with tax computed as if everything were ordinary and uses the smaller number.

That last comparison is a safety net that rarely matters, but it means stacking can never make your tax higher than ordinary rates would.

Losses and the stack

Capital losses net against gains before the stacking happens. Short-term losses first offset short-term gains, long-term losses offset long-term gains, and then any net loss in one category offsets net gain in the other. Only the final net long-term gain (plus qualified dividends) gets preferential rates. A loss carryforward that offsets gains you would have paid 0% on is spent with no benefit, which is why the order of operations matters.

Planning moves that use the stacking order

  • Fill ordinary room first with conversions, then harvest gains in the remaining 0% space, if your IRA is large and RMDs are your biggest future problem.
  • Harvest gains instead of converting if your IRA is small and your taxable account has large gains.
  • Avoid partial overlap where a conversion pushes some gains into 15% unless you have decided the 27% marginal rate is worth it.
  • Watch fund distributions, which add gains you did not choose.

Common misunderstandings

  • "Gains push my wages into a higher bracket." They do not. Ordinary income is taxed first and is never moved up by gains.
  • "If I go over $98,900 all my gains are taxed." Only the gain above the threshold is taxed at 15%.
  • "The 0% rate applies to income under $98,900." It applies to taxable income, after deductions. Total income can be much higher.
  • "Gains are not income for subsidies." They count in AGI and MAGI for ACA, IRMAA and Social Security taxation.

FAQ

Do capital gains push ordinary income into a higher bracket?

No. Ordinary income is taxed first using the regular brackets. Long-term gains stack on top and only affect the rate on the gains themselves.

Why did my Roth conversion cost more than 12%?

If you also had long-term gains, the conversion may have pushed some of them from the 0% band into the 15% band, making the marginal cost about 27% on those dollars.

Are qualified dividends stacked like capital gains?

Yes. Qualified dividends are taxed at the same 0%, 15% and 20% rates and occupy the same layer above ordinary income.

Does NIIT use the same stacking?

No. The 3.8% NIIT is computed separately on the smaller of net investment income or MAGI above the threshold.

Sources & fact-check notes

Figures checked October 25, 2026. Rules and limits change; verify with the official source before acting.