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.

Abstract editorial illustration for a finance article about tax-gain harvesting and cost basis resets. A tiered electric-blue staircase rises from left to right, representing a series of increasing cost basis levels. A prominent gold marker or token is placed at the top rung, signaling the newly reset higher basis after a deliberate gain recognition. Below the staircase, a soft navy downward-sloping path suggests the reduced future taxable gain. A subtle calendar arc in the background hints at deliberate low-income year selection. Flat-vector, minimal, off-white background.
Tax-gain harvesting may allow investors in low-income years to recognize appreciated gains at a potentially 0% federal rate and immediately repurchase, resetting cost basis to a higher level and potentially reducing the taxable gain on any future sale at a higher-rate year.

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.

TAX-LOSS HARVESTING sell a position below cost basis realize a capital loss loss offsets other capital gains or up to approximately $3,000 of ordinary income §1091 wash-sale rule applies — 30-day window vs no wash-gain rule for gains TAX-GAIN HARVESTING sell a position above cost basis recognize gain at potentially 0% rate repurchase resets cost basis higher potentially reduces future embedded gain no wash-sale equivalent — may rebuy next day
Tax-gain harvesting is structurally the mirror image of tax-loss harvesting: rather than selling a losing position to realize a deductible loss, an investor sells an appreciated position in a potentially favorable-rate year to reset basis. The absence of a wash-gain rule under IRC §1091 allows immediate repurchase — a structural advantage not available on the loss side.

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.

GROSS INCOME wages + investment income before deductions minus STANDARD DEDUCTION reduces gross income approximately $14,600 single approximately $29,200 married yields TAXABLE INCOME the bracket test uses taxable income including the gain itself HARVEST SPACE threshold minus current taxable income gain fills bracket 2025 thresholds (approximately): single filer ~$48,350 / married filing jointly ~$96,700 — adjusted annually; verify with a qualified adviser income above threshold may face approximately 15% rate (or approximately 20% for very high-income filers)
Available 0% bracket space equals the applicable threshold minus current taxable income — and the recognized gain itself fills that space, so sizing requires modeling the full-year picture before executing. Thresholds are adjusted annually for inflation; verify current figures with a qualified adviser before acting.

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.

WITHOUT BASIS RESET original purchase: approximately $20/share position appreciates to approximately $50 — held eventual exit at approximately $70/share gain: approximately $50/share measured from original approximately $20 basis taxed at future rate (potentially higher) vs AFTER BASIS RESET harvest: sell at approximately $50, rebuy at $50 new basis: approximately $50/share (gain potentially at 0%) eventual exit at approximately $70/share gain: approximately $20/share measured from reset approximately $50 basis potentially reduces future tax exposure
A tax-gain harvest in a low-rate year may reset cost basis from approximately $20 to approximately $50, potentially reducing the taxable gain on a later exit from approximately $50 per share to approximately $20 per share — the same position, but with meaningfully different future tax exposure depending on the investor's anticipated future rate.

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.

CAPITAL GAIN recognized in tax year 0% LONG-TERM GAINS RATE uses taxable income (after deductions) threshold adjusted annually for inflation 3.8% NIIT SURCHARGE uses MAGI — not taxable income threshold fixed — not inflation-adjusted qualifying for the 0% rate does not automatically exempt a gain from the NIIT — both tracks apply independently
The 0% long-term capital gains rate and the approximately 3.8% NIIT operate as separate computations with different income measures and different thresholds. An investor below the 0% rate threshold may still owe the NIIT if MAGI exceeds the applicable fixed floor. For most investors eligible for the 0% bracket, MAGI is typically well below the NIIT threshold — but the edge case warrants verification. See the NIIT and TLH article for the full mechanics.

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.

Abstract editorial illustration showing a prior-year capital loss carryforward offsetting a recognized gain. On the left, a stack of electric-blue and gold portfolio tokens is arranged as a reserve — the accumulated loss bank from prior systematic harvesting years. A bold gold arrow flows rightward from the stack toward a blue gain column or bar on the right, landing to neutralize or reduce the gain representation. The overall composition is minimal, flat-vector, and modern, suggesting multi-year loss accumulation meeting a deliberate gain recognition event with no text or numerals.
A capital loss carryforward under IRC §1212 may allow investors above the 0% bracket threshold to execute a basis reset by recognizing a gain sized to the carryforward balance — arriving at potentially zero net capital gain in the execution year while still resetting basis to a higher value. Character matching may apply: a long-term carryforward may offset long-term gains first.

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.

BRACKET OVERFLOW gain fills the 0% bracket income above threshold may face approximately 15% rate model full-year taxable income before executing COORDINATION FAILURE Roth conversion + TGH planned independently combined income may exceed the 0% threshold both require joint sizing WRONG YEAR ordinary income already places investor in approximately 15% or approximately 20% bracket no rate advantage available strategy only works in low-rate years
Three execution pitfalls undermine a tax-gain harvest: bracket overflow (the recognized gain itself fills and exceeds the 0% space), income coordination failure (a Roth conversion or other income event eliminates the 0% bracket when not jointly sized), and wrong-year execution (ordinary income already places the investor in the approximately 15% or approximately 20% bracket, removing the rate advantage before the harvest begins).

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.

See your basis and carryforward in one place