Tax-loss harvesting gets most of the attention in tax-aware portfolio management. Its counterpart — deliberately realizing appreciated gains in years when income is low enough to qualify for the 0% federal capital gains rate — is less discussed but can be equally valuable for the right investor in the right year. Many investors holding a direct-index sleeve carry substantial unrealized gains that were never harvested. Tax-gain harvesting may offer a path to reduce the future embedded tax cost of those positions by resetting basis today, potentially at no immediate federal income tax.
What is tax-gain harvesting, and how does it differ from tax-loss harvesting?
What is tax-gain harvesting, and how does it differ from tax-loss harvesting?
Tax-gain harvesting is the deliberate recognition of long-term capital gains in a tax year when income is low enough to qualify for the 0% federal capital gains rate — realizing the gain at potentially no immediate federal cost while resetting the position's cost basis to a higher value, thereby potentially reducing the future taxable gain when the position is eventually sold in a higher-rate year.
The key distinction from tax-loss harvesting is directional. Tax-loss harvesting involves selling positions that have declined in value to generate a realized loss that can offset gains or, to a limited degree, ordinary income under IRC §1211. Tax-gain harvesting does the opposite: it involves selling positions that have appreciated in value during a year when the applicable federal rate on those long-term gains may be 0% — effectively recognizing the embedded gain at potentially no tax cost, then immediately repurchasing to reset basis.
The absence of a "wash-gain" rule is a structural feature of this strategy. Under IRC §1091, the wash-sale rule applies only to losses — it disallows a realized loss when a substantially identical security is repurchased within 30 days of the sale. No equivalent restriction applies to gains. An investor can sell an appreciated position and repurchase the same security the next trading day without penalty, establishing a new, higher cost basis. The substantially identical deep dive covers §1091's scope and why its loss-only application creates this asymmetry.
What income level qualifies for the 0% long-term capital gains rate?
What level of taxable income allows a taxpayer to pay 0% federal tax on long-term capital gains?
The 0% long-term capital gains rate typically applies when a taxpayer's total taxable income — including the capital gains themselves — falls below an annually inflation-adjusted threshold; for the 2025 tax year that threshold is approximately $48,350 for single filers and approximately $96,700 for married filing jointly, though both numbers adjust each year and the gain being recognized itself counts toward the test.
The threshold is applied against taxable income, not adjusted gross income (AGI) or modified AGI (MAGI). Taxable income is gross income minus above-the-line deductions and the standard deduction (or itemized deductions). This means many middle-income investors have more 0% bracket space available than their wage income alone might suggest, because the standard deduction can meaningfully reduce what counts toward the threshold.
The complication is that the gain itself fills part of the bracket. An investor with taxable income of approximately $40,000 before the harvest might qualify to realize up to approximately $8,000 in long-term gain at the potentially 0% rate before taxable income exceeds the threshold. Any gain above that amount would typically be taxed at the approximately 15% rate (or potentially the approximately 20% rate for very high-income filers). Sizing the harvest to stay inside the 0% bracket is the central execution challenge. The annual pacing article covers the timing and bracket decisions that inform year-end strategies like this one.
What does resetting cost basis mean, and why does it reduce future tax exposure?
Why does selling an appreciated position and immediately rebuying it at a higher price potentially reduce future tax liability?
When an investor sells a position and repurchases it at the current market price, the repurchase establishes a new cost basis equal to the purchase price — so the future taxable gain, measured from that higher basis rather than the original purchase price, is smaller, potentially reducing the tax cost of any future sale where the gain would be taxed at a rate above 0%.
Consider a position originally purchased at approximately $20 per share that has grown to approximately $50 per share. Without a basis reset, an eventual sale at approximately $70 per share produces a taxable gain of approximately $50 per share — measured from the original approximately $20 basis. After a tax-gain harvest that repurchases at approximately $50 per share, the same eventual sale at approximately $70 per share produces a taxable gain of approximately $20 per share, potentially reducing the future tax exposure significantly if the investor is in a higher bracket at that future exit.
The tradeoff is that the investor recognizes income in the current year that might otherwise remain deferred. The strategy is most compelling when the current year's applicable rate is materially lower than the expected future rate — specifically when the current year qualifies for the 0% rate and the investor anticipates being in a higher bracket when the position is eventually sold. For investors expecting a significant income increase, a large Roth conversion in a future year, an RSU vesting cliff, or a business sale, that rate differential can be substantial.
Does tax-gain harvesting at the 0% rate also avoid the Net Investment Income Tax?
Does qualifying for the 0% long-term capital gains rate also eliminate the 3.8% Net Investment Income Tax surcharge?
Not necessarily — the 0% capital gains rate and the Net Investment Income Tax are computed under different rules with different income thresholds, so an investor who qualifies for the 0% rate may still need to verify whether their modified adjusted gross income exceeds the NIIT threshold, which was approximately $200,000 for single filers and approximately $250,000 for married filing jointly and is not adjusted for inflation.
The NIIT under IRC §1411 applies a surcharge of approximately 3.8% to net investment income for individuals whose MAGI exceeds a fixed statutory threshold. Because the NIIT threshold uses MAGI rather than taxable income as its trigger and is not inflation-adjusted, an investor can theoretically face a scenario where taxable income (after deductions) falls below the 0% capital gains threshold while MAGI remains above the NIIT floor. In that case, the gain could still be subject to the approximately 3.8% NIIT surcharge even though the regular income tax rate on it may be 0%. The NIIT and TLH article covers the full mechanics of how net investment income is computed and where harvested losses and gains intersect with the surcharge.
For investors in the typical range for tax-gain harvesting — those who qualify for the 0% bracket — income levels are often well below the NIIT threshold, making the surcharge a practical non-issue for most implementations of this strategy. The edge case to watch is a year with unusually low ordinary income but high investment income from dividends, distributions, or other sources that elevates MAGI without equally elevating taxable income after deductions.
How does a capital loss carryforward change the tax-gain harvesting calculation?
Can a capital loss carryforward from prior-year harvesting substitute for the 0% bracket and still achieve a cost basis reset?
A capital loss carryforward under IRC §1212 can potentially offset gains recognized in any future year regardless of the investor's current income bracket, meaning an investor above the 0% threshold may still execute a basis reset by sizing the realized gain to not exceed the available carryforward balance — arriving at potentially zero net capital gain in that year while still resetting cost basis to a higher value.
This carryforward-based approach widens the field of eligible investors beyond those in genuinely low-income years. An investor in the approximately 15% bracket with a meaningful prior-year loss carryforward may be able to realize gains up to the carryforward amount without net federal capital gains tax in the execution year. The character-matching rules apply: a long-term carryforward loss nets against long-term gains first, so aligning the character of the carryforward with the character of the gain being harvested may produce the most efficient offset. For the full mechanics, see the capital loss carryforward article.
For investors engaged in systematic tax-loss harvesting over multiple market cycles, the carryforward balance may represent years of accumulated harvest activity. Understanding the combined toolkit — the 0% bracket for low-income years, the carryforward offset for above-bracket years — is part of what makes a multi-year tax-aware strategy more flexible than any single-year tactic. The zero-tax exit strategy article covers how pairing a loss bank against a deliberate gain-recognition event can approach a zero-net-tax outcome in the execution year.
What are the common mistakes that undermine a tax-gain harvest?
What are the most common execution errors in a tax-gain harvesting strategy?
The three most common mistakes are failing to account for how the gain itself fills the 0% bracket and may push part of the realization above the threshold, neglecting to coordinate with other income events in the same year — such as Roth conversions or large distributions — and attempting tax-gain harvesting in years when ordinary income already places taxable income in the approximately 15% or approximately 20% long-term gains bracket, eliminating the rate advantage.
The bracket-filling problem is mechanical and frequently underestimated. Because the gain adds to taxable income, a large harvest can push the investor above the 0% threshold mid-execution. The practical remedy is to model the full-year tax picture — including all expected income, deductions, and the size of the intended harvest — before executing, and to plan the gain realization in a year where bracket space is genuinely available.
Coordination with Roth conversions is particularly important. Both a Roth conversion and a tax-gain harvest add taxable income in the execution year. Running both in the same year without accounting for their combined effect can eliminate the 0% advantage on the gain, or cause a Roth conversion intended to fit within a lower bracket to spill into a higher one. The two strategies are compatible and share the same bracket-management logic — but they require joint sizing rather than independent planning.
Read this next with the zero-tax exit strategy, capital loss carryforward mechanics, Roth conversions and TLH, NIIT and harvested losses, and annual pacing decisions.