Image generated with AI assistance from Copilot.
The Mirror Strategy
Tax-loss harvesting captures market losses to offset taxes. Tax-gain harvesting does something that sounds counterintuitive: it intentionally captures gains, but does so in a year when those gains are taxed at a very low rate, or potentially zero at the federal level.
Both strategies share the same underlying goal: reduce the lifetime tax burden on a portfolio. The mechanics run in opposite directions.
Every dollar of unrealized gain in a taxable brokerage account is a deferred tax liability. The investment grows, and so does the eventual tax bill. The longer the gain compounds untouched, the larger that obligation becomes. Tax-gain harvesting is a tool for managing that liability deliberately, in the years when the federal tax rate on long-term capital gains is most favorable.
The 0% Federal Capital Gains Bracket
Under current federal tax law, long-term capital gains on assets held longer than one year are taxed at one of three rates: 0%, 15%, or 20%. The applicable rate depends on the investor's taxable income for the year.
The 0% rate applies up to a taxable income threshold that is adjusted annually for inflation and varies by filing status. The thresholds are published each year by the IRS and are subject to legislative change. Verify the current figures with the IRS or a qualified tax professional before making any planning decisions.
Capital gains are "stacked on top" of ordinary income for federal tax purposes. Ordinary income fills the brackets from the bottom, and long-term capital gains sit on top. The 0% rate applies to capital gains that fall within the 0% threshold after accounting for ordinary income already in the bracket.
An Illustrative Example
Consider a hypothetical early-retired couple, both age 62, in a gap year before Social Security:
| Income Source | Amount |
|---|---|
| Pension income | $40,000 |
| IRA withdrawals | $20,000 |
| Combined ordinary income | $60,000 |
| Standard deduction (MFJ, approximate) | $30,000 |
| Taxable income from ordinary sources | ~$30,000 |
The standard deduction is adjusted annually for inflation. The figure above is approximate and for illustrative purposes only. Verify current figures with the IRS or a qualified tax professional.
With the 0% threshold near $94,050, this hypothetical couple has roughly $64,000 in available bracket space for long-term capital gains at the 0% federal rate. Capital gains realized within that space would face $0 in federal capital gains tax.
In contrast, the same couple realizing those gains during peak earning years at $600,000 combined income would face federal capital gains rates of 20% plus the 3.8% Net Investment Income Tax (NIIT), plus California state income tax, for a combined rate potentially exceeding 36%. The difference in the federal component alone on $64,000 of gains would be roughly $15,000.
The total lifetime impact depends on how many gap years are available, the size of the taxable account, the magnitude of unrealized gains, and how consistently the strategy is applied across those years.
Why California Changes the Math
For California residents, this analysis requires an essential adjustment.
California does not offer a preferential rate for long-term capital gains. The state taxes them as ordinary income, subject to California's progressive marginal rates, which currently reach 13.3% at the top of the scale under current California law.
California income tax rates are subject to change. Verify current rates with the California Franchise Tax Board or a qualified California tax professional.
A California investor who qualifies for the federal 0% capital gains rate may still owe significant California income tax on those same gains. For a resident in the 9.3% California bracket, realizing $64,000 in long-term gains at 0% federal would still generate approximately $5,952 in California state tax.
This does not make the strategy ineffective. The correct comparison is not "0% tax versus 0% tax." It is:
| Scenario | Federal Rate | California Rate | Combined (approximate) |
|---|---|---|---|
| Gap year at 0% federal | 0% | ~9.3% | ~9.3% |
| Peak income year | ~23.8% (20% + NIIT) | ~13.3% | ~37.1% |
Tax rates shown are approximate and based on federal and California law in effect as of the date this article was written. Actual rates depend on individual income levels and circumstances.
On $64,000 of gains, the difference in total tax between these scenarios could be roughly $17,792. That is meaningful. But it is the result of coordinated planning across both federal and state dimensions, not the elimination of tax entirely.
Any analysis that treats tax-gain harvesting as "free" for California residents overstates the benefit. The correct framing is that the strategy can materially reduce the total lifetime tax on appreciated investments, while the California component remains regardless of which federal bracket applies.
When the Opportunity Arises
The 0% bracket is typically only accessible when ordinary income falls meaningfully below the threshold. For most investors during peak earning years, ordinary income alone exceeds the 0% threshold, leaving no room for capital gains at that rate.
The windows where the strategy tends to apply include:
Early retirement gap years. Investors who retire before claiming Social Security, which may be deferred to age 70 for maximum benefit, often experience several years of significantly reduced income. If IRA withdrawals and other income sources are managed thoughtfully, ordinary income may be low enough to create substantial 0% bracket space for capital gains.
Sabbaticals or career transitions. A year with significantly reduced earned income, such as an extended leave or a period between roles, may create a temporary opportunity to realize gains at favorable federal rates.
The year of retirement. For investors who retire mid-year, earned income covers only part of the year. That partial-year income may leave meaningful bracket space available.
Coordinated planning in retirement. Retirees who actively manage which accounts they draw from may choose, in certain years, to draw less from IRAs and intentionally create room in the lower brackets for capital gains.
In each case, the window is year-specific. It depends on that year's income composition and cannot be assumed to persist across multiple years automatically. The planning opportunity requires advance awareness and deliberate action within the applicable tax year.
How Tax-Gain Harvesting Works
The mechanical steps are straightforward. The value comes from the planning coordination that enables them.
Step 1: Identify appreciated positions in taxable accounts
Tax-gain harvesting applies exclusively to taxable brokerage accounts. Gains inside a 401(k) or IRA compound without capital gains tax regardless of the unrealized gain, so there is no harvesting benefit in those accounts. Within the taxable account, the investor identifies positions held for more than one year that have significant unrealized gains.
Step 2: Estimate available bracket space
Before realizing any gains, the investor calculates the available room at the 0% federal rate. This requires knowing projected ordinary income for the year, the applicable deductions, the resulting taxable income from ordinary sources, and the difference between that figure and the 0% threshold. California state tax implications should be estimated in parallel, not as an afterthought.
Step 3: Sell appreciated positions up to the available bracket space
With available bracket space estimated, the investor sells positions to realize long-term gains within that space. Precision matters: exceeding the 0% threshold does not eliminate the strategy's value, but the marginal amount above the threshold is taxed at 15% federally rather than 0%. Careful estimation reduces the risk of inadvertently crossing the threshold.
Step 4: Immediately repurchase
The wash-sale rule applies to losses, not gains. After realizing capital gains, the investor can immediately repurchase the same securities at the new, higher price. No waiting period is required. No replacement fund is needed. The portfolio composition is unchanged. This is a key distinction from tax-loss harvesting, where the wash-sale rule requires careful selection of a different but similar security.
Step 5: Record the new cost basis
The new cost basis is the repurchase price. Future gains accrue from this higher starting point, reducing the taxable gain when the investment is eventually sold. The deferred tax liability that existed before the harvest has been reduced or eliminated for those positions.
The Interaction with Roth Conversions
Tax-gain harvesting and Roth conversions are both most effective in low-income years, and they compete for the same bracket space. This creates a coordination challenge that is often underestimated.
Roth conversions generate ordinary income. That income fills the lower brackets from the bottom. Long-term capital gains then sit on top of ordinary income for federal tax purposes. If a large Roth conversion consumes most of the available low-bracket space in a given year, there may be little or no room remaining for capital gains at the 0% federal rate.
Consider a retired couple with $60,000 of available bracket space below the 0% LTCG threshold. They can allocate that space to:
- Roth conversions: converting $60,000 from a traditional IRA, paying tax at ordinary income rates but reducing future Required Minimum Distributions
- Tax-gain harvesting: realizing $60,000 in long-term capital gains at 0% federal, resetting cost basis in the taxable account
- Some combination of both, subject to the constraint that each dollar allocated to one reduces the room for the other
There is no universal answer to the right allocation. The optimal split depends on the relative size of the IRA versus the taxable account, the projected future tax environment, anticipated RMD levels, and California state tax on both types of income. In California, Roth conversions also trigger state income tax at ordinary rates, adding another dimension to the analysis.
The practical implication: a plan that applies both strategies without modeling the interaction may produce a suboptimal result. Evaluating them together, in the context of the full income picture for a given year, is part of what makes retirement tax planning a multivariable coordination problem.
NIIT and IRMAA Considerations
Two additional federal factors can affect the strategy's economics for investors at higher income levels.
Net Investment Income Tax
The Net Investment Income Tax (NIIT) adds 3.8% to the federal rate on investment income, including capital gains, for investors with modified adjusted gross income (MAGI) above $250,000 for married couples filing jointly, under current law as of the date this article was written.
The NIIT is calculated using MAGI, while the 0% capital gains bracket is determined using taxable income. These are not the same figure. Investors who are near the 0% threshold for capital gains purposes may still be subject to NIIT if their MAGI exceeds the NIIT threshold. For investors in this situation, realized capital gains may face the 3.8% NIIT surcharge even when the standard capital gains rate is technically 0%.
IRMAA
For investors who are on Medicare or approaching eligibility, capital gains realized in a given year increase MAGI for that year. IRMAA (the Income-Related Monthly Adjustment Amount, a Medicare premium surcharge) is assessed two years after the income year. A year with significant capital gains may result in higher Medicare Part B and Part D premiums two years later. This is a cost that belongs in the full analysis, even if it does not eliminate the strategy's benefit.
When Tax-Gain Harvesting Does Not Apply
The strategy is ineffective in high-income years. For investors earning significant wages or taking large IRA withdrawals, ordinary income typically consumes all or most of the 0% bracket space, leaving no room for capital gains at that rate.
It is also less applicable when:
- The taxable account holds very low-basis positions that the investor intends to hold until death. Under current law, heirs who inherit appreciated securities generally receive a step-up in cost basis to the fair market value at the date of death, which may eliminate the capital gains tax on lifetime appreciation. In a community property state like California, a surviving spouse may receive a step-up on community property assets when the first spouse passes. If the investment will eventually be inherited and a step-up is expected to apply, resetting the basis through harvesting may be less compelling. These rules are complex and subject to change; consult a qualified estate planning professional regarding the specific situation.
- The unrealized gains in the taxable account are modest relative to overall portfolio size.
- The investor's primary tax exposure is concentrated in tax-deferred accounts (401k, traditional IRA) rather than in taxable positions.
For near-retirees with substantial taxable brokerage accounts accumulated over decades of investing, however, the gap years before Social Security claiming represent a window where the strategy merits explicit attention.
What This Means in Practice
Tax-gain harvesting is a planning-intensive strategy. The available bracket space changes each year based on income, deductions, and other decisions made simultaneously. Using it effectively requires:
- Tracking unrealized gains in taxable accounts by position and holding period (long-term versus short-term)
- Projecting ordinary income for the year with enough accuracy to estimate available bracket space before realizing any gains
- Coordinating with Roth conversion decisions, estimated tax payments, and any planned portfolio adjustments
- Modeling California state tax alongside federal, not as a secondary calculation
- Monitoring NIIT and IRMAA thresholds where applicable
The interaction between these variables illustrates why optimizing one lever in isolation can produce a result that is worse than a coordinated approach. Realizing capital gains without accounting for a Roth conversion already planned, or without estimating the California state tax, or without checking IRMAA implications, may result in a suboptimal outcome compared to what integrated planning would suggest.
The broader observation is that deferred capital gains in a taxable account are a liability that grows with the investment. Managing that liability deliberately, in the years when the tax rate is most favorable, is part of constructing a tax-efficient retirement income plan. Tax-gain harvesting is one tool in that coordination, alongside asset location, tax-loss harvesting, Roth conversions, and fund selection. None of these strategies operates independently; the value comes from applying them together.
Further reading:
- Tax-Loss Harvesting Over a Lifetime The mirror strategy: how capturing losses in a taxable account defers taxes and can compound significantly over decades. Read →
- Roth Conversions for High-Net-Worth Investors How partial Roth conversions work in low-income years, and why they compete with tax-gain harvesting for the same bracket space. Read →
- How to Pay $0 Federal Tax on $100,000 Retirement Income A look at how the 0% bracket works in practice for retirement income, including capital gains, Social Security, and IRA withdrawals. Read →
This post is for general educational purposes only and does not constitute tax or investment advice. Individual tax situations vary; consult a qualified tax professional or financial advisor before making planning decisions.