Disclosure: We scrutinize our research, ratings and reviews using strict editorial integrity. In full transparency, this site may receive compensation from partners listed through affiliate partnerships, though this does not affect our ratings. Learn more about how we make money by visiting our advertiser disclosure.

Tax-loss harvesting can be a great strategy for investors who know how it works. Not only can you cut taxes on any capital gains, but you can also reduce the tax on other types of income, such as wages or self-employment income.

But tax-loss harvesting also comes with a few potential traps. And in some cases, it might not be the best tax strategy if you’re buying and selling stocks, bonds, exchange traded funds (ETFs), mutual funds, or similar investments. So, you need to think before you act—and know the tax-loss harvesting rules.

If you’re not already familiar with the tax harvesting rules, I’ll lay them out for you and show how they can reduce your overall tax bill. I’ll also point out a few situations where tax-loss harvesting might not be the way to go. With a basic understanding of the rules, you should be able to determine if tax-loss harvesting is a strategy that can generate tax savings for you.

Related: 10 Year-End Tax Planning Tips to Lower Your 2023 Tax Bill

Taxation of Capital Gains and Losses


capital gains tax torn page basics

You can’t understand tax-loss harvesting unless you know how the capital gains tax works, and specifically how capital losses can offset capital gains. So, let’s quickly explore the capital gains tax before focusing on the tax-loss harvesting strategy.

The capital gains tax is imposed on any gain (i.e., profit) from the sale of a capital asset. The tax is typically paid when you file your federal income tax return for the year the asset is sold.

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

The distinction between long-term capital gains and losses and short-term capital gains and losses is very important for capital gains tax purposes. For example, the rules for offsetting capital gains with capital losses depend on whether you have long-term or short-term gains and losses. In addition, long-term capital gains are taxed at different rates.

Generally, if you hold an asset for more than one year, any gains or losses from the sale of the asset are considered long-term gains or losses. Short-term capital gains and losses result from the sale of assets held for one year or less.

Offsetting Capital Gains With Capital Losses

Capital losses can be used to offset (i.e., reduce) taxable capital gains through a process known as “netting.” However, you must offset capital gains with capital losses in the following order:

  1. First, you must offset short-term gains with short-term losses.
  2. Second, long-term capital gains are offset with long-term capital losses.
  3. Last, if there are any net losses of either variety, they can then be used to offset gains remaining of the opposite type (if there are any).

Example

Harper realized the following gains and losses during the year:

  • $600 short-term capital gain
  • $1,000 long-term capital gain
  • $700 short-term capital loss
  • $450 long-term capital loss

Harper first offsets the $600 short-term gain with the $700 short-term loss, resulting in a $100 net short-term loss.

She then offsets the $1,000 long-term gain with the $450 long-term loss, resulting in a $550 net long-term gain.

Finally, she offsets the $550 net long-term gain with the $100 net short-term loss, resulting in a $450 net long-term taxable capital gain.

Deducting Net Capital Losses From Ordinary Income

If you have a net capital loss after netting capital gains and losses, you can deduct up to $3,000 of it from your “ordinary” taxable income, such as wages, interest, IRA or 401(k) account distributions, and the like (up to $1,500 for a married person filing a separate return). Anything over the $3,000 (or $1,500) limit is carried forward and applied against gains or deducted from ordinary income in future years until it’s all used.

Capital Gains Tax Rates

If, after going through the netting process, you end up with a net gain, the capital gains tax rate that applies depends on whether the gain is a long-term or short-term capital gain.

Long-term capital gains tax rates

Long-term capital gains are taxed at either a 0%, 15%, or 20% rate, depending on your taxable income. For the 2023 tax year, the long-term capital gains tax rates (based on taxable income) are as follows:

