LTax Blog

Tax-Loss Harvesting: How It Works and When to Use It

Written by Brian Uribe, CPA | Sep 16, 2026

A declining investment isn’t always bad news. Under the right circumstances, it can create a legitimate tax-planning opportunity. Selling a losing position to reduce your tax bill, also known as tax-loss harvesting, is a strategy used by investors across income levels.

That said, using it incorrectly can result in disallowed losses, unexpected future tax bills, and missed opportunities. This guide walks you through how tax-loss harvesting works, what the IRS rules require, how the wash-sale rule operates, when the strategy makes sense, and when it doesn’t.

What Is Tax-Loss Harvesting?

Tax-loss harvesting is the practice of selling a security that has declined in value to realize a capital loss. You can then use that loss to offset capital gains you’ve realized elsewhere in your portfolio, or, if losses exceed gains, to offset up to $3,000 of ordinary income per year.

You don’t have to exit the market entirely. You can reinvest the proceeds into a similar, but not identical, asset. This way you maintain your overall market position while still getting the tax benefits.

How Does Tax-Loss Harvesting Work?

The Knowing how tax-loss harvesting works is critical for helping your money work in your favor. It’s a fairly simple process:

1. Identify a losing position: a security currently trading below your purchase price (cost basis)

2. Sell to realize the loss: the loss becomes “realized” only when you sell

3. Offset gains (or income): apply the realized loss against capital gains or ordinary income.

4. Reinvest in a comparable asset: retain market exposure without repurchasing the same security.

For example, if you sell Stock A at a $5,000 loss. And, earlier that year, you realized $8,000 in capital gains from another sale. The $5,000 loss reduces your taxable gains to $3,000. At a 20% long-term capital gain tax rate plus a possible 3.8% net investment income tax (NIIT), that saves you approximately $1,190 in taxes. This is money that stays invested rather than going to the IRS.

The reinvestment step matters. Without it, an investor captures the tax benefit but sacrifices the market exposure they may need to reach their long-term goals.

Short-Term vs. Long-Term Capital Gains and Losses

Not all gains are taxed the same way. This distinction can greatly affect the value of a harvested loss.

    • Short-term capital gains apply to assets held for one year or less. These are taxed at ordinary income rates, which range from 10% to 37% in 2026.

    • Long-term capital gains apply to assets held for more than one year. These qualify for preferential rates of 0%, 15%, or 20%, depending on income.

It is important to note that both your short-term and long-term gains and losses might also be subject to an additional 3.8% NIIT if your modified AGI exceeds $200,000 for single filers or $250,000 for those married filing jointly.

2026 Long-Term Capital Gains Tax Rates by Taxable Income

Source: IRS (2026 tax year projections based on inflation adjustments). Confirm current figures at IRS.gov.

How losses are applied matters. The IRS requires short-term losses to offset short-term gains first, and long-term losses to offset long-term gains first. Only after you fully offset same-type gains can the remaining loss offset the other type.

Offsetting short-term gains typically produces more tax savings because short-term gains are taxed at higher ordinary income rates. A $5,000 short-term loss saving at a 32% rate is worth significantly more than a $5,000 long-term loss saving at 15%. For more on building a tax-efficient portfolio, see our tax-efficient investing guide.

What Is the Wash-Sale Rule?

The wash-sale rule is the IRS provision most likely to catch investors off guard. It disallows a tax loss if the investor purchases the same or a “substantially identical” security within 30 days before or after the sale, creating a 61-day window.

When the rule is triggered, the disallowed loss isn’t gone permanently. Instead, it’s added to the cost basis of the repurchased security. The tax benefit is deferred, not eliminated. However, many investors inadvertently trigger the rule and never recover the benefit.

How to Avoid the Wash-Sale Rule

The safest way to avoid the wash-sale rule is to wait the full 61 days before repurchasing. Or you can reinvest in a similar but not substantially identical security. For example, sell one S&P 500 ETF and purchase a different ETF for a comparable broad-market index. The IRS has not explicitly defined “substantially identical,” so it's best to consult a tax professional.

Key Edge Cases to Know

