Missed Tax Day? File as soon as possible to limit penalties. Try our fast, hassle-free tax filing. It's just $50.

Missed Tax Day? Try our fast, hassle-free tax filing. It's just $50.

Learn more

Tax-Loss Harvesting: What It Is, How It Works

Tax-loss harvesting means selling investments at a loss and then deducting that loss from your taxable income.
Profile photo of Dayana Yochim
Written by Dayana Yochim
Profile photo of Lei Han
Reviewed by Lei Han
Professor of accounting
Profile photo of Rick VanderKnyff
Edited by Rick VanderKnyff
Senior Assigning Editor
Fact Checked
Profile photo of Tina Orem
Co-written by Tina Orem
Assistant Assigning Editor

Many, or all, of the products featured on this page are from our advertising partners who compensate us when you take certain actions on our website or click to take an action on their website. However, this does not influence our evaluations. Our opinions are our own. Here is a list of our partners and here's how we make money.

Nerdy takeaways
  • Tax-loss harvesting involves selling an investment at a loss in order to offset the taxes resulting from a capital gain.

  • Typically, the asset sold at a loss is replaced with a similar investment after a certain timeframe.

  • When capital losses are greater than capital gains, investors can deduct up to $3,000 ($1,500 if married filing separately) from their taxable income.

  • If net losses for a certain year exceed $3,000, the balance can be carried over and deducted on future returns.

What is tax-loss harvesting?

Tax-loss harvesting is a tax strategy that involves selling nonprofitable investments at a loss in order to offset or reduce capital gains taxes incurred through the sale of investments for a profit. In other words, investments that are in the red could be your ticket to a lower tax bill.

So if you have a few investments go south this year, those underachievers may come in handy when it’s time to reconcile with the IRS in 2025. Investors can replace the asset that was sold at a loss with a comparable asset, but they must make sure to follow certain rules to avoid having the loss disallowed.

NerdWallet rating 


NerdWallet rating 


NerdWallet rating 





per online equity trade



per trade



per trade

Account minimum 


Account minimum 


Account minimum 




no promotion available at this time


1 Free Stock

after linking your bank account (stock value range $5.00-$200)



no promotion available at this time

How tax-loss harvesting works

Tax-loss harvesting helps investors reduce taxes by offsetting the amount they have to claim as capital gains or income. Basically, you “harvest” investments to sell at a loss, then use that loss to lower or even eliminate the taxes you have to pay on gains you made during the year.

1. It applies only to investments held in taxable accounts

The idea behind tax-loss harvesting is to offset taxable investment gains. Because the IRS does not tax growth on investments in tax-sheltered accounts — such as 401(k)s, 403(b)s, IRAs and 529s — there’s no reason to try to minimize your gains. As long as all that money remains within the tax force field those accounts provide, your investments can generate buckets of cash without the IRS coming around asking for its share.

2. It’s not as financially fruitful if you’re in a low tax bracket

Since the idea behind tax-loss harvesting is to lower your tax bill today, it's most beneficial for people who are currently in the higher tax brackets. In other words, the higher your income tax bracket, the bigger your savings.

If you’re currently in a lower tax bracket and expect to be in a higher tax bracket in the future (via well-deserved promotions at work, or if you think Uncle Sam will raise tax rates), you might want to save the tax harvesting until later when you’ll reap more savings from the strategy.

» MORE: Here's a breakdown of the federal tax brackets

3. If you're going for it, you have only until Dec. 31

Procrastinators take note: Some investing work — such as opening and funding an IRA — can be done up until the tax-filing deadline. However, there is no such grace period for tax-loss harvesting.

You need to complete all of your harvesting before the end of the calendar year, Dec. 31. So set that egg timer and get to work.

4. Tax-loss harvesting is most useful if you’re investing in individual stocks, actively managed funds and/or exchange-traded funds

Index fund investors typically find it difficult to employ tax-loss harvesting in their portfolios. However, if you’re indexing using exchange-traded funds or mutual funds that focus on a particular niche (a sector, geographic area or market cap, for example), it’s a different story.

That’s where investing via a robo-advisor comes in handy. Robo-advisors do much more than simply build and manage well-rounded portfolios for customers. Most of them also serve as tax police keeping a 24/7 watch for opportunities to minimize taxes and offset gains.

5. You must keep your apples and oranges straight

The taxes you pay on gains are based on the length of time you’ve owned the investment. According to IRS holding-period rules:

  • Long-term capital gains tax rates are applied when you sell an investment that you’ve held for longer than a year. The IRS rewards you for your patience by taxing you 0%, 15%, or 20% on your gains (or less if you fall into the lower tax brackets).

  • Short-term capital gains tax rates kick in when investors sell something that they’ve held for a year or less. Short-term capital gains are taxed as ordinary income, much like your wages.

Besides the difference in how big of a tax hit you’ll take, there’s an important reason to pay attention to the distinction: The IRS checks your homework when you file Schedule D to report your capital gains and losses.

6. Don’t sell your losers just to get the tax break

Don't become overzealous as you scour your portfolio for investments to harvest for tax losses. The purpose of investing in stocks is to achieve long-term growth that beats the returns produced by other assets (like bonds, CDs, money market funds and savings accounts). In exchange for outperformance, you have to put up with exposure to short-term volatility.

Unless there’s something fundamentally wrong with the investment that has caused it to lose value, you’re better off holding on and letting time and the magic of compound interest smooth out your returns.

7. Put the cash from the sale to good use

There are immediate benefits of tax-loss harvesting, such as lowering your tax bill for the year. However, more important are the medium- to long-term payoffs that you can get if you invest the money you freed up in something better.

If you do decide to sell, deploy the proceeds thoughtfully. Use them to rebalance your portfolio if your asset allocation has gotten out of whack. Invest in a company that you have on your watch list; buy into an ETF or mutual fund that gives you exposure to a sector or asset class that you currently lack; or add to an existing position you believe still has great potential.

» MORE: Wondering how to keep your tax burden in check? More strategies for reducing capital gains.

Capital loss deduction

That said, if you had a particularly brutal year and racked up more total losses than gains, don’t fret: Investors who don’t have investment gains to minimize can still use the losses to offset the taxes they pay on their ordinary income, too.

If an investor's total capital losses exceed their total capital gains for the tax year, they may be able to write off up to $3,000 ($1,500 if married, filing separately) of those losses from their ordinary income. If the losses exceed $3,000, the remaining amount can be carried over and deducted on tax returns in future years until you’ve used up the entire amount.

Internal Revenue Service. Topic No. 409, Capital Gains and Losses. Accessed May 12, 2023.

Stock losses are reported using Form 8949 and Schedule D (Form 1040).

NerdWalletTaxes Logo

Simple tax filing with a $50 flat fee for every scenario

With NerdWallet Taxes powered by Column Tax, registered NerdWallet members pay one fee, regardless of your tax situation. Plus, you'll get free support from tax experts. Sign up for access today.

for a NerdWallet account

Cartoon illustration of a person sitting at a desk with a laptop, calculator, and paperwork, surrounded by tax-related icons and graphics.

Tax-loss harvesting rules

You won’t find any specific reference to “tax-loss harvesting” in the 45,000 words the IRS devotes to investment income and expenses in Publication 550. But that doesn’t mean there aren’t rules governing the strategy.

Wash sale rules

Be mindful of violating the wash sale rule. Your loss is disallowed if, within 30 days of selling the investment (either before or after) you or even your spouse invest in something that is identical (the same stock or fund) or, in the IRS’ words, “substantially similar” to the one you sold.

Internal Revenue Service. Publication 550 (2022), Investment Income and Expenses. Accessed May 12, 2023.

» MORE: Need to diversify to avoid wash sale rules? See some of the best ETFs in terms of performance.

Cost basis calculations

Unless you purchased your entire position in a stock, mutual fund or ETF at a single time, the price that you paid for the investment varied. Good records of every purchase are required in order to come up with the proper cost basis to report to the IRS.

Frequently asked questions

In order to be a good candidate for tax-loss harvesting, an investment needs to have negative returns.

Another thing to keep in mind is the opportunity cost of tax-loss harvesting due to the wash-sale rule.

Given that investors are not allowed to harvest losses from an investment that you repurchased within 30 days of selling, they should consider whether or not they'd be okay with missing out on the next 30 days of potential returns after selling.

Yes — in fact, cryptocurrency is exempt from wash sale rules

, which means you can sell it at a loss to claim a deduction and then immediately repurchase it.

Note that this exemption applies only to cryptocurrency itself, not to crypto stocks or crypto ETFs.

NerdWallet rating 
Learn More

on Robinhood's website

Get more smart money moves – straight to your inbox
Sign up and we’ll send you Nerdy articles about the money topics that matter most to you along with other ways to help you get more from your money.