Tax Gain Harvesting: Sell Winners at 0% Before Year End
Tax gain harvesting lets you sell winners at the 0% capital gains rate and buy back at once. See how much gain fits under the IRS limits before December 31.

Table of contents
You bought an index fund years ago and it has nearly doubled. Selling feels like volunteering for a tax bill, so you never touch it. But if your household's taxable income is modest this year, the federal tax on that gain might be exactly zero. Tax gain harvesting means selling winners on purpose, paying nothing, and buying straight back in at a higher cost basis.
The window closes on December 31. Any gain you realize after that counts toward next year's return. This guide shows who qualifies for the 0% capital gains rate, how to work out exactly how much gain fits, and the side effects that can make a "free" sale cost something after all.
How the 0% Capital Gains Rate Works
Profits on investments held for more than a year are taxed at three federal rates: 0%, 15% and 20%. Which rate you pay depends on your taxable income, meaning income after the standard deduction or itemized deductions.
For this tax year, the IRS sets these ceilings for the 0% rate:
- Married filing jointly: taxable income up to $98,900
- Head of household: up to $66,200
- Single: up to $49,450
The 15% rate then runs to $613,700 for joint filers and $545,500 for single filers, with 20% above that.
The gains stack on top of your other income. Wages, interest, retirement withdrawals and short-term gains fill the brackets first. Long-term gains and qualified dividends sit on top. Only the part of your gains that fits under the ceiling gets the 0% rate.
The standard deduction helps a lot here. The IRS set it at $32,200 for joint filers and $16,100 for single filers this year. A married couple can have about $131,100 of gross income, before any other deductions, and still be inside the 0% ceiling.
Who Tax Gain Harvesting Works For
The strategy fits anyone with long-term gains in a taxable brokerage account and a year of lower income. Common cases:
- Early retirees living on savings before Social Security and required withdrawals begin.
- A year with a career break, parental leave, a sabbatical or a layoff.
- Couples on moderate incomes who have quietly built a large taxable account.
- Recent graduates or part-year workers with old gifted or inherited investments.
It does nothing for shares inside a 401(k) or IRA. Those accounts are already sheltered from capital gains tax.
The Worked Example: How Much Gain Fits
Take a married couple with $110,000 of wages after their pre-tax 401(k) contributions. They take the standard deduction.
- Taxable ordinary income: $110,000 minus $32,200 = $77,800
- Room under the 0% ceiling: $98,900 minus $77,800 = $21,100
They own a broad stock ETF worth $60,000, bought years ago for $35,000. The unrealized gain is $25,000.
Option 1: Sell only what fits
The gain is about 42% of the fund's value ($25,000 of $60,000). To realize $21,100 of gain, they sell about $50,640 of shares and buy the same ETF back the same day.
Federal tax on that gain: $0. Their cost basis on those shares rises from about $29,540 to $50,640. If they later sell at the 15% rate, they will owe about $3,165 less than they would have, because $21,100 of gain has already been taxed at zero.
Option 2: Sell everything
If they sell the full $60,000, they realize $25,000. The first $21,100 is taxed at 0%. The remaining $3,900 lands in the 15% bracket, for about $585 of federal tax. That can still be a fair trade if they want the basis reset in full, but it is no longer free.
For a single filer, the math works the same way. With $46,100 of wages, taxable income after the $16,100 deduction is $30,000. That leaves $19,450 of room before the $49,450 ceiling.
Why the Wash Sale Rule Does Not Stop You
If you have harvested losses before, you know the wash sale rule. Sell at a loss and buy the same security within 30 days, and the IRS disallows the loss.
That rule applies only to losses. IRS Publication 550 defines a wash sale as selling stock or securities at a loss and buying substantially identical ones within 30 days before or after. There is no equivalent rule for gains. You can sell your fund and buy it back in the same minute, and the gain still counts.
The flip side matters too. Do not harvest losses and gains in the same year without a plan. Realized losses offset your gains first, so a loss could be used up against gains that would have been taxed at 0% anyway. If you are doing both, our guide to tax-loss harvesting and the wash sale rule explains how to sequence them.
The Side Effects Nobody Mentions
Federal tax may be zero, but a realized gain still raises your adjusted gross income. That number drives other things. Check each one before you sell.
State income tax
Most states with an income tax do not offer a 0% rate on capital gains. Your $21,100 gain may be fully taxable at the state level. At a 5% state rate, that is about $1,055. Still often worth it, but it is a real cost.
Health insurance subsidies
If you buy coverage on the ACA marketplace, your premium tax credit depends on your modified AGI. A harvested gain counts as income and can shrink the credit. Run the numbers on your marketplace account before you sell, since health premiums have already jumped for many buyers this year, as covered in our look at how to pay less for health insurance.
Medicare premiums and Social Security
Medicare's income-related surcharges are based on your income from two years earlier. A large gain now can raise premiums later. For retirees, extra income can also make more of your Social Security benefits taxable, which can push ordinary income above the 0% ceiling.
Other credits
Credits that phase out with income, such as education credits, can shrink too. A tax program or a quick draft return shows the full effect better than bracket math alone.
Step-by-Step Before December 31
- Estimate your full-year taxable income. Use your final pay stub, expected interest and dividends, and any December bonus.
- Subtract it from the 0% ceiling for your filing status. That is your harvesting room. Leave a cushion of a few thousand dollars for surprises, such as a fund's year-end capital gains distribution.
- Pick lots held more than a year. Short-term gains are taxed as ordinary income, not at 0%.
- Choose specific lots in your brokerage account, not "first in, first out," so you sell the shares with the gain you want.
- Sell and rebuy before the last trading day of the year. Trades that execute by December 31 count for this tax year.
- Keep records of the new cost basis. Your broker will report it, but check the next statement.
Frequently Asked Questions
What is the 0% capital gains tax bracket for this year?
For this tax year, the IRS sets it at taxable income up to $98,900 for married couples filing jointly, $66,200 for heads of household, and $49,450 for single filers. It applies only to long-term gains and qualified dividends.
Can I sell stock and buy it back immediately to harvest gains?
Yes. The wash sale rule only applies to losses, so there is no waiting period when you sell at a gain. You can repurchase the same fund right away and keep the higher cost basis.
Does tax gain harvesting affect my state taxes?
Usually. Most states tax capital gains as regular income, so a gain that is free federally can still create a state tax bill.
Is tax gain harvesting worth it if I am in the 15% bracket?
It usually makes sense only for gains that fit under the 0% ceiling. Paying 15% now to avoid 15% later just moves the bill forward, unless you expect a higher rate in future.
Use the Low-Income Year Before It Ends
A year of lower income is easy to waste. Tax gain harvesting turns it into a permanent tax saving: every dollar of gain you realize at 0% is a dollar you never pay tax on again. Work out your room, check the state and subsidy side effects, and place the trades before December 31. If your income just changed, our breakdown of the new tax brackets shows where your ordinary income lands first.
Disclaimer: This article is for informational purposes only and does not constitute financial advice. Always consult with a qualified financial advisor before making investment decisions. Past performance is not indicative of future results.
Written by
Marcus Vance
Business & Money
Writes on business and personal finance for Quick Trend Insights, translating markets, rates, and company strategy into what it costs or saves a household.
Related Articles
View all
Home Loan Rate Hike: Higher EMI or Longer Tenure?
Home loan rate hike from the RBI? See what a higher EMI vs a longer tenure costs on a ₹50 lakh loan, why tenure extensions snowball, and what to ask your bank.

FDIC Insurance Limit: What Happens When Your Bank Fails
FDIC insurance limit explained after United Fidelity failed: how $250,000 per ownership category adds up, what happens to CDs, and how to check your coverage.

Emergency Fund Size: How Many Months You Really Need
Pick your emergency fund size by income risk, not a slogan. A worked example shows why one family needs $40,000 and another $16,000, plus what to build first.