Filing Status0% Tax Rate15% Tax Rate20% Tax Rate
SingleUp to $44,625$44,626 to $492,300$492,301 or more
Married Filing SeparatelyUp to $44,625$44,626 to $276,900$276,901 or more
Head of HouseholdUp to $59,750$59,751 to $523,050$523,051 or more
Married Filing Jointly; Surviving SpouseUp to $89,250$89,251 to $553,850$553,850 or more

Short-term capital gains tax rates

If you have a net short-term capital gain, the tax rate is the same rate that applies to your “ordinary” income. These tax rates range from 10% to 37%, depending on which federal income tax bracket applies to you. Like each tax bracket above for long-term capital gains taxes, the federal tax brackets for ordinary income taxes are based on your filing status and taxable income.

Related: How to Get Free Stocks From Investing and Trading Apps

What Is Tax-Loss Harvesting?


capital gains and losses tax return

As you read through the capital gains tax rules above, perhaps you thought to yourself: “If I have more capital losses, then I can cut my overall tax bill down to the bone.”

That’s essentially the idea behind tax-loss harvesting.

Here’s how it works: Assume your investment portfolio includes both stock that has increased in value and stock that has lost value. Also assume that you have sold or will sell some of the stock that has increased in value during the year, resulting in a capital gain. If you sell some of the stock that has decreased in value before the end of the year, that will generate a capital loss that can be used to offset the gains from the sale of the profitable investments. That, in turn, will lower your capital gains tax.

Plus, if you still have losses left over after offsetting gains, you can deduct up to $3,000 of the remaining losses from your “ordinary” income in the current year.

If you have more than $3,000 of net losses, the excess is carried over to future years. As a result, you can even use tax-loss harvesting to reduce the federal income taxes you expect to owe next year or even further down the road.

Example

Five years ago, Becky purchased 1,000 shares of ABC, Inc. stock for $12,000 and 1,500 shares of XYZ, Inc. stock for $17,000.

The ABC stock increased in value, so Beck sold all that stock for $16,000 this year, resulting in a $4,000 long-term capital gain ($16,000 – $12,000). On the other hand, the XYZ stock has lost value over the past five years, so Becky also sold all that stock for $8,000, which generated a $9,000 long-term capital loss ($17,000 – $8,000).

Becky didn’t sell any other stock this year, and also earned $50,000 in wages for the year.

By generating the $9,000 long-term capital loss, Becky completely offset her $4,000 long-term capital gain. This still leaves Becky with $5,000 of capital loss ($9,000 – $4,000). She can use $3,000 of this amount as a deduction against this year’s taxable wages. The remaining $2,000 is carried over and can be used to offset gains or as a deduction against ordinary income in future years.

YATI Tip: Robo-advisors can make tax-loss harvesting easier by keeping track of your investments and pointing out tax-saving opportunities on a periodic basis (even daily). So, while tax-loss harvesting has traditionally been an end-of-year strategy, robo-advisors can rebalance your portfolio for tax efficiency throughout the year.

Related: Best Stock Trading Apps and Platforms

Wash Sale Rule


capital gains tax calculator clipboard

Why not sell depreciated stock to generate a capital loss one day, then buy the stock again the next day? That way, you can offset your capital gains, but still own stock that has potential for future growth.

Not so fast! The wash sale rule prevents you from “manufacturing” losses to offset capital gains and then immediately repurchasing the stock you sold.

Basically, under the wash sale rule, you can’t offset capital gains or claim a deduction against ordinary income with losses from the sale of stock or securities if you buy or otherwise acquire the same or “substantially identical” stock or securities within 30 days before or after the sale. The rule also applies if you sell stock and your spouse buys substantially identical stock within the prohibited time period.

What’s considered a “substantially identical” stock or security isn’t always clear, though. Whether two stocks or securities are substantially identical depends on the unique facts and circumstances of each transaction. For example, stocks or securities of two different corporations generally aren’t considered substantially identical. Likewise, bonds or preferred stock of a corporation generally aren’t considered substantially identical to the same corporation’s common stock. In addition, individual stock in a corporation generally isn’t treated as substantially identical to mutual funds or ETFs that invest in the same industry or sector.

