Capital Gains Tax in Retirement: How to Pay 0% Legally
One of the most underused opportunities in retirement is the 0% long-term capital gains rate. In the right income range, you can sell appreciated investments, realize the gain, and owe nothing in federal tax on it. This guide explains how the brackets work and how to use them deliberately.
How Capital Gains Tax Works
Long-term capital gains (assets held more than one year) are taxed at their own rates — separate from ordinary income. For 2026 there are three rates: 0%, 15%, and 20%. Short-term gains (held one year or less) are taxed as ordinary income, which is why "hold for a year" matters so much.
The key insight: your capital gains rate depends on your total taxable income, including the gains themselves. The 0% bracket is a band of income, and gains that fall inside it are untaxed.
The 0% Bracket for 2026
For 2026, the 0% long-term capital gains rate applies to taxable income up to:
- Single: $49,450
- Married filing jointly: $98,900
Above those thresholds, gains are taxed at 15% until the 20% threshold (roughly $545,500 single / $613,700 married for 2026). The exact figures are indexed for inflation each year.
A worked example
Imagine a retired couple with $40,000 of taxable income from a pension and IRA withdrawals, and $30,000 of long-term capital gains from selling index funds. Their total taxable income is $70,000 — under the $98,900 married threshold. The entire $30,000 gain is taxed at 0%. Their federal tax bill on the gain: zero.
Why Retirement Is the Ideal Time to Harvest Gains
During your working years, your income is usually too high to reach the 0% bracket. In retirement, income often drops — especially in the gap years before Social Security and RMDs begin (roughly ages 60–72). That window is prime time to realize gains at 0% or low rates.
Tax-gain harvesting, the mirror of tax-loss harvesting
Tax-loss harvesting sells losers to offset gains. Tax-gain harvesting does the opposite: you intentionally sell winners to lock in gains at 0%, then immediately rebuy (being careful about the 30-day wash-sale rule, which does not apply to gains, but resets your basis). The effect is a step-up in basis for free — you reset the cost basis higher so future gains are smaller.
The Catch: Social Security and IRMAA
Realizing gains is not free of consequences even at a 0% rate:
- Social Security taxation. Higher total income (including gains) can push more of your Social Security benefit into the taxable range, effectively creating a "tax torpedo" where each extra dollar of gain raises taxes indirectly.
- Medicare IRMAA. Once you're on Medicare, higher income two years prior can trigger Income-Related Monthly Adjustment Amounts — surcharges on Part B and Part D premiums.
- ACA subsidies. If you're buying marketplace health insurance before 65, capital gains count toward the income that determines your subsidy.
So the 0% rate is real, but it pays to model the ripple effects before harvesting a large gain in a single year.
How to Plan a Gain-Harvesting Year
- Estimate your ordinary taxable income for the year (pension, IRA/401k withdrawals, taxable interest, the taxable portion of Social Security).
- Subtract that from the 0% threshold to find your available "free" gain room.
- Sell appreciated assets up to that amount, then rebuy to reset basis.
- Check the IRMAA and Social Security side effects — leave a buffer below any cliff.
Because your income varies year to year in retirement, gain harvesting is a year-by-year decision, not a one-time move. Run your numbers with our retirement planner to see how withdrawals, Social Security, and taxes interact.
The Bottom Line
The 0% capital gains bracket is one of the few genuinely free lunches in the tax code — but only if you plan for it. By keeping taxable income inside the threshold during low-income retirement years, you can move appreciated assets, reset your basis, and shrink future tax bills. Just watch the second-order effects on Social Security taxation and Medicare premiums, and you'll capture the benefit without giving it back.
See your numbers in action
Enter your age and savings to get a personalized retirement projection in seconds — free, no signup needed.