Free to Use

Tax Gain Harvesting Calculator

Should you realize capital gains this year? Enter your taxable income and unrealized gains to see how much you can harvest at the 0% long-term capital gains rate — and how much tax you'll save versus selling in a higher-income year.

💰 Your Tax-Gain Harvesting Scenario

Calculation completed successfully!
Please check your input values and try again.

How the Tax Gain Harvesting Calculator Works

Tax gain harvesting is the flip side of tax loss harvesting: instead of realizing losses to offset gains, you intentionally realize gains in a year when your taxable income is low enough that those gains are taxed at 0%. The long-term capital gains rate is 0% for taxable income up to $48,350 (single), $96,700 (married filing jointly), or $64,750 (head of household) in 2025. If you expect to be in a higher tax bracket later — say, after a promotion, a spouse returning to work, or RMDs kicking in — realizing gains now at 0% beats paying 15% or 20% on them later.

📈 Sell winners in a low-income year
🟢 Pay 0% federal tax on the gain
🔁 Rebuy and reset your cost basis
💰 Save 15–23.8% on future sales

No Wash Sale Rule for Gain Harvesting

Unlike tax loss harvesting — which triggers the wash sale rule if you rebuy a "substantially identical" security within 30 days — gain harvesting has no wash sale restriction. The IRS does not disallow realized gains, so you can sell a winner and immediately buy it right back. This lets you reset your cost basis upward while keeping your exact market exposure. The only cost to watch is the tax itself, which is why you only harvest into your 0% space.

A Second Benefit: A Higher Cost Basis

When you harvest a gain and rebuy, your cost basis resets to the higher purchase price. That means when you eventually sell for spending money, a smaller portion of the proceeds is taxable gain. Over a lifetime, routinely filling your 0% bracket can eliminate tens of thousands of dollars in future capital gains tax.

2025 Long-Term Capital Gains Brackets (IRS)

The IRS adjusts capital gains brackets for inflation each year. These are the 2025 tax year thresholds (returns filed in 2026), based on taxable income:

Filing Status 0% Rate 15% Rate 20% Rate
Single$0 – $48,350$48,351 – $533,400Over $533,400
Married Filing Jointly$0 – $96,700$96,701 – $600,050Over $600,050
Head of Household$0 – $64,750$64,751 – $566,700Over $566,700

An additional 3.8% Net Investment Income Tax (NIIT) applies to investment income once modified adjusted gross income exceeds $200,000 (single or head of household) or $250,000 (married filing jointly) — which is why high earners can face effective rates of 18.8% or 23.8%.

Formulas Used

Step 1 — Your Taxable Income

Taxable Income = AGI + Capital Gains − Standard/Itemized Deduction

Step 2 — Your Available 0% Space

Available 0% Space = 0% Threshold − Taxable Income (before gains)
Your income room before the 0% long-term capital gains bracket ends

Step 3 — How Much You Can Harvest Tax-Free

Harvestable Gain = min(Available 0% Space, Unrealized Gain)
You can't harvest more than you own — or more than your 0% space allows

Step 4 — Tax Saved

Tax Saved = Harvestable Gain × (Future Marginal Rate − 0%)
The future LTCG rate you avoid by realizing the gain at 0% now

Worked Example: John's $3,350 Tax-Free Harvest

Let's walk through a realistic scenario to see the math in action.

  1. John's situation: John is single and has $45,000 of ordinary taxable income after his standard deduction. He holds a stock position with $10,000 of unrealized long-term gains.
  2. Find the 0% ceiling: For 2025, the 0% long-term capital gains bracket for a single filer tops out at $48,350.
  3. Calculate available 0% space: $48,350 − $45,000 = $3,350. John can realize up to $3,350 of gains before any federal tax is owed.
  4. Cap by what he owns: min($3,350, $10,000) = $3,350 harvestable tax-free. The remaining $6,650 stays invested.
  5. Project the future: John expects a promotion next year that puts him in the 22% ordinary bracket, where long-term gains are taxed at 15%. If he waits, the $3,350 would cost him 15% × $3,350 = $503.
  6. Harvest now: By selling $3,350 worth of shares today (and rebuying immediately — no wash sale rule), John pays $0 federal tax and saves $503.

Harvest Now vs. Wait — Side by Side

Item Harvest Now (This Year) Wait Until Next Year
Gain realized$3,350$3,350
Federal LTCG rate applied0%15%
Federal tax owed$0$503
Cost basis after saleReset higher nowReset higher later
Tax saved by harvesting now$503

⚠️ Don't overflow your 0% space! If John sold his entire $10,000 position this year, his taxable income would jump to $55,000 — pushing $6,650 of gains into the 15% bracket and costing roughly $998 in tax. Gain harvesting only works when you stop at the 0% ceiling. This calculator shows you exactly where that line is.

