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.

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.
| Parameter | Value | Source | Last updated |
|---|---|---|---|
| 0% LTCG rate ceiling, single | Rate schedule | irs.gov | Effective 2026-01-01 |
| 0% LTCG rate ceiling, married joint | Rate schedule | irs.gov | Effective 2026-01-01 |
| 0% LTCG rate ceiling, married separate | Rate schedule | irs.gov | Effective 2026-01-01 |
| 0% LTCG rate ceiling, head of household | Rate schedule | irs.gov | Effective 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