If you violate the wash sale rule, there are some other rules that help counterbalance the loss of offsets and deductions. First, the disallowed loss will be added to the basis of your newly acquired stock, which will reduce any capital gain when the stock is sold. Second, the holding period for the stock you sold transfers to the newly acquired stock. As a result, you might be able to sell the new stock in less than one year but still have any investment gains taxed at a long-term capital gains tax rate.

YATI Tip: The wash sale rules don’t apply to cryptocurrency, since it isn’t considered stock or a security. So, you can sell cryptocurrency one day for a loss and buy it back instantly without incurring any penalty.

Related: Best Income-Generating Assets

Net Investment Income Tax


net investment income tax

Depending on your income, you might have to pay the net investment income tax on any investment gains. This 3.8% surtax is in addition to capital gains taxes, and it applies to your “net investment income” if your modified adjusted gross income exceeds a certain amount.

Among other things, your net investment income generally includes interest, dividend income, capital gains, rental and royalty income, and non-qualified annuities. It doesn’t include wages, unemployment compensation, Social Security benefits, alimony, and most self-employment income.

The income thresholds, which are based on your filing status, are as follows.

Filing StatusModified AGI Threshold
Single; Head of Household$200,000
Married Filing Separately$125,000
Married Filing Jointly; Surviving Spouse$250,000

For purposes of the net investment income tax, modified adjusted gross income means the adjusted gross income reported on your federal income tax return, plus any excluded foreign earned income.

Related: What’s Your Standard Deduction?

Tax-Loss Harvesting Might Not Be a Great Idea If…


capital losses 1

Tax-loss harvesting isn’t always the best option for everyone. Depending on how long you’ve held stock, market volatility, trading fees, and other factors, you might be better off holding on to depreciated stock for the time being.

So, is tax-loss harvesting worth it? Here are a few situations where the answer might be “no.”

The Stock Market Is Up and Down

In a volatile market, the value of stock you sell today could soar a short time later. If that’s the case, the tax savings you realize through offsets or deductions from ordinary income could be far less than the money you could have made by holding on to the stock.

If you plan to repurchase the same stock you sold after waiting 30 days, you could still lose out on significant savings in that short period of time when the market is volatile.

In addition, if you end up in a position where you have to sell repurchased stock less than a year after buying it, taxes on the short-term gain might outweigh any savings from offsets or deductions (remember, short-term gains are taxed at higher rates than long-term gains).

Of course, the stock you sell could also go down in value and make you look like a financial genius for dumping it before that happens. But who knows? The point is that tax-loss harvesting is riskier in a volatile market and can easily backfire.

Repurchased Stock Soars in Value

If you repurchase stock after selling it for a loss because you expect the stock’s value to rise significantly in the near future, that rise in a stock’s value can also impact a future tax bill in such a way that you still end up with an overall capital gains tax liability in the long run. That’s because the repurchased stock has a lower basis than the stock you sold, which means you’ll realize more gain when the repurchased stock is eventually sold. In that case, tax-loss harvesting might not be worthwhile.

For example, suppose you bought 100 shares of stock three years ago for $15,000 (the original stock’s basis). You sell the stock this year for $13,000 and realize a $2,000 long-term capital loss that’s used to offset $2,000 of long-term capital gain. After waiting 30 days to satisfy the wash sale rule, you rebuy the same stock for $13,000 (the repurchased stock’s basis). If you’re in the 15% long-term capital gains tax bracket, you save $300 by offsetting $2,000 of gain ($2,000 x .15).

Two years later, you sell the repurchased stock for $17,000 and realize a $4,000 gain ($17,000 – $13,000). There are no losses that year to offset the gain. Since you’re still in the 15% bracket, your tax bill on the gain is $600 ($4,000 x .15). When the previous tax savings is subtracted from this amount, you still end up with an overall tax bill of $300 ($600 – $300).

