Advertiser Disclosure
Advertiser Disclosure: The credit card and banking offers that appear on this site are from credit card companies and banks from which receives compensation. This compensation may impact how and where products appear on this site, including, for example, the order in which they appear on category pages. does not include all banks, credit card companies or all available credit card offers, although best efforts are made to include a comprehensive list of offers regardless of compensation. Advertiser partners include American Express, Chase, U.S. Bank, and Barclaycard, among others.

What Is Tax-Loss Harvesting and How Does It Work?

Investing can be complicated even when you build a relatively simple portfolio of mutual funds and exchange-traded funds (ETFs). Deciding on the right asset allocation, choosing the best securities to invest in, monitoring your performance, and rebalancing your portfolio takes effort.

Tax-loss harvesting is an advanced investing strategy you can use to reduce your tax bill. Although it is complex, it may be worth considering for people in higher tax brackets.

What Is Tax-Loss Harvesting?

Tax-loss harvesting is an advanced tax and investing strategy that relies on selling investments for a loss in order to take advantage of the tax deduction available for capital losses.

Selling investments for a loss may seem counterintuitive. However, the idea is that you use the proceeds from that sale to buy other investments that will perform similarly. The goal is to lock in a capital loss without significantly impacting how your portfolio will perform going forward, gaining a tax benefit nownand allowing your investments to hopefully grow in the future.

How Tax-Loss Harvesting Works

At the most basic level, tax-loss harvesting involves selling a poorly-performing investment and reinvesting that money into another security. By doing this, you book a capital loss and can take it as a tax deduction while keeping your money in the market.

More advanced strategies aim to allow you to lock in losses while keeping your money invested similarly rather than moving money from losing investments into winning ones. However, simply selling and rebuying the same security isn’t enough due to the wash sale rule (more on this shortly).

Example of Tax-Loss Harvesting

Imagine you own 100 shares of XYZ, which you purchased for $50 each. Today, XYZ is trading for $40 per share.

You decide that you want to tax-loss harvest, so you sell the shares of XYZ, receiving $4,000 and booking a $1,000 capital loss. You then use the $4,000 to buy shares in another stock or fund.

The tax code allows you to use capital losses to offset capital gains, so if you have sold any investments for a profit this year, or go on to sell investments for a profit later in the year, you can subtract $1,000 from your gains before you pay a capital gains tax

If you don’t have capital gains to offset, you have other options. You can also, to a point, use capital losses to offset regular income. You are limited to using $3,000 in capital losses to offset regular income. 

Imagine you booked a $1,000 capital loss as in the above example, but have no capital gains to offset. If your taxable income that year is $40,000, you could deduct $1,000 from it to make your taxable income just $39,000.

The Wash Sale Rule

One of the most important rules surrounding tax-loss harvesting is the wash sale rule. This rule prohibits you from selling an investment to book a capital loss to reduce your tax bill and immediately repurchasing it. If a wash sale occurs, you cannot use any of the capital loss to reduce your taxes.

For example, if you sold XYZ shares at a loss and then bought the same shares back the next day, that would be a wash sale and you could not deduct the capital losses.

A wash sale occurs when you buy a “substantially identical” security within the 30 days before or after the sale that created the loss. 

Many securities are incredibly similar. It’s most common for mutual funds. Multiple funds from different companies can track the same stock index or industries. In short, if two ETFs or mutual funds would serve the same purpose in your portfolio, they’re probably substantially similar.

For example, VOO and SPY are two ETFs that track the S&P 500. They’d likely be considered substantially similar.

The wash sale rule is one of the factors that makes tax-loss harvesting difficult for individuals. You want to keep your money invested in the market as much as possible and also maintain a specific asset allocation. However, the wash-sale rule can bar you from certain investments for a period of time while you tax-loss harvest.

Cost Basis Calculations

In order to understand tax-loss harvesting and use the strategy effectively, you need to understand the concept of cost basis. The cost basis of an investment is simply the amount you paid to buy it. 

If you buy one share of XYZ for $50, the cost basis for that share is $50. If you buy 100 shares for $5,000, then the cost basis of those shares is $50 each.

When you sell an investment, you compare the sale price to the cost basis to determine your capital gain or loss. If you sell a share of XYZ for $60, your capital gain is $60 – $50 = $10. If you sell it for $30, the capital loss is $50 – $30 = $20

Where things get complicated is when you buy shares in a security multiple times at different prices. For example, you could own 100 shares of XYZ after building your portfolio through multiple purchases over time:

  • A purchase of 20 shares at $50 each
  • A purchase of 15 shares at $45 each
  • A purchase of 10 shares at $47.50 each
  • A purchase of 5 shares at $52 each
  • A purchase of 50 shares at $43 each

