ebotCPA — The Entrepreneur's CPA
    ← Tax Strategy Library

    0% Capital Gains Harvesting

    Long-term capital gains are taxed at 0% when your taxable income, gains included, stays under the top of the 0% bracket. In a low-income year you can sell appreciated investments, pay no federal tax on the gain, and buy them back the same day at a higher cost basis. Illustratively, $60,000 of gain realized at 0% avoids about $9,000 of 15% tax later.

    Reviewed by Ebot Mbi, CPA, EA · Last reviewed October 9, 2026

    Who it fits

    • Early retirees in the years before Social Security and required distributions
    • Owners in a down year, sabbatical or business-loss year
    • Families with large unrealized gains in taxable brokerage accounts
    • Investors who plan to sell later and want the higher basis now

    Who it's not for

    • Households already well above the 0% bracket, where the gain is taxed at 15% or 20%
    • People receiving ACA premium tax credits or near Medicare premium surcharge thresholds, unless modeled first
    • Gains on assets held one year or less, which are short-term and taxed as ordinary income

    How it works

    Capital gains stack on top of ordinary income. The 0% rate applies to the portion of long-term gains that falls below the top of the 0% bracket. Those bracket thresholds are indexed for inflation each year, so we confirm the current figure before acting.

    The room you have equals the top of the 0% bracket minus your taxable ordinary income after the standard or itemized deduction. Gains that fit in that room are taxed at 0%. Anything above it is taxed at 15%.

    The wash-sale rule only disallows losses. It does not apply to gains. You can sell and buy back the same investment immediately. The repurchase sets a new, higher cost basis and starts a new holding period.

    The benefit is permanent. Every dollar of gain recognized at 0% is a dollar that will not be taxed at 15% or 20% when you sell later, or that reduces future gain if the asset keeps rising.

    Timing is late in the year, once income is known. Year-end mutual fund distributions also count toward the room.

    Illustrative example

    Illustrative: a married couple retired at 60. After the $32,200 standard deduction, their taxable ordinary income leaves $60,000 of room below the top of the 0% bracket. They hold an index fund worth $100,000 with a $40,000 basis, held for years.

    1. Sell the fund: $100,000 - $40,000 basis = $60,000 long-term gain
    2. Gain within the 0% room: $60,000; federal tax at 0% = $0
    3. Buy the fund back the same day: new basis $100,000
    4. Future gain avoided on a later sale at that value: $60,000
    5. Tax that $60,000 would cost later at 15%: $60,000 x 15% = $9,000

    About $9,000 of future federal capital gains tax avoided, for $0 of tax today.

    The rules

    RuleCitation
    Net long-term capital gains are taxed at 0%, 15% or 20% depending on taxable income, with thresholds indexed for inflation.IRC §1(h)
    A gain is long-term only if the asset was held more than one year.IRC §1222
    The wash-sale rule disallows losses on substantially identical repurchases; it does not apply to gains.IRC §1091(a)
    The 3.8% net investment income tax applies only above $200,000 single / $250,000 joint MAGI.IRC §1411

    Watch-outs

    • The realized gain raises AGI. That can reduce ACA premium credits, increase taxation of Social Security, shrink the 2025-2028 senior deduction, and raise Medicare premiums two years later.
    • Overshoot the room and the excess is taxed at 15%. Leave a cushion for late-year dividends and fund distributions.
    • Use specific lot identification with your broker so the high-gain lots are the ones sold.
    • Gifting appreciated shares to a child to use the child's 0% rate runs into the kiddie tax for children under 19, or under 24 if full-time students.

    What we do

    We project your year-end taxable income, calculate the 0% room using that year's indexed thresholds, and tell you the dollar amount of gain to realize. We check the side effects on credits, Social Security and Medicare premiums before you sell, and we report the sales correctly.

    Questions

    Do I really have to wait 30 days to buy back?

    No. The 30-day wash-sale rule applies to losses, not gains. You can repurchase immediately.

    Does Texas tax the gain?

    Texas has no personal income tax, so the federal result is the whole result for Texas residents.

    Can I do this every year?

    Yes, whenever you have room in the 0% bracket. Many retirees do it each year until Social Security and required distributions fill the bracket.

    General education under 2026 federal law. Examples are illustrative, not client results. Not tax advice for your situation.

    Last updated: