US Capital Gains Harvesting Calculator

This capital gains harvesting calculator estimates how much long-term gain you can realize at the 0% federal rate from your taxable income and filing status.

US Capital Gains Harvesting Calculator
US$
US$
Gain harvestable at 0% —
0% bracket headroom —
0% rate ceiling —
Gain taxed above 0% —

We always strive to use the latest data for every variable so our results and reports are as accurate as possible. Even so, errors are possible — you should not rely on this tool or its report alone, and we accept no liability for any decision made based on it.

What it does

The US Capital Gains Harvesting Calculator estimates how much long-term capital gain you can realize at the 0% federal rate given your taxable income and filing status.

Data sources & parameters

The figures below drive this calculator. We keep them aligned with the latest official guidance, and each result recalculates automatically whenever a value changes.

ParameterValueSourceLast updated
0% LTCG rate ceiling, singleRate scheduleirs.govEffective 2026-01-01
0% LTCG rate ceiling, married jointRate scheduleirs.govEffective 2026-01-01
0% LTCG rate ceiling, married separateRate scheduleirs.govEffective 2026-01-01
0% LTCG rate ceiling, head of householdRate scheduleirs.govEffective 2026-01-01

We always strive to use the latest data for every variable so our results and reports are as accurate as possible. Even so, errors are possible — you should not rely on this tool or its report alone, and we accept no liability for any decision made based on it.

The formula

Harvestable at 0% = min(unrealized gain, max(0, 0% ceiling − taxable income))

How it works

It finds the 0% long-term capital gains ceiling for your filing status, subtracts your taxable income to get the headroom, and caps the harvestable gain at that headroom.

Where it is used

  • Finding room in the 0% long-term capital gains bracket
  • Planning tax-free gain harvesting
  • Seeing how much gain would be taxed above 0%

Worked example

With $40,000.00 of taxable income and $20,000.00 of unrealized gain as a single filer, … can be harvested at the 0% rate.

What the capital gains harvesting calculator does

The capital gains harvesting calculator estimates how much long-term capital gain you can realize at the 0% federal rate given your ordinary taxable income and filing status. It finds the 0% rate ceiling for your status, measures the headroom between your income and that ceiling, and caps the harvestable gain at the smaller of your headroom and your unrealized gain. The result shows how much gain you could take tax-free and how much would spill into the taxed brackets.

The lowest preferential federal rate on long-term capital gains is zero. If your income is below the 0% ceiling, you can sell appreciated positions, pay no federal tax on the gain, and repurchase immediately to raise your cost basis.

How the calculation works

  • It reads the 0% long-term capital gains ceiling for your filing status.
  • It subtracts your ordinary taxable income from that ceiling to find the headroom.
  • It caps the harvestable gain at the smaller of the headroom and your unrealized long-term gain.
  • Any remaining gain is shown as the amount that would be taxed above the 0% rate.

The 0% ceilings are stored as parameters and updated when they change. If your taxable income already exceeds the ceiling, the headroom is zero and no gain can be harvested at the 0% rate.

The 0% rate ceiling

Long-term capital gains are taxed at 0%, 15% or 20% depending on where they fall once stacked on top of ordinary income. The 0% ceiling is the income level below which long-term gains are not taxed, and it differs by filing status, with married couples filing jointly having a higher ceiling than single filers.

Your ordinary taxable income fills the space under the ceiling first, and long-term gains sit on top, so the room for 0% gains is what is left after your ordinary income. Two people with the same unrealized gain can therefore have very different opportunities: the one with lower ordinary income has more headroom.

Why gains harvesting can help

A gain harvested at 0% costs no federal tax, and you can buy the same investment back immediately to raise your cost basis. The wash-sale rule only applies to losses, so it does not block an immediate repurchase after a sale at a gain. A higher basis means a smaller taxable gain when you eventually sell for good, which can reduce tax in a later year when your income and your capital gains rate may be higher.

This is most useful in low-income years: early retirement before a pension and Social Security begin, a gap between jobs, or a year with business losses. The 0% headroom in those years can be large.

Cautions before you harvest

Realizing gains raises your income, which affects more than capital gains tax. Higher income can reduce or remove income-based tax credits, increase the share of Social Security benefits that is taxable, and push you into higher Medicare premium tiers in later years. State income tax may also apply to the gain even when the federal rate is 0%.

So harvesting right up to the ceiling is not always best. Leaving a small buffer and modeling the effect on your whole return is often wiser. Treat the headroom shown as the maximum room available, not necessarily the amount to use.

What you need to enter

  • Your ordinary taxable income for the year, after deductions.
  • Your unrealized long-term capital gain available to harvest.
  • Your filing status.

Use taxable income after your standard or itemized deduction, because the ceiling is measured against taxable income, not gross income. If your income is uncertain, try a range of values.

Reading your result

The output leads with the gain you could harvest at the 0% rate, then shows your 0% bracket headroom, the 0% ceiling for your status, and any gain that would be taxed above 0%. The estimate covers the federal 0% bracket only; it does not compute state tax or the effects on credits and premiums, so check the full picture with a tax professional before acting. Revisit it when your income or holdings change.

This is general information only and not financial advice.

About This Capital Gains Harvesting Calculator

Use this capital gains harvesting calculator to get an instant, accurate estimate. The figures follow official IRS guidance and every rate and threshold is kept up to date for 2026. Adjust the inputs above to match your situation, or browse all our calculators to plan your next step.

Tax year 2026

Frequently asked questions

What is capital gains harvesting?
Capital gains harvesting means deliberately selling appreciated long-term investments to realize gains while they fall within the 0% long-term capital gains rate. Done carefully, it raises your cost basis at no federal tax cost.
How does the 0% long-term capital gains rate work?
Long-term gains stack on top of your ordinary taxable income. The portion that falls below the 0% rate ceiling for your filing status is taxed at 0%. Only the gain above that ceiling is taxed at 15% or 20%.
What is 0% bracket headroom?
Headroom is the space between your ordinary taxable income and the 0% rate ceiling for your filing status. It is the amount of long-term gain you could realize before any of it is taxed above 0%.
Does harvesting gains increase my income?
Yes. Realized gains raise your income, which can affect tax credits, Medicare premiums, and the taxation of Social Security. Consider these effects before harvesting up to the full ceiling.
Is this the same as tax-loss harvesting?
No. Tax-loss harvesting sells investments at a loss to offset gains. Gains harvesting sells winners to realize gains at the 0% rate. They serve different goals and can be used in different years.
Is my data private?
Yes. The calculation runs entirely in your browser, so nothing you enter is uploaded, stored, or shared.

About the author

Taha Kheirandish

Written and reviewed by

Taha Kheirandish

Economics student and independent researcher

Taha Kheirandish reads tax codes the way other people read maps — to find out where a system actually leads, not where it claims to go.

He is an economics student, and his work here is comparative by design. A pension deferral bonus in Quebec, a commuting allowance in Germany, a rent-increase ceiling in the Netherlands: each is a decision a government made about how money should move, and each reads differently once you set it beside eight others. He builds and checks these calculators across nine markets from primary sources — the regulation rather than a summary of it, the ministry’s own circular rather than a news item quoting it.

That is the editorial standard of the site as well as his habit. Every rate, threshold and bracket here carries the document it was read from and the date it takes effect, and gets re-checked when the law moves rather than when someone happens to notice.

He is a researcher, not a licensed adviser, and nothing on this site is personal financial advice. It is arithmetic done carefully with its sources shown — so that you can check it, and take it to someone who is.

Leave a Reply

Your email address will not be published. Required fields are marked *