Capital gains stacking - the 0% bracket move

Long-term capital gains do not have a flat tax rate. They stack on top of ordinary income and fill a 0% bracket first, up to $96,700 of total taxable income for married filing jointly in 2025 and $48,350 for single filers (Rev. Proc. 2024-40). For a retired couple with $30,000 in ordinary taxable income, that means $66,700 of capital gains can be realized at zero federal tax each year. Most retirement calculators model long-term gains as a flat 15% and miss this entirely, understating after-tax wealth by tens of thousands of dollars over a typical gap-year window.
In 2025, married couples filing jointly pay 0% federal tax on long-term capital gains as long as total taxable income (ordinary income plus the gains) stays at or below $96,700 (Rev. Proc. 2024-40). The 0% bracket resets every January. A couple with $30,000 of ordinary taxable income has $66,700 of 0% LTCG headroom that year. Unused headroom expires worthless; you cannot carry forward 2025's bracket space into 2026.
How Capital Gains Stack on Ordinary Income
The tax code under IRC §1(h)(1) computes long-term capital gains rates by treating gains as the top slice of income. Ordinary income (wages, IRA distributions, taxable interest, taxable Social Security, Roth conversions) fills the bottom of the stack and is taxed at ordinary rates. Long-term capital gains and qualified dividends sit on top and are taxed at the preferential 0%, 15%, or 20% rates depending on where the total lands relative to the LTCG breakpoints.
The mechanics are not metaphorical. Form 1040's Qualified Dividends and Capital Gain Tax Worksheet (the worksheet most retirees actually trigger) literally subtracts the LTCG amount from taxable income, computes ordinary tax on the remainder, then computes LTCG tax on the stacked-on amount, and adds the two. The order is fixed. You do not get to choose which dollar of income occupies which bracket.
This stacking is why one extra dollar of Roth conversion can cost much more than the 12% or 22% on the conversion itself. That dollar of ordinary income pushes a dollar of LTCG out of the 0% bracket and into the 15% bracket. The marginal cost is the ordinary rate plus 15 cents per dollar of displaced gains, a hidden 27% or 37% marginal rate that no W-2 employee ever sees. We covered the broader version of this problem in why most retirement calculators get taxes wrong.
The 2025 Long-Term Capital Gains Brackets
For 2025, long-term capital gains rates are 0%, 15%, or 20%, determined by total taxable income including the gains. The breakpoints from Rev. Proc. 2024-40:
| Filing Status | 0% Bracket | 15% Bracket | 20% Bracket |
|---|---|---|---|
| Single | $0 – $48,350 | $48,351 – $533,400 | $533,401+ |
| Married Filing Jointly | $0 – $96,700 | $96,701 – $600,050 | $600,051+ |
| Head of Household | $0 – $64,750 | $64,751 – $566,700 | $566,701+ |
| Married Filing Separately | $0 – $48,350 | $48,351 – $300,000 | $300,001+ |
These thresholds apply to taxable income, which is gross income minus the standard deduction or itemized deductions. The 2025 standard deduction is $30,000 MFJ and $15,000 single. Taxpayers age 65 or older add another $1,600 each MFJ or $2,000 single. A 67-year-old couple has a $33,200 standard deduction before the 0% LTCG bracket even starts counting income, so up to $129,900 of gross income can produce taxable income at or below the $96,700 threshold.
The 3.8% Net Investment Income Tax under IRC §1411 sits on top of the LTCG rates and triggers when Modified AGI exceeds $250,000 MFJ or $200,000 single. Unlike the LTCG brackets, the NIIT thresholds are fixed by statute and have never been indexed for inflation since 2013. A retiree with $260,000 of MAGI pays 15% federal + 3.8% NIIT = 18.8% on the gains pushing them past the threshold.
The 0% Bracket: A Worked Example
The cleanest case for understanding the mechanics is a married couple, both 64 (no senior deduction yet), retired, drawing nothing from Social Security or IRAs. Their entire taxable income comes from a brokerage account with significant embedded gains. They want to know how much they can realize at 0% federal tax.
- Filing status: MFJ
- 2025 standard deduction: $30,000
- 0% LTCG ceiling (taxable income): $96,700
- Total gross income that produces $96,700 taxable income: $96,700 + $30,000 = $126,700
If they sell shares with $126,700 of long-term capital gains (mix of basis and gain), and the gain portion is, say, $90,000, the full $90,000 is taxed at 0% federally. They can then immediately repurchase the same shares. The wash-sale rule (IRC §1091) applies only to losses, not gains; there is no waiting period and no disallowance. The new shares carry a cost basis equal to the repurchase price, permanently eliminating future tax on the appreciation that was just harvested.
Now layer in ordinary income. Suppose the same couple takes $40,000 in Traditional IRA withdrawals during the year:
- Ordinary income: $40,000
- Standard deduction: $30,000
- Ordinary taxable income: $10,000 (all in 10% bracket, $1,000 ordinary tax)
- Remaining 0% LTCG headroom: $96,700 − $10,000 = $86,700
They can still realize $86,700 in LTCG at 0%. Every $1 of additional ordinary income (Roth conversion, IRA withdrawal, freelance work) above this point reduces the 0% LTCG headroom dollar for dollar. This is the trade-off between Roth conversion ladder execution and gain harvesting in any given year.
There is no wash-sale rule for gains. Under IRC §1091, the wash-sale rule applies only to claimed losses. A retiree can sell appreciated shares at noon, recognize the gain in the 0% bracket, repurchase identical shares at 12:01 PM, and the cost basis resets to the new purchase price. This is the only legal way to step up cost basis during your lifetime; every other basis adjustment requires death or a Section 1031 exchange. For a couple with $500,000 of low-basis index funds, executing this annually for a decade can erase six figures of future capital gains tax.
The Golden Window: Retirement to RMD Age
The most valuable harvesting window is the period after you stop earning W-2 income but before Social Security and Required Minimum Distributions push ordinary income back up. For someone retiring at 62 and delaying Social Security to 70, that window can run eight years. For someone delaying Social Security to 70 and starting RMDs at 73 (or 75 under the SECURE 2.0 Act §107 schedule for those born in 1960 or later), the window narrows but stays open.
Three forces close the window:
- Social Security, even when only 50% or 85% is taxable, adds ordinary income that crowds the 0% LTCG bracket from below.
- Required Minimum Distributions at age 73 (or 75 starting in 2033 for the post-1960 cohort) inject mandatory ordinary income that scales with the IRA balance and the Uniform Lifetime Table divisor.
- Pension and annuity income that begins on a fixed schedule independent of need.
Once these stack, the 0% LTCG bracket can disappear entirely. A couple receiving $50,000 in Social Security (85% taxable = $42,500) plus $40,000 in RMDs has $82,500 of ordinary income against a $30,000 standard deduction, yielding $52,500 of ordinary taxable income. That leaves $44,200 of 0% LTCG headroom, far less than the $66,700 available with $30,000 ordinary income. By the time the IRA grows and RMDs scale up, the 0% bracket may be gone.
The implication for the FIRE crowd is direct: every gap year you skip harvesting is bracket space that vanishes. A 50-year-old with $400,000 in a taxable brokerage account who retires at 50 and ignores gain harvesting until 65 has wasted 15 annual 0% brackets, potentially $1,000,000+ of cumulative tax-free harvesting capacity. We unpack the broader sequence in tax-efficient retirement withdrawal strategies.
Capital Gains and the Social Security Tax Torpedo
Long-term capital gains count fully toward provisional income, the formula under IRC §86 that determines how much Social Security is taxable. Provisional income is AGI plus tax-exempt municipal interest plus half of Social Security benefits; the full amount of LTCG is in AGI. For married filing jointly, the thresholds are $32,000 (up to 50% of benefits taxable) and $44,000 (up to 85% taxable). For single filers, $25,000 and $34,000. These thresholds have been fixed since 1983 and are not indexed for inflation, so they bite harder every year.
The torpedo effect: realizing $50,000 in long-term capital gains can push a couple's provisional income past $44,000, making the next $42,500 of Social Security benefits taxable as ordinary income. The gain itself may sit in the 0% LTCG bracket, but it triggered ordinary tax on benefits that were previously untaxed. The effective marginal rate on that dollar of gain becomes 0% (the gain) + 12% × 0.85 (the benefit dragged into tax) = 10.2%. This is the gentle version. In the steeper phase-in region, the marginal rate on a dollar of LTCG can hit 27% or higher.
Long-term capital gains count in full toward provisional income under IRC §86, even when the gains themselves are taxed at 0%. For married couples, benefits become taxable once provisional income passes $32,000 (up to 50%) and $44,000 (up to 85%); these thresholds have been fixed since 1983 and are never indexed. A 0% gain that drags Social Security into tax carries a real marginal cost of roughly 10% to 27%, so harvest before benefits start whenever the choice exists.
The fix is sequencing. Harvest aggressively in the years before Social Security starts. Once benefits begin, the cost of recognizing additional income includes the cascading effect on benefit taxation. Our Social Security tax calculator walks through the provisional income formula explicitly.
Capital Gains Harvesting vs. Roth Conversions
The 0% LTCG bracket and the low ordinary brackets compete for the same income space. You cannot fully use both in the same year unless your ordinary income is essentially zero. The trade-off:
| Strategy | What It Costs Today | What It Saves Later |
|---|---|---|
| Convert $96,950 to Roth (fills 12% bracket MFJ) | $11,157 federal tax (8.8% effective) | All future growth tax-free; no RMDs on Roth |
| Harvest $96,700 LTCG at 0% | $0 federal tax | Eliminates embedded gain; resets basis permanently |
| Harvest $66,700 LTCG + convert $30,000 to Roth | $1,000 federal tax (10% on $10,000 taxable) | Partial of both benefits |
For a couple with a $1.2 million Traditional IRA and $400,000 in a low-basis taxable account, the math usually favors Roth conversions in the early gap years. Conversion benefits compound over decades of tax-free growth, and the Traditional IRA balance keeps growing while RMDs loom. Gain harvesting has a single-shot benefit: the avoided tax on the harvested portion. After RMDs start, conversions become more expensive (higher ordinary brackets) while gain harvesting becomes impossible (no 0% room left).
A pragmatic split for years where both matter: convert into the 12% bracket first, then harvest gains with whatever 0% LTCG headroom remains after the conversion. CoastIQ's Tax Projection tool models this year by year, computing ordinary income, the stacked-on LTCG amount, and the resulting tax across every relevant bracket (including the NIIT, Social Security taxation, and IRMAA thresholds) so you can see the actual after-tax outcome of each split rather than guessing.
How Most Calculators Get This Wrong
The dominant retirement calculators (including FireCalc, cFIREsim, and most major brokerage planning tools) model long-term capital gains as a flat percentage, typically 15%. They do not stack gains on top of ordinary income, do not model the 0% bracket, and do not account for the wash-sale-rule asymmetry that makes annual basis resets possible.
The result: these tools systematically understate the after-tax outcome for retirees who do gain harvesting. For a couple harvesting $60,000 of LTCG annually at 0% during a 10-year gap-year window, the cumulative federal tax saved versus a flat-15% model is $90,000, ignoring compounding on the reinvested savings. A calculator that misses this is not a rounding error; it is a structurally wrong model of how retirement income is taxed.
Three modeling failures recur:
- Flat-rate LTCG: Applies a single percentage regardless of total taxable income. Misses the 0% bracket entirely.
- No stacking: Treats ordinary income and LTCG as if they were taxed in parallel rather than sequentially. Misses the interaction.
- No Social Security taxation interaction: Treats Social Security as taxable or not, ignoring how LTCG changes provisional income.
If your retirement plan depends on modeling tax-aware withdrawal strategies, the model has to be tax-aware. A flat-15% LTCG assumption is not.
Quality Gate: A Single-Year Checklist
By December 31 of each gap year, the following numbers should be on a single sheet of paper:
- Projected ordinary taxable income (AGI − standard or itemized deductions, excluding LTCG)
- Remaining 0% LTCG headroom = $96,700 (MFJ 2025) − ordinary taxable income
- Remaining 12% ordinary bracket headroom = $96,950 − ordinary taxable income
- Year-end realized LTCG so far
- Available unrealized LTCG in the taxable account
The harvesting decision is mechanical: realize gains up to the 0% headroom, then stop. If you also want Roth conversions, decide the split at the start of the year; recognizing gains and converting in the same year compounds the bracket math but cannot be undone after December 31. Recharacterizations of Roth conversions were eliminated by the Tax Cuts and Jobs Act in 2017; gain recognition has never been reversible.
For a complete year-by-year framework that models conversions, gain harvesting, and Social Security timing together, see our piece on tax-efficient retirement withdrawal strategies. The article on retirement tax planning covers the sequencing of all seven major levers, of which gain harvesting is one.
The Bottom Line
The 0% long-term capital gains bracket is one of the largest tax-free windows in the U.S. tax code, and it exists specifically because of how gains stack on ordinary income. For a married couple with low ordinary income during the gap years, $66,700 to $96,700 of capital gains every year can be realized at zero federal tax, with no waiting period to repurchase and a permanent cost basis reset on the harvested shares. This is not a loophole or an aggressive position; it is the plain reading of IRC §1(h) and Form 1040's tax computation worksheet.
The window is finite. Social Security and RMDs eventually push ordinary income high enough to crowd out the 0% bracket. Retirees who model their gains at a flat 15% never see this and never act on it. Retirees who do the stacking math and time their harvesting against Roth conversions, Social Security claiming, and RMD onset can permanently eliminate six figures of capital gains tax over a 10-to-15-year window.
Frequently Asked Questions
Vlad Kuzin
Founder of CoastIQ. Building the most tax-accurate retirement calculator on iOS.




