Tax-gain harvesting vs. tax-loss harvesting

Tax-gain harvesting vs. tax-loss harvesting — Finelo Blog

Compare realizing investment gains with realizing losses, including holding periods, wash sales, offsets, and portfolio tradeoffs.

10 min read

Practice investing with Finelo

Build practical investing skills with guided lessons, simulator practice, and structured challenges.

Explore Finelo

Last editorial review: September 28, 2026

Explore Finelo's 28-day challenges

Turn learning into a daily habit with guided challenge paths.

View challenges

Tax-gain harvesting deliberately realizes an investment gain when the tax cost may be favorable. Tax-loss harvesting realizes a loss that can offset gains under the tax rules. Both are primarily strategies for taxable investment accounts, not a reason to trade inside an IRA for a current capital-loss deduction.

Side-by-side diagram of selling a rising stock to realize a gain versus selling a falling stock to realize a loss
Tax-gain harvesting sells a position that has risen to realize the gain in a favorable tax year. Tax-loss harvesting sells a position that has fallen to realize a loss that can offset gains. Both apply mainly to taxable accounts.

Start with the portfolio you want to own, then evaluate the tax consequences of changing it.

Compare the purpose

Strategy Potential benefit Main caution
Realize gains Use a favorable tax year or reset basis after repurchase Added income can affect taxes and benefits elsewhere
Realize losses Offset gains and potentially limited ordinary income Wash-sale rules and portfolio changes can undermine the result

The IRS capital-gains guide explains netting gains and losses. If net losses exceed gains, the annual ordinary-income deduction is generally limited to $3,000, or $1,500 if married filing separately, with eligible remaining losses carried forward.

Flow diagram showing losses netted against gains, up to $3,000 deducted from income, and the rest carried forward
Realized gains and losses are netted first. If losses are larger, generally up to $3,000 ($1,500 if married filing separately) can reduce ordinary income each year. Eligible remaining losses carry forward to future years.

Do not confuse the tax rate with the total effect

A gain taxed at a 0% federal long-term capital-gains rate can still affect state tax, income-based benefits, or other calculations. It also uses available room in the relevant bracket. Estimate the full return rather than treating the gain as having no consequence.

If you sell at a loss and buy substantially identical securities within 30 days before or after the sale, wash-sale rules can disallow the current loss. Review automatic investments, spouse transactions, and retirement-account purchases too. See IRS Publication 550.

Timeline showing a 30-day window on each side of a loss sale where repurchasing triggers the wash-sale rule
Wash-sale rule: if you buy substantially identical securities within 30 days before or after selling at a loss, the current loss can be disallowed. Automatic purchases, a spouse's trades and retirement accounts all count.

Use an equal-risk comparison

Hypothetically, a realized $5,000 loss may offset a $5,000 capital gain after the applicable netting rules. But replacing the sold holding with a riskier investment changes more than taxes.

Check basis, holding period, transaction costs, replacement exposure, and the effect on future gains. Tax savings are useful when they support your investment plan, not when they lead you to keep or buy an investment you would otherwise avoid.

Check the account, tax lot, and holding period first

Harvesting generally concerns taxable investment accounts. Selling inside an IRA does not create the same currently deductible capital loss as selling a taxable holding. Identify the account before applying a strategy described for taxable investments.

Within the taxable account, confirm the cost basis and acquisition date of the shares being sold. Different lots of the same investment can have different gains, losses, and holding periods. Use the broker's permitted lot-selection process and keep the confirmation so the reported sale matches the intended transaction.

Coordinate replacement purchases across accounts

Loss-harvesting planning requires more than delaying a manual repurchase in the same account. Automatic dividend reinvestment, scheduled purchases, and activity in other relevant accounts can affect wash-sale treatment. Review the full transaction pattern and the applicable rules before selling at a loss.

For gain harvesting, a favorable federal rate does not establish that the transaction has no cost. State tax and income-related effects can still matter. Model the additional realized gain in the complete return, including how it interacts with ordinary income and existing losses.

Practice investing with Finelo

Build practical investing skills with guided lessons, simulator practice, and structured challenges.

Explore Finelo

Keep the portfolio decision visible