Smart Gain Harvesting Strategies

🚫 No Wash Sale Rule Here

Loss harvesting forces you to wait 31 days before rebuying. Gain harvesting has no such restriction — sell a winner and buy it back the same day. Your exposure never changes, and your basis steps up.

🎯 Fill, Don't Overflow

Only realize gains up to your 0% space. Every dollar past the ceiling is taxed at 15% or 20% this year — that's the opposite of saving. Use this calculator's "Available 0% Space" result as your exact target.

🌳 Watch Out for Step-Up in Basis

If you plan to hold assets until death, heirs receive a stepped-up basis and may owe no tax on appreciation at all. In that case harvesting can be unnecessary — but if you'll sell during your lifetime, harvesting at 0% is usually a win.

🏛️ Check Your State's Rules

Most states tax capital gains as ordinary income with no 0% bracket, so harvesting now may trigger state tax you'd otherwise pay later. A few states (like Colorado) offer their own subtraction for long-term gains. Run the numbers with your state rate included.

Frequently Asked Questions (FAQ)

What is tax gain harvesting?

Tax gain harvesting is a strategy where you intentionally sell investments with unrealized long-term capital gains during a year when your taxable income is low — so the gains are taxed at the 0% long-term capital gains rate. You then immediately rebuy the same investments (there is no wash sale rule for gains), resetting your cost basis higher while paying no federal tax. This converts future taxable gains into tax-free gains now.

Does tax gain harvesting have a wash sale rule?

No. The wash sale rule only applies to losses — it prevents you from deducting a loss on a security you rebuy within 30 days. There is no equivalent rule for gains. You can sell a winner and repurchase the identical security the same day, lock in the higher basis, and keep your full market exposure. This is one of the biggest advantages gain harvesting has over loss harvesting.

When should I NOT harvest gains?

Avoid gain harvesting when: (1) your taxable income already exceeds the 0% ceiling, so gains would be taxed at 15%+ this year; (2) you expect significantly lower income next year, making waiting cheaper; (3) realizing gains could push you over the ACA premium tax credit cliff or affect financial aid, Medicaid, or Medicare premiums; (4) your state taxes capital gains at a high rate with no offset; or (5) you plan to hold the asset until death and leave it to heirs, who get a stepped-up basis anyway.

How does step-up in basis affect gain harvesting?

Assets inherited at death receive a stepped-up basis equal to their fair market value, so heirs typically owe no capital gains tax on appreciation that occurred during your life. If your plan is to hold assets until death, harvesting may be pointless — the gain would be erased by the step-up. But if you'll sell during retirement for income, harvesting at 0% while your income is low is usually better than paying 15–20% later, because a higher basis means less taxable gain on every future sale.

Does gain harvesting save state taxes?

Usually not on the federal side of things. The 0% rate is a federal rule; most states tax capital gains as ordinary income, so realizing a gain triggers state tax whether you harvest now or later. The state tax is simply paid a year earlier. Because of this, gain harvesting is most valuable in states with no income tax (Texas, Florida, Nevada, and others) or states with a flat, low rate. A few states offer long-term gain exclusions — check your state's rules before relying on state-level savings.

Do I have to worry about the Medicare surtax (NIIT)?

Yes, if your modified adjusted gross income is high. The 3.8% Net Investment Income Tax applies once MAGI exceeds $200,000 for single and head-of-household filers, $250,000 for married filing jointly, and $125,000 for married filing separately. Realizing gains could push you over the threshold, adding 3.8% on the excess — turning a "free" harvest into a costly one. If you're near these amounts, factor the NIIT into your decision, which is why this calculator's future rate options include 18.8% and 23.8%.

About This Tax Gain Harvesting Calculator

Our Tax Gain Harvesting Calculator helps investors, early retirees, and anyone with a low-income year find exactly how much capital gain they can realize tax-free under the 2025 IRS brackets. It uses the official 0% thresholds for all three filing statuses, computes your available 0% space, caps your harvest at your unrealized gains, and projects the tax you'd face if you waited until a higher-income year.

🎯
Exact 0% Space

Precise 2025 IRS bracket math for Single, MFJ, and Head of Household filers — no guessing where the ceiling is.

🔮
Future Income Projection

Enter your projected future taxable income and the calculator auto-selects your future long-term capital gains rate, or choose your own.

🏛️
State Tax Aware

Include your state's capital gains rate to see how much state tax is triggered now versus later.

🔒
100% Private

All calculations run in your browser. No data is sent to or stored on any server. Your financial information stays with you.

⚠️ Important Disclaimer: This calculator is for estimation and educational purposes only. Tax laws are complex and subject to change. Interactions with the ACA premium tax credit, Medicare surtax, state taxes, and the alternative minimum tax can all affect your specific situation. For personalized tax advice, consult a qualified tax professional or CPA.