IRAs and Roth IRAs: This is one of the most consequential traps. If you sell a security at a loss in a taxable account and repurchase it in an IRA or Roth IRA within the 61-day window, the wash-sale rule applies. The loss is permanently disallowed, not just deferred. The IRS does not allow cost basis adjustment inside a tax-advantaged account.

    • Spouse accounts: Purchases a spouse makes in their own account also count toward a wash sale. The rule includes the entire household, not just an individual’s accounts.

    • Dividend reinvestment plans (DRIPs) and automatic contributions: Scheduled contributions or automatic dividend reinvestments can unintentionally trigger the rule if they fall within the 61-day window. Consider pausing or reviewing your automatic purchases before implementing a tax-loss

    • Multiple accounts: The wash-sale rule applies across all accounts you control. This includes taxable brokerage, IRAs, 401(k)s, and joint accounts. A sale in one account and a repurchase of a substantially identical asset in another account can still trigger the rule.

Rules of Tax-Loss Harvesting

Knowing the process is only half the picture. Several specific IRS rules govern how you can use harvested losses.

Quick-Reference Rules Summary

Carryforward losses in practice: If an investor realizes $20,000 in losses in a year with only $10,000 in gains and no other income to offset, they use $10,000 to wipe out the gains, apply $3,000 against ordinary income, and carryover the remaining $7,000 to future tax years, where it can offset future gains dollar for dollar.

Settlement dates: A trade executed on December 31 may not settle until January. This means the loss wouldn’t count for the current tax year. Investors harvesting at year-end should factor in standard settlement timelines. The standard settlement is typically the trade date plus one day.

State taxes: Not all states mirror federal capital gains treatment. California, for example, taxes all capital gains as ordinary income regardless of holding period. LTax can help you identify the state-level implications relevant to your situation.

Benefits of Tax-Loss Harvesting

When applied correctly, tax-loss harvesting can grant valuable benefits for investors, including:

    • Immediate tax savings. The most direct benefit is lowering taxable gains or income in the current year lowers this year’s tax bill.

    • Portfolio compounding. Reinvesting tax savings, and not touching them, lets them compound over time. A $1,100 tax saving invested at a 7% annual return grows to approximately $2,165 over 10 years. Repeated annually, the compounding effect becomes substantial.

    • Rebalancing with a purpose. Harvesting losses in underperforming holdings can align naturally with planned portfolio rebalancing, reducing overweighted positions while generating tax value.

    • Turning instability into opportunity. Market corrections create tax-loss harvesting windows. Short-term paper losses that would otherwise take time to recover can generate long-term tax value if realized strategically.

    • A note on lower cost basis: When you harvest a loss and reinvest in a replacement asset, that new asset carries a lower cost basis. This can mean a larger taxable gain when you eventually sell it.

When Does Tax-Loss Harvesting Make Sense?
5 Scenarios

 

1. You’re a high earner with significant realized gains

If you sold appreciated stock, a rental property, or a business interest earlier in the year, you’re going to get a substantial capital gains bill. Harvested losses, especially short-term losses, can substantially lower that liability. The higher your tax bracket, the more you’ll see in tax savings.

2. An unstable market creates short-term losses

A market pullback creates short-term paper losses in positions that may recover over time. Realizing those losses while reinvesting in comparable securities captures the tax benefit without sacrificing long-term market exposure.

3. You want to take advantage of a portfolio rebalancing opportunity

If your portfolio has shifted from its target allocation, reassess certain positions. Harvesting losses in underperforming assets funds the rebalance at minimal tax cost. Combine two objectives into a single, tax-efficient transaction.

4. You anticipate equity compensation income

If you’re expecting RSU vesting or stock option exercises, know that a taxable income event is coming. Proactively harvesting losses before that event offsets a portion of the anticipated income, reducing the overall tax impact.

5. Your losses exceed gains, offering carryforward potential

If you have no significant gains this year, you may still benefit from harvesting. Losses carry forward indefinitely, making them available to offset a large, planned asset sale in a future year. For example, the sale of a concentrated equity position or appreciated real estate.

When Tax-Loss Harvesting May Not Be Worth It