If you initially held the stock and then sold it two years later for $17,000, you would have a long-term gain of $2,000 ($17,000 – $15,000). The long-term capital gains tax on that amount would equal $300 ($2,000 x .15). So, in this case, you end up with the same overall tax liability whether or not you harvest losses, which somewhat nullifies the reason for engaging in tax-loss harvesting.

Your Tax Rate Is Expected to Increase In the Future

As the example above demonstrates, tax-loss harvesting doesn’t necessarily eliminate your tax burden. Instead, it can simply postpone it.

If you expect the tax rate you’ll have to pay when the tax bill finally comes due is going to be higher than it is right now, then perhaps tax-loss harvesting isn’t a good idea. This could happen with either your long-term capital gains tax rate or short-term capital gains tax rate if your taxable income rises enough.

Your Stock Hasn’t Lost Enough Value

According to a recent study evaluating the balance between the risks and rewards of tax-loss harvesting, investors harvesting losses on a monthly basis shouldn’t sell most stocks that make up less than 0.5% of their portfolio unless the stock’s value is down at least 10%. If you’re harvesting on a daily basis, the stock should drop at least 15% before selling. The study also found that it’s generally not worthwhile to harvest losses on stock that isn’t down at least 5%.

You Don’t Have Gains to Offset

The whole point behind tax-loss harvesting is to offset taxable capital gains. However, if you don’t have any gains—or very little capital gain—then harvesting losses really isn’t necessary. Sure, you can claim a deduction of up to $3,000 from ordinary income, but if you have a net capital loss greater than $3,000, then you’re just pushing the benefits of tax-loss harvesting down the road, which is a less effective tax strategy.

Your Income Is Low

If your income qualifies you for the 0% long-term capital gains tax rate, then there’s no need to harvest losses to offset any long-term capital gain you may have. That gain won’t be taxed anyway, so why bother selling depreciated stock solely to reduce the tax on that gain.

Trading Costs Are High

If the costs of executing the necessary trades (including repurchasing stock or securities after the 30-day waiting period) are greater than the tax savings, then tax-loss harvesting is not worth it.

Since trading costs are generally low, this will probably only be a concern where the potential tax savings are minor. However, in that case, perhaps tax-loss harvesting isn’t worth the risk anyway.

You’re Only Invested in Tax-Advantaged Accounts

Since there’s no immediate tax on gains in IRAs, 401(k) plans, 529 plans, and similar tax-advantaged accounts that offer tax-deferred or tax-free gains, tax-loss harvesting won’t help you if you’re only invested in these types of accounts.

Tax-loss harvesting is a strategy that’s only useful for investors with taxable accounts.

Related:

Rocky has been covering federal and state tax developments for over 25 years. During that time, he has provided tax information and guidance to millions of tax professionals and ordinary Americans. As Senior Tax Editor for Young and the Invested from Jan. 2023 to Feb. 2024, Rocky spent most of his time writing and editing online tax content.

Before working for Young and the Invested, Rocky was a Senior Tax Editor for Kiplinger, where he wrote and edited tax content for Kiplinger.com, Kiplinger’s Retirement Report and The Kiplinger Tax Letter. Prior to his time at Kiplinger, Rocky was a Senior Writer/Analyst for Wolters Kluwer Tax & Accounting. In that role, he managed a portfolio of print and digital state income tax research products, led the development of various new print and online products, authored white papers and other special publications, coordinated with authors of a state tax treatise, and acted as media contact for the state income tax group (where he was quoted as an expert by USA Today, Forbes, U.S. News & World Report, Reuters, Accounting Today, and other national media outlets). Before that, Rocky was an Executive Editor at Kleinrock Publishing, which provided tax research products for tax professionals. At Kleinrock, he directed the development, maintenance, and enhancement of all state tax and payroll law publications, including electronic research products, monthly newsletters, and handbooks.

Rocky has a law degree from the University of Connecticut and a B.A. in History from Salisbury University.