Tax-gain harvesting means deliberately selling appreciated investments in a year when your income is low, so the gain gets taxed at 0% or a reduced rate, then resetting your cost base at the higher price. It works best in lean-income years, ahead of retirement, during portfolio rebalancing, or when a single holding has grown into a concentrated position you'd sell anyway.
TL;DR:
- Harvest gains in low-income years to potentially pay zero federal tax on long-term capital gains by staying within the 0% bracket threshold.
- Rebalancing or reducing concentrated positions in a low-tax year can maximize tax efficiency without incurring additional costs.
- Modeling across multiple years helps identify optimal timing, considering projected income, gains, and potential rate changes before executing trades.
- Resetting the cost base through immediate repurchase after selling increases future gains' tax liability but can reduce bracket creep.
- Recordkeeping must include purchase and sale details, repurchase info, and rationale to ensure compliance and simplify tax reporting.
Table of Contents
- What is tax-gain harvesting and how do the mechanics work?
- When does harvesting gains actually make sense?
- How to do it: step-by-step execution and record keeping
- Risks and pitfalls: what can go wrong
- Worked examples and simple calculations
- Practical modelling and next steps
- How does resetting cost base affect future capital gains tax?
- Does harvesting gains trigger AMT or other tax brackets?
- How does this fit your broader financial and retirement plan?
- What are the reporting and recordkeeping requirements?
- Do the rules differ for stocks, ETFs, and mutual funds?
- Author perspective: a practical stance on harvesting gains
- Sources
What is tax-gain harvesting and how do the mechanics work?
Selling an investment that's gone up in value creates a taxable event: the difference between your sale price and your original cost base becomes a capital gain. Buy it straight back (or hold cash briefly and repurchase) and your new cost base resets to that higher price, which shrinks the gain you'll owe tax on next time you sell.
Two things decide how much tax you pay. First, how long you've held the asset. Second, your taxable income for that year. The IRS Tax Topic 409 draws a hard line between short-term gains (assets held one year or less, taxed at your ordinary income rate) and long-term gains (held over a year, taxed at the more favourable 0%, 15%, or 20% federal rates).
The strategy hinges on timing income, not avoiding tax altogether:
- A gain realised while you're in a low-income year can land in the 0% long-term bracket entirely.
- The same gain realised in a high-earning year could cost you 15% or 20% at the federal level, plus state tax.
- Resetting your cost base higher reduces the gain (and therefore the tax) on a future forced sale.
IRS Publication 550 sets out the full mechanics of how gains and losses get calculated and reported for taxable brokerage accounts.
When does harvesting gains actually make sense?
Not every year is a good year to realise a gain, and not every appreciated holding is worth touching. A few situations make the case obvious:
- You're in a genuinely lean income year. A career break, a year of heavy business losses, semi-retirement before superannuation-style income kicks in, or a gap year between jobs can all push your taxable income low enough to sit inside the 0% long-term capital gains band.
- You want to use the 0% band deliberately, not by accident. The Bogleheads community wiki gives a useful practical framing here: figure out how much headroom you have below the next bracket threshold, then harvest gains up to that ceiling and no further.
- You need to rebalance anyway. If a sale is already warranted to bring your portfolio back to target weightings, harvesting the gain at a low rate is a bonus, not an added cost.
- You're sitting on a concentrated position. One stock making up 30% or 40% of your portfolio is a risk problem first and a tax problem second. Trimming it in a low-tax year solves both.
Avoid harvesting when you expect materially higher income next year, when brokerage or advisory fees would eat the benefit, or when the projected tax saving is marginal against the hassle of the trade.
How to do it: step-by-step execution and record keeping
Treat harvesting as a small project, not a single click. Here's a workable sequence.
Step 1: Identify candidates and size the unrealised gain. Pull your holdings and note which ones have appreciated, by how much, and whether they're short-term or long-term. Short-term gains rarely make sense to harvest since they're taxed at ordinary rates anyway.
Step 2: Model the tax impact at your actual marginal rate. Project your taxable income for the year, including the gain itself, and check which bracket it lands in. A gain that looks tax-free on paper can push you over a threshold and get partially taxed at 15%.
Step 3: Decide what happens after the sale. You can repurchase the identical asset immediately (there's no wash-sale rule blocking this for gains, unlike losses), switch into a similar but not identical fund, or simply let the allocation shift if you were rebalancing anyway.
Step 4: Document your reasoning and keep records. Note the date, price, quantity, and your rationale (rebalance, concentration reduction, income timing) in case you need to reconstruct your logic at tax time or under audit.
- Confirm your broker is properly registered before executing trades, using FINRA BrokerCheck.
- Keep trade confirmations and cost-base statements for at least the length of your holding period plus filing history.
- Cross-check your broker's 1099-B against your own records before filing.
Pro Tip: Run the numbers twice, once assuming your income projection is right and once assuming it's 20% higher than expected. If harvesting still makes sense in the worse-case scenario, you've got a genuinely robust decision, not a lucky guess.
Risks and pitfalls: what can go wrong
Tax-gain harvesting is lower risk than its cousin, tax-loss harvesting, mostly because there's no wash-sale rule stopping you from buying straight back in. That doesn't mean it's risk-free.
- Anti-avoidance scrutiny still applies in spirit. While gains don't trigger the wash-sale rule the way losses do, a genuine commercial reason for the trade (rebalancing, reducing concentration, income timing) matters if your return is ever questioned.
- Transaction costs add up. Brokerage fees, bid-ask spreads, and any advisory fees on the trade all cut into the tax saving. Model these explicitly rather than assuming the trade is free.
- Market timing risk is real. Selling and repurchasing, even instantly, exposes you to a price gap if markets move sharply between the two trades.
- Rates can change. A benefit calculated under this year's brackets can shrink or vanish if Congress adjusts capital gains thresholds in a future year.
- The Net Investment Income Tax (NIIT) adds a 3.8% surtax on net investment income above certain modified adjusted gross income thresholds, which can eat into the benefit for higher earners who didn't plan to land in the 0% band anyway.
Worked examples and simple calculations
Numbers make this concrete faster than theory does. Both examples assume long-term holdings (over one year), no state tax for simplicity, and no advisory fees beyond a nominal $10 trade cost.
Example 1: harvesting into the 0% band. Imagine a taxable investor between jobs with $30,000 of ordinary taxable income for the year. The 2026 federal 0% long-term capital gains bracket has considerable headroom above that income level for single filers, so a $15,000 long-term gain realised this year could be taxed at 0% federally, versus 15% ($2,250) if realised the following year once income returns to a higher-earning level.
Selling $25,000 worth realises roughly $15,000 of gain. Because the sale was happening anyway for risk reasons, the tax cost is simply the price of an overdue rebalance, not an avoidable extra.
The gap between the first two rows, $2,250 on a single $15,000 gain, shows why income timing alone can be worth pursuing even without a rebalancing need attached.
Practical modelling and next steps
A single year's calculation only tells half the story. The real value comes from projecting income, expected gains, and fees across several years, then choosing the year that minimises total tax paid, not just this year's tax bill. Multi-year modelling catches bracket creep, NIIT thresholds, and the compounding effect of a lower cost base on future sales, none of which a one-off "sell now" decision accounts for.
Include income projections, expected portfolio gains, transaction costs, and your holding periods when you model this. A tool like Alphaiq's super calculator can help project how retirement income timing interacts with a decision like this.
Pro Tip: If you're within a few years of a major income change, retirement, a business sale, or a big bonus year, model harvesting against every plausible income path before you trade, not just the one you expect.
Speak to a tax professional or CFP before executing a large harvest, and come prepared with your income projections, current cost bases, and the specific bracket thresholds you're trying to stay under.
How does resetting cost base affect future capital gains tax?
The whole point of tax-gain harvesting is that it changes your tax bill on assets you haven't sold yet, not just the ones you sell today. When you sell and immediately repurchase a holding, your cost base resets to the current market price. Any future gain gets calculated from that new, higher starting point.
Say you bought a fund at $10,000 and it's now worth $18,000. If the fund later grows to $25,000 and you sell, your taxable gain is $7,000, not the $15,000 it would have been without the reset.

This matters most for investors who expect their income, and therefore their capital gains rate, to rise over time. It also reduces the size of any single future taxable event, which matters if you're trying to avoid pushing a later sale into a higher bracket in one hit.
The trade-off is that you're giving up the deferral benefit of unrealised gains. Money left compounding untaxed inside an appreciated position keeps growing on the full pre-tax balance. Harvesting realises the tax now in exchange for a lower liability later, so the decision should hinge on how confident you are that your future rate will actually be higher, not just on the mechanical benefit of a lower cost base.
Does harvesting gains trigger AMT or other tax brackets?
The Alternative Minimum Tax (AMT) runs on a parallel calculation with its own exemption amounts and rates, and long-term capital gains are still taxed at the same preferential rates under AMT as under the regular system. The complication isn't the rate on the gain itself, it's what the gain does to your income for other purposes.
A harvested gain adds to your adjusted gross income (AGI), even though the capital gains portion is taxed favourably. That higher AGI can:
- Reduce or eliminate AMT exemption amounts, which phase out above certain income thresholds and can pull other income into AMT territory that wouldn't otherwise be affected.
- Push your income high enough to trigger the 3.8% Net Investment Income Tax on your investment income if you cross the relevant modified AGI threshold.
- Affect income-tested benefits and phase-outs elsewhere in your return, from itemised deduction limits to eligibility for certain credits, since many of these use AGI or modified AGI as the trigger, not taxable income after deductions.
Model the harvest against your complete return, not just the capital gains line, before assuming it's genuinely tax-free.
How does this fit your broader financial and retirement plan?
Tax-gain harvesting isn't a standalone trick, it's a timing lever that should serve goals you've already set. Before harvesting anything, ask what the sale is actually for beyond the tax saving.
If you're several years from retirement and building toward a target portfolio allocation, harvesting during a genuinely low-income year, a career gap, a sabbatical, or semi-retirement before other income sources begin, can lock in gains at minimal tax cost while you have the flexibility to do so. That flexibility often narrows once retirement income streams start, since pension-style income and required distributions can push you back into a higher bracket than you expected.
Retirement timing interacts with harvesting in a few specific ways. The years immediately before other income sources begin are often the lowest-income years an investor will ever have, which makes them prime harvesting windows if the rest of your plan supports selling.
The strategic question is always sequencing: which years, across your full working and retirement timeline, offer the lowest marginal rate on a given dollar of gain? Getting that sequencing right depends on projecting income across the years, not judging this year's tax return in isolation. Resources that map capital gains strategies against a longer financial trajectory, like Alphaiq's guide to capital gains tax strategies for self-directed investors, are built for exactly this kind of multi-year view.
What are the reporting and recordkeeping requirements?
Every harvested gain gets reported on Form 8949 and summarised on Schedule D of your federal tax return, regardless of whether the resulting tax is zero.
Good recordkeeping makes this painless rather than a scramble in April. Keep the following for every harvested position:
- Purchase date, purchase price, and quantity for the original holding (your cost base record).
- Sale date, sale price, and quantity for the harvest transaction.
- Repurchase date and price if you bought back in, since this becomes your new cost base going forward.
- A brief note on your rationale (income timing, rebalancing, concentration reduction) for your own records.
IRS Publication 550 covers the reporting mechanics in detail, including how to handle covered versus noncovered securities, where your broker may or may not have tracked cost base automatically.
Mismatches between your own records and your 1099-B are one of the most common triggers for IRS correspondence, usually easily resolved, but only if you kept the paperwork. Reconcile your broker statement against your own log every year you harvest, not just at filing time.
Do the rules differ for stocks, ETFs, and mutual funds?
The core mechanics of tax-gain harvesting apply the same way across individual stocks, ETFs, and mutual funds, but a few structural differences change how cleanly the strategy executes.
Individual stocks are the simplest case. You control the exact lot sold, which matters if you're holding multiple purchases of the same stock at different cost bases. Specifying which lot to sell (specific identification, rather than default first-in-first-out) lets you target the exact gain size you want to harvest.
ETFs behave similarly to individual stocks for this purpose, trading throughout the day with a clear cost base per lot, but they add a wrinkle: unlike with tax-loss harvesting, there's no wash-sale rule stopping you from buying the identical ETF straight back, so repurchase timing is far more flexible than the loss-harvesting equivalent.
Mutual funds carry a distinct risk: year-end capital gains distributions. Funds distribute realised gains from internal trading to shareholders near year-end, and you owe tax on that distribution even if you haven't sold a single share yourself. Check a fund's estimated distribution before harvesting elsewhere in your portfolio, since an unexpected distribution can push your income above the threshold you were targeting.
Across all three, harvesting only makes sense for long-term holdings. Short-term gains on any of these instruments are taxed at ordinary income rates under IRS Tax Topic 409, which usually erases any benefit from deliberately realising the gain.

Author perspective: a practical stance on harvesting gains
Most of the harm from tax-gain harvesting doesn't come from getting the tax rate wrong. It comes from treating a single year's calculation as the whole decision. A gain that looks free this year can cost you through AGI effects, AMT exemption phase-outs, or NIIT thresholds you didn't check.
The investors who do this well model several years forward before they trade, document why they sold beyond "the tax was low," and keep records clean enough to withstand a lazy afternoon of scrutiny, let alone an audit. That discipline matters more than any single bracket threshold. If you want a starting point for that kind of modelling, Alphaiq's tax strategy resources are built for exactly this kind of multi-year thinking.
— Jonathan
This article is general information, not a substitute for advice from a qualified financial advisor. Consult a qualified financial professional about your own circumstances before acting on anything here.