A tax benefit should be evaluated alongside investment exposure, transaction costs, and the reason for owning the asset. Selling an unsuitable holding can serve a portfolio goal as well as a tax goal. Selling and replacing solely for a small tax effect may add complexity without improving the overall result.

After the trades, update basis records and the estimate of tax payments due. Retain any capital-loss carryforward information for later returns. The objective is a documented after-tax improvement consistent with the investment plan, not the largest number of harvesting trades.

How to compare your options

  • Current vs. expected future tax treatment. If realized capital gains will be taxed at a lower rate now than the rate you expect to face later, realizing gains today can make sense (tax-gain harvesting). The IRS notes that net capital gains may receive a lower tax rate than ordinary income.

Example: Lower ordinary income this year may leave more room in a favorable long-term capital-gains bracket. A future gain does not become ordinary income merely because you wait; holding period and the applicable tax rules still determine its character.

  • Need for tax-loss offsets today. If you have realized gains this year or taxable income you want to reduce, realizing losses can offset those gains and reduce taxes in the near term (tax-loss harvesting). The result depends on the capital-gain and loss netting rules, available loss carryforwards, and any disallowance such as a wash sale.

Example: If you sold another holding for a gain earlier in the year, harvesting a loss later can directly reduce the tax owed on that gain.

  • Portfolio and rebalancing requirements. Are the positions you’d sell small, concentrated, or core holdings? Harvesting should fit your asset-allocation plan. Selling winners or losers has investment consequences—plan replacements to keep risk consistent.
  • Holding period and future flexibility. Long-term vs. short-term differential matters. The IRS treats gains and losses in the capital-gains framework, and timing affects rate treatment. If you need to retain similar market exposure, design replacement trades carefully.
  • Cash-flow and liquidity. Tax-gain harvesting may create additional tax, including a need for estimated payments. A gain qualifying for a 0% federal rate does not necessarily create federal capital-gains tax, but other income-related effects still need review.
  • Administrative complexity and recordkeeping. Harvesting increases realized transactions and basis tracking. Publication-level IRS guidance describes many aspects of investment income, basis, and distributions that affect bookkeeping.

Decision framework (short): Prioritize tax rates, then portfolio fit, then cash-flow and recordkeeping. If realized gains will be taxed cheaply relative to future income, favor gain harvesting; if you need immediate offsets, favor loss harvesting. Use both when they work together to neutralize tax exposure while rebalancing.

What is Tax Gain Harvesting?

Worked example (illustrative): You hold a taxable security with an unrealized gain of $10,000. If the entire gain falls within a single applicable rate band, multiplying that rate by $10,000 estimates the direct capital-gains tax before other interactions. Gains can cross rate bands, be offset by losses, or affect other taxes and benefits, so the complete return controls. If you expect your tax situation to be worse later (for example, higher taxable income or a change in tax brackets), harvesting the gain now converts a future uncertain tax outcome into a current known one. Because tax rates vary by filing status and law, compute the tax owed under current rules before deciding; see IRS guidance for capital gains treatment. When it helps: Gain harvesting works best when (a) current capital-gains treatment is favorable relative to expected future tax exposure, (b) you want to reset cost basis for future tax planning, or (c) you need to rebalance without increasing future tax drag. Gains and losses interact through the tax netting rules.

Diagram comparing tax on a $10,000 gain realized now versus an uncertain tax on the same gain later
Illustrative: realizing a $10,000 gain now locks in today's known tax treatment. Waiting leaves the tax outcome uncertain if your income or bracket rises later. The full tax return, not a single rate, determines the actual cost.

What is Tax Loss Harvesting?

Worked example (illustrative): You sold a fund earlier in the year and realized a $5,000 gain. You also hold a different position down $5,000. Realizing that $5,000 loss can offset the realized gain, lowering the tax bill on the net gain. If you want to maintain similar market exposure, you must replace or rebalance carefully to avoid unintended changes to portfolio risk. When it helps: Loss harvesting is most useful when you have realized gains you want to offset, you expect to stay invested but wish to reduce tax drag now, or you want to create loss carryforwards for later years.

Equation diagram of a $5,000 gain plus a $5,000 loss netting to zero taxable gain
Illustrative: a $5,000 realized gain from one fund plus a $5,000 harvested loss from another position nets to $0 in taxable capital gain. Choose any replacement carefully to keep your portfolio risk the same.

When to choose each option

Hypothetical loss-harvesting scenario: An investor has realized gains earlier in the year or wishes to lower taxable income now. Selling an underperforming holding to realize losses can offset earlier gains and improve near-term tax efficiency. Example: an investor who rebalanced into winners early in the year and now holds losers can harvest losses to mitigate the tax cost of previous sales. Can you do both in the same year? Yes, both can occur in the same year. The netting rules determine the combined result; they do not promise maximum savings from doing both. The right mix depends on your realized gains, expected future income, and portfolio objectives. Quick checklist to pick an approach:

  • Is your current capital-gains treatment favorable relative to expected future taxes? Consider gain harvesting.
  • Do you have realized gains you can offset? Consider loss harvesting.
  • Will the sale change your portfolio risk materially? If so, plan replacements to maintain exposure.
  • Can you pay any immediate tax bill from gain harvesting without harming liquidity? If not, consider loss harvesting or delaying sales.

Tradeoffs and caveats

  • Immediate tax payment vs. future savings. Tax-gain harvesting accelerates taxable events and may produce a current tax liability. That tradeoff is central: realizing a gain under today’s rules changes the timing of tax exposure; it does not eliminate investment risk or uncertainty about future tax rates. The IRS notes capital gains may be taxed at a lower rate than ordinary income, which is the core rationale for gain harvesting.
  • Replacement and exposure risk. Selling to harvest a loss reduces exposure to that security. To remain invested at the same risk level you may replace the position with a similar asset. Replacement must be planned to avoid unintended portfolio drift or a wash sale.
  • Recordkeeping and basis complexity. Realized transactions increase bookkeeping needs. IRS Publication 550 covers investment income and basis topics relevant for calculating gains and losses. Accurate basis records are essential to avoid surprises at tax time.
  • Changing laws and state taxes. Federal capital-gains treatment may change and state tax rules vary; check current IRS and state guidance when planning. The linked IRS guidance explains the federal calculation.
  • Mistaken optimization. Avoid harvesting for its own sake. The financial benefit must be weighed against transaction costs, taxes paid today, and portfolio effects.

Practical mistakes to avoid:

  • Harvesting gains but forgetting to fund the tax payment. Always estimate the tax liability before acting.
  • Selling a loser and immediately repurchasing the same security without considering replacement rules and exposure (plan replacements with replacement investments that do not trigger the substantially-identical-security wash-sale rule when appropriate).
  • Failing to track cost basis after many trades. Use broker statements and IRS Publication 550.

What is tax-loss harvesting?

Tax-loss harvesting is selling investments that have lost value to realize a capital loss, which can be used to reduce taxes owed on realized gains or otherwise affect taxable income; practitioners commonly use it to offset gains and improve after-tax returns.

What is tax-gain harvesting?

Tax-gain harvesting is intentionally realizing appreciated assets to take advantage of capital-gains tax treatment now — useful when current capital-gains treatment is attractive relative to future expectations.

Can I harvest gains and losses in the same year?

Yes. Using gains and losses together can help you manage your overall tax outcome; coordinated harvesting is a common strategy when it fits portfolio and tax objectives.

When should I consult a tax advisor?

Consult a tax professional when your tax situation is complex, you expect major changes in income or filing status, you have concentrated positions, or you need clear rules about replacement transactions and carryforwards. This article is educational; for personalized tax planning consult a qualified advisor.

For a separate part of estimating taxable income, compare Standard deduction vs. itemized deductions.

This guide covers U.S. rules. Finelo provides financial education, not personalized financial, investment, tax, or legal advice.

InvestingU.S. GuideFinancial Education

Practice investing with Finelo

Build practical investing skills with guided lessons, simulator practice, and structured challenges.

Explore Finelo

About the author

Finelo Team

The Finelo Team creates practical investing and trading education designed to help beginners learn faster with structured challenges, simulator practice, and bite-sized lessons.

Keep reading — Related articles

Make your next read a first step.

Take what sparked your curiosity and explore it through a guided, 28-day learning challenge.

Find your learning path