The strategy doesn’t make sense in every situation and applying it indiscriminately can add difficulty without adding value.

    • Lower tax brackets. Investors in the 0% long-term capital gains bracket gain little to nothing from harvesting long-term losses. The math rarely justifies the effort or trading costs.

    • No significant capital gains. Without gains to offset, the annual $3,000 income deduction may not be worth the administrative burden, particularly for investors with smaller portfolios.

    • Embedded lower cost basis risk. As noted above, harvesting reduces the replacement asset’s cost basis. For investors who expect to sell that asset in a high-income year, the deferred tax liability could exceed the current savings. This trade-off deserves quantification before acting.

    • Transaction costs. For smaller portfolios, bid-ask spreads and trading fees can meaningfully erode the tax benefit. At a certain scale, the numbers simply don’t work.

The right approach is to model your specific situation, not to harvest by default because it sounds like a smart move.

Is Tax-Loss Harvesting Worth It?

Before adopting a tax-loss harvesting strategy, work through this checklist:

    • Have you realized capital gains this year?

    • Are you in a tax bracket where capital gains are taxed above 0%?

    • Do you have unrealized losses large enough to matter?

    • Can you reinvest in a comparable, non-substantially identical security?

    • Have you reviewed your 61-day wash-sale window, including automatic investments and other accounts?

    • Have you accounted for the replacement asset’s lower cost basis?

    • Have you considered state-level capital gains treatment?

If you answered yes to the first four questions, tax-loss harvesting likely deserves a closer look. If you answered no to any of the last three, weigh additional risks before proceeding.

Keep in mind, harvesting decisions don’t exist in isolation. They depend on your estate planning goals, anticipated future income events, retirement account strategy, and your broader tax picture. What makes sense in year one of a strategy may look different in year five.

Find Out if Tax-Loss Harvesting Fits Your Tax Plan

Tax-loss harvesting is a widely used strategy for reducing your tax liability. Still, it works best when you understand the rules and your tax situation. Your tax bracket, realized gains, state of residence, and future income expectations all affect whether tax-loss harvesting offers real value or simply defers a problem.

At LTax, we help clients build proactive tax strategies, including year-end loss harvesting, as part of a more comprehensive tax plan. Contact an LTax specialist to talk through your specific situation.

Frequently Asked Questions

How much can you tax-loss harvest in a year?

There is no limit on how much you can harvest in a year. Realized losses can offset an unlimited amount of capital gains. However, losses that exceed gains can only offset up to $3,000 of ordinary income annually ($1,500 if married filing separately). Any remaining losses carry forward to future tax years.

What are the rules for tax-loss harvesting?

The tax-loss harvesting rules allow you to apply investment losses to offset capital gains. You must realize losses by December 31 of the tax year. The wash-sale rule disallows losses if you repurchase the same or a substantially identical security within 61 days of the sale. Losses offset same-type gains first before crossing over. The annual income offset cap is $3,000, and (5) unused losses carry forward indefinitely.

What is the wash-sale rule?

The wash-sale rule is an IRS provision that disallows a tax loss if the investor buys the same or a substantially identical security within 30 days before or after the sale, a 61-day window in total. If you trigger it in a taxable account and repurchase in an IRA, the loss is permanently disallowed.

Is it better to sell a stock at a loss for tax purposes?

It depends on your situation. Selling at a loss makes sense when you have capital gains to offset, are in a tax bracket where capital gains are taxed above 0% and can reinvest in a comparable security without triggering the wash-sale rule. Without gains to offset or with a very low tax rate, the benefit may not outweigh the complexity.

Is tax-loss harvesting worth it for average investors?

Tax-loss harvesting can be beneficial. It is particularly useful for investors with realized gains, moderate-to-high tax brackets, and mixed portfolios with comparable replacement securities. For investors in lower tax brackets, with no realized gains, or with a very small portfolio, the effort and transaction costs may outweigh the benefit.

 

LEGAL OR TAX: The information herein is not legal, such as trust or estate planning, advice, or tax advice. Any such information is provided for illustrative purposes only and must not be relied upon without the benefit of the advice of your lawyer and/or tax professional. Lido specifically disclaims any liability from any reliance on such information. Lido is not a legal service provider or tax professional and does not offer legal or tax advice. Should you desire to obtain tax or legal services or advice, you must enter into your own, ​independent engagement agreement with a licensed attorney or tax professional.