Typically, you can track your cost basis by tracking the basis for each individual share or by using the average price paid. Average price is a common option for tracking cost basis for mutual funds. Most brokerages track your cost basis as well.

To tax-loss harvest, you must sell shares for less than their original cost basis to generate investment losses. That makes tracking cost basis essential for tax-loss harvesting.

Pros & Cons of Tax-Loss Harvesting

Tax-loss harvesting can reduce your current tax bill, helping you pay less income tax. However, it’s a complicated strategy to implement and in many ways simply gives you tax savings today in exchange for higher taxes down the road.


Tax-loss harvesting offers a tax benefit you can use to offset tax from investment gains and regular income, which makes it appealing to some investors.

  1. Offset Capital Gains Taxes. Tax-loss harvesting lets you book capital losses, which can offset capital gains at a one-to-one rate. If you have significant investment income or capital gains, this can help you reduce taxes by a significant amount.
  2. Reduce Regular Income. You can also use your capital losses to reduce your taxable income from other sources by up to $3,000 per year. If you’re in a high tax bracket, this can be a big tax break.
  3. Unlimited Carry-Over. You can only use capital losses to offset capital gains and up to $3,000 of your regular income. However, if you book greater losses than you can use in the current year, you can carry those losses to future tax years. There’s no limit to how long you can carry forward losses from a tax-loss harvesting strategy, so you can reap the tax benefits for many years.


Tax-loss harvesting has its cons. Beyond the fact that it’s complicated and can be difficult to do without running afoul of IRS rules, it might not reduce your tax liability by as much as you expect.

  1. Tax-Loss Harvesting Is Complicated. Thanks to the wash sale rule, you can’t just sell and repurchase the same investments. You need to move your money to different investments and ensure you avoid making purchases of a similar investment within a 30-day period. It can be hard to follow these rules while maintaining your desired asset allocation.
  2. Only Useful for Taxable Accounts. Tax-loss harvesting is all about reducing your tax liability. If you do most of your investing in tax-advantaged accounts like IRAs, you won’t be able to use the strategy because retirement accounts aren’t subject to capital gains taxes.
  3. Lowers Your Cost Basis. What tax-loss harvesting really does is reduce the cost basis of the securities in your portfolio. While your realized losses generate an immediate reduction in taxes, it means you might have much higher realized gains — and therefore taxes — if your investment later appreciates in value and you sell it.
  4. Frequent Sales Impact Long-Term vs. Short-Term Taxes. The long-term capital gains tax rate is much lower than the short-term capital gains tax rate. To qualify for the long-term rate, you must own a security for at least one year before selling it. If you’re frequently selling and buying investments to tax-loss harvest, you’ll likely wind up with more short-term than long-term gains.

Should You Use Tax-Loss Harvesting?

Tax-loss harvesting can be an appealing investment strategy for people who want to reduce their tax burden, but the reality is that the strategy is too complicated for most individuals to implement effectively on their own.

If you have significant investable assets — on the order of hundreds of thousands to $1 million or more — in your taxable accounts, it might be worth considering. You can always hire an investment management firm or robo-advisor to assist. 

However, most individual investors will likely be better off not worrying about tax-loss harvesting and instead constructing a long-term portfolio.

Tax-Loss Harvesting FAQs

Tax-loss harvesting is complicated. Although it’s mostly used by advanced investors to offset capital gains, it can be used in other ways that investors should know about.

Can You Use Tax-Loss Harvesting to Offset Ordinary Income?

Yes, if you have more capital losses in a year than you have capital gains, you can use excess capital losses to offset up to $3,000 of ordinary income each year.

How Much Can I Write Off With Tax-Loss Harvesting?

You can use tax-loss harvesting to offset an unlimited amount of capital gains. If you have more losses than gains, you can offset all your capital gains and up to $3,000 of ordinary income.

How Many Years Can You Carry Forward Tax Losses?

There is no limit to the number of years you can carry forward a tax loss.

Final Word

For most investors, tax-loss harvesting isn’t an essential strategy. Although it can be nice to offset current and future gains in your portfolio, implementing the strategy while maintaining your asset allocation and following IRS rules is more trouble than it’s worth unless you have significant investable assets.

If you’re looking for other ways to optimize your investment taxes, consider investing through tax-advantaged accounts such as a 401(k) or IRA.

TJ is a Boston-based writer who focuses on credit cards, credit, and bank accounts. When he's not writing about all things personal finance, he enjoys cooking, esports, soccer, hockey, and games of the video and board varieties.

16 Smart Ways to Spend Your Tax Refund Money Wisely

Every year, millions of Americans receive billions of dollars in tax refunds. Many blow it on dinners out, new clothes, and presents for themselves. But before you get carried away dreaming up inventive ways to spend your refund, do something to boost your future instead.

Read Now