Guide to Tax-Loss Harvesting

By MP Dunleavey · February 26, 2024 · 13 minute read

We’re here to help! First and foremost, SoFi Learn strives to be a beneficial resource to you as you navigate your financial journey. We develop content that covers a variety of financial topics. Sometimes, that content may include information about products, features, or services that SoFi does not provide. We aim to break down complicated concepts, loop you in on the latest trends, and keep you up-to-date on the stuff you can use to help get your money right.

Guide to Tax-Loss Harvesting

Tax-loss harvesting enables investors to use investment losses to help reduce the tax impact of investment gains, thus potentially lowering the amount of taxes owed. While a tax loss strategy – sometimes called tax loss selling — is often used to offset short-term capital gains (which are taxed at a higher federal tax rate), tax-loss harvesting can also be used to offset long-term capital gains.

Of course, as with anything having to do with investing and taxes, tax-loss harvesting is not simple. In order to carry out a tax-loss harvesting strategy, investors must adhere to specific IRS rules and restrictions. Here’s what you need to know.

What Is Tax-Loss Harvesting?

Tax-loss harvesting is a strategy that enables an investor to sell assets that have dropped in value as a way to offset the capital gains tax they may owe on the profits of other investments they’ve sold. For example, if an investor sells a security for a $25,000 gain, and sells another security at a $10,000 loss, the loss could be applied so that the investor would only see a capital gain of $15,000 ($25,000 – $10,000).

This can be a valuable tax strategy for investors because you owe capital gains taxes on any profits you make from selling investments, like stocks, bonds, properties, cars, or businesses. The tax only hits when you profit from the sale and realize a profit, not for simply owning an appreciated asset.

💡 Quick Tip: If you’re opening a brokerage account for the first time, consider starting with an amount of money you’re prepared to lose. Investing always includes the risk of loss, and until you’ve gained some experience, it’s probably wise to start small.

How Tax-Loss Harvesting Works

In order to understand how tax-loss harvesting works, you first have to understand the system of capital gains taxes.

Capital Gains and Tax-Loss Harvesting

As far as the IRS is concerned, capital gains are either short term or long term:

•   Short-term capital gains and losses are from the sale of an investment that an investor has held for one year or less.

•   Long-term capital gains and losses are those recognized on investments sold after one year.

Understanding Short-Term Capital Gains Rates

The one-year mark is crucial, because the IRS taxes short-term investments at the investor’s much-higher marginal or ordinary income tax rate. There are seven ordinary tax brackets: 10%, 12%, 22%, 24%, 32%, 35%, and 37%.

For high earners, gains can be taxed as much as 37%, plus a potential 3.8% net investment income tax (NIIT), also known as the Medicare tax. That means the taxes on those quick gains can be as high as 40.8% — and that’s before state and local taxes are factored in.

Understanding Long-Term Capital Gains Rates

Meanwhile, the long-term capital gains taxes for an individual are simpler and lower. These rates fall into three brackets, according to the IRS: 0%, 15%, and 20%. Here are the rates for tax year 2023, per the IRS.

The following table breaks down the long-term capital-gains tax rates for the 2023 tax year (for taxes that are filed in 2024) by income and filing status.

Capital Gains Tax Rate

Income – Single

Married, filing separately

Head of household

Married, filing jointly

0% Up to $44,625 Up to $44,625 Up to $59,750 Up to $89,250
15% $44,626 – $492,300 $44,626 – $276,900 $59,751 – $523,050 $89,251 – $553,850
20% More than $492,300 More than $276,900 More than $523,050 More than $553,850

Source: Internal Revenue Service

So if you’re an individual filer, you won’t pay capital gains if your total taxable income is $44,625 or less. But if your income is between $44,626 to $492,300, your investment gains would be subject to a 15% capital gains rate. The rate is 20% for single filers with incomes over $492,300.

As with all tax laws, don’t forget the fine print. As noted above, the additional 3.8% NIIT may apply to single individuals with a modified adjusted gross income (MAGI) of $200,000 or married couples with a MAGI of at least $250,000.

Also, long-term capital gains from sales of collectibles (e.g, coins, antiques, fine art) are taxed at a maximum of 28% rate. This is separate from regular capital gains tax, not in addition to it.

Short-term gains on collectibles are taxed at the ordinary income tax rate, as above.

Recommended: Everything You Need to Know About Taxes on Investment Income

Rules of Tax-Loss Harvesting

The upshot is that investors selling off profitable investments can face a stiff tax bill on those gains. That’s typically when investors (or their advisors) start to look at what else is in their portfolios. Inevitably, there are likely to be a handful of other assets such as stocks, bonds, real estate, or different types of investments that lost value for one reason or another.

While tax-loss harvesting is typically done at the end of the year, investors can use this strategy any time, as long as they follow the rule that long-term losses apply to long-term gains first, and short-term losses to short-term gains first.

Bear in mind that although a capital loss technically happens whenever an asset loses value, it’s considered an “unrealized loss” in that it doesn’t exist in the eyes of the IRS until an investor actually sells the asset and realizes the loss.

The loss at the time of the sale can be used to count against any capital gains made in a calendar year. Given the high taxes associated with short-term capital gains, it’s a strategy that has many investors selling out of losing positions at the end of the year.

Get up to $1,000 in stock when you fund a new Active Invest account.*

Access stock trading, options, auto investing, IRAs, and more. Get started in just a few minutes.

*Customer must fund their Active Invest account with at least $25 within 30 days of opening the account. Probability of customer receiving $1,000 is 0.028%. See full terms and conditions.

Tax-Loss Harvesting Example

If you’re wondering how tax-loss harvesting works, here’s an example. Let’s say an investor is in the top income tax bracket for capital gains. If they sell investments and realize a long-term capital gain, they would be subject to the top 20% tax rate; short-term capital gains would be taxed at their marginal income tax rate of 37%.

Now, let’s imagine they have the following long- and short-term gains and losses, from securities they sold and those they haven’t:

Securities sold:

•   Stock A, held for over a year: Sold, with a long-term gain of $175,000

•   Mutual Fund A, held for less than a year: Sold, with a short-term gain of $125,000

Securities not sold:

•   Mutual Fund B: an unrealized long-term gain of $200,000

•   Stock B: an unrealized long-term loss of $150,000

•   Mutual Fund C: an unrealized short-term loss of $80,000

The potential tax liability from selling Stock A and Mutual Fund A, without tax-loss harvesting, would look like this:

•   Tax without harvesting = ($175,000 x 20%) + ($125,000 x 37%) = $35,000 + $46,250 = $81,250

But if the investor harvested losses by selling Stock B and Mutual Fund C (remember: long-term losses apply to long-term gains and short term losses to short term gains first), the tax picture would change considerably:

•   Tax with harvesting = (($175,000 – $150,000) x 20%) + (($125,000 – $80,000) x 37%) = $5,000 + $16,650 = $21,650

Note how the tax-loss harvesting strategy not only reduces the investor’s tax bill, but potentially frees up some money to be reinvested in similar securities (restrictions may apply there; see information on the wash sale rule below).

💡 Quick Tip: It’s smart to invest in a range of assets so that you’re not overly reliant on any one company or market to do well. For example, by investing in different sectors you can add diversification to your portfolio, which may help mitigate some risk factors over time.

Considerations Before Using Tax-Loss Harvesting

As with any investment strategy, it makes sense to think through a decision to sell just for the sake of the tax benefit because there can be other ramifications in terms of your long-term financial plan.

The Wash Sale Rule

For example, if an investor sells losing stocks or other securities they still believe in, or that still play an important role in their overall financial plan, then they may find themselves in a bind. That’s because a tax regulation called the wash sale rule prohibits investors from receiving the benefit of the tax loss if they buy back the same investment too soon after selling it.

Under the IRS wash sale rule, investors must wait 30 days before buying a security or another asset that’s “substantially identical” to the one they just sold. If they do buy an investment that’s the same or substantially identical, then they can’t claim the tax loss.

For an investment that’s seen losses, that 30-day moratorium could mean missing out on growth — and the risk of buying it again later for a higher price.

Matching Losses With Gains

A point that bears repeating: Investors must also be careful which securities they sell. Under IRS rules, like goes with like. So, long-term losses must be applied to long-term gains first, and the same goes for short-term losses and short-term gains. After that, any remaining net loss can be applied to either type of gain.

How to Use Net Losses

The difference between capital gains and capital losses is called a net capital gain. If losses exceed gains, that’s a net capital loss.

•   If an investor has an overall net capital loss for the year, they can deduct up to $3,000 against other kinds of income — including their salary and interest income.

•   Any excess net capital loss can be carried over to subsequent years and deducted against capital gains, and up to $3,000 of other kinds of income — depending on the circumstances.

•   For those who are married filing separately, the annual net capital loss deduction limit is only $1,500.

How to Use Tax-Loss Harvesting to Lower Your Tax Bill

When an investor has a diversified portfolio, every year will likely bring investments that thrive and others that lose money, so there can be a number of different ways to use tax-loss harvesting to lower your tax bill. The most common way, addressed above, is to apply capital losses to capital gains, thereby reducing the amount of tax owed. Here are some other strategies:

Tax-Loss Harvesting When the Market Is Down

For investors looking to invest when the market is down, capital losses can be easy to find. In those cases, some investors can use tax-loss harvesting to diminish the pain of losing money. But over long periods of time, the stock markets have generally gone up. Thus, the opportunity cost of selling out of depressed investments can turn out to be greater than the tax benefit.

It also bears remembering that many trades come with trading fees and other administrative costs, all of which should be factored in before selling stocks to improve one’s tax position at the end of the year.

Tax-Loss Harvesting for Liquidity

There are years when investors need access to capital. It may be for the purchase of a dream home, to invest in a business, or because of unforeseen circumstances. When an investor wants to cash out of the markets, the benefits of tax-loss harvesting can really shine.

In this instance, an investor could face bigger capital-gains taxes, so it makes sense to be strategic about which investments — winners and losers — to sell by year’s end, and minimize any tax burden.

Tax-Loss Harvesting to Rebalance a Portfolio

The potential benefits of maintaining a diversified portfolio are widely known. And to keep that portfolio properly diversified in line with their goals and risk tolerance, investors may want to rebalance their portfolio on a regular basis.

That’s partly because different investments have different returns and losses over time. As a result, an investor could end up with more tech stocks and fewer energy stocks, for example, or more government bonds than small-cap stocks than they intended.

Other possible reasons for rebalancing are if an investor’s goals change, or if they’re drawing closer to one of their long-term goals and want to take on less risk.

That’s why investors check their investments on a regular basis and do a tune-up, selling some stocks and buying others to stay in line with the original plan. This tune-up, or rebalancing, is an opportunity to do some tax-loss harvesting.

How Much Can You Write Off on Your Taxes?

If capital losses exceed capital gains, under IRS rules investors can then deduct a portion of the net losses from their ordinary income to reduce their personal tax liability. Investors can deduct the lesser of $3,000 ($1,500 if married filing separately), or the total net loss shown on line 21 of Schedule D (Form 1040).

In addition, any capital losses over $3,000 can be carried forward to future tax years, where investors can use capital losses to reduce future capital gains. This is known as a tax loss carryforward. So in effect, you can carry forward tax losses indefinitely.

To figure out how to record a tax loss carryforward, you can use the Capital Loss Carryover Worksheet found on the IRS’ Instructions for Schedule D (Form 1040).

Benefits and Drawbacks of Tax-Loss Harvesting

While tax-loss harvesting can offer investors some advantages, it comes with some potential downsides as well.

Benefits of Tax-Loss Harvesting

Obviously the main point of tax-loss harvesting is to reduce the amount of capital gains tax on profits after you sell a security.

Another potential benefit is being able to literally cut some of your losses, when you sell underperforming securities.

Tax-loss harvesting, when done with an eye toward an investor’s portfolio as a whole, can help with balancing or rebalancing (or perhaps resetting) their asset allocation.

As noted above, investors often sell off assets when they need cash. Using a tax-loss harvesting strategy can help do so in a tax-efficient way.

Drawbacks of Tax-Loss Harvesting

While selling underperforming assets may make sense, it’s important to vet these choices as you don’t want to miss out on the gains that might come if the asset bounces back.

Another of the potential risks of tax-loss harvesting is that if it’s done carelessly it can leave a portfolio imbalanced. It might be wise to replace the securities sold with similar ones, in order to maintain the risk-return profile. (Just don’t run afoul of the wash-sale rule.)

Last, it’s possible to incur excessive trading fees that can make a tax-loss harvesting strategy less efficient.

Pros of Tax-Loss Harvesting Cons of Tax-Loss Harvesting
Can lower capital gains taxes Investor might lose out if the security rebounds
Can help with rebalancing a portfolio If done incorrectly, can leave a portfolio imbalanced
Can make a liquidity event more tax efficient Selling assets can add to transaction fees

Creating a Tax-Loss Harvesting Strategy

Interested investors may want to create their own tax-loss harvesting strategy, given the appeal of a lower tax bill. An effective tax-loss harvesting strategy requires a great deal of skill and planning.

It’s important to take into account current capital gains rates, both short and long term. Investors would be wise to also weigh their current asset allocation before they attempt to harvest losses that could leave their portfolios imbalanced.

All in all, any strategy should reflect your long-term goals and aims. While saving money on taxes is important, it’s not the only rationale to rely on for any investment strategy.

The Takeaway

Tax loss harvesting, or selling off underperforming stocks and then potentially getting a tax reduction for the loss, can be a helpful part of a tax-efficient investing strategy.

There are many reasons an investor might want to do tax-loss harvesting, including when the market is down, when they need liquidity, or when they are rebalancing their portfolio. It’s an individual decision, with many considerations for each investor — including what their ultimate financial goals might be.

Ready to invest in your goals? It’s easy to get started when you open an investment account with SoFi Invest. You can invest in stocks, exchange-traded funds (ETFs), mutual funds, alternative funds, and more. SoFi doesn’t charge commissions, but other fees apply (full fee disclosure here).

Invest with as little as $5 with a SoFi Active Investing account.


Is tax-loss harvesting really worth it?

When done carefully, with an eye toward tax efficiency as well as other longer-term goals, tax-loss harvesting can help investors save money that they can invest for the long term.

Does tax-loss harvesting reduce taxable income?

Yes. The point of tax-loss harvesting is to reduce income from investment gains (profits). But also when net losses exceed gains, the strategy can reduce your taxable income by $3,000 per year.

Can you write off 100% of investment losses?

It depends. Investment losses can be used to offset a commensurate amount in gains, thereby lowering your potential capital gains tax bill. If there are still net losses that cannot be applied to gains, up to $3,000 per year can be applied to reduce your ordinary income. Net loss amounts in excess of $3,000 would have to be carried forward to future tax years.

SoFi Invest®


SoFi Invest encompasses two distinct companies, with various products and services offered to investors as described below: Individual customer accounts may be subject to the terms applicable to one or more of these platforms.
1) Automated Investing and advisory services are provided by SoFi Wealth LLC, an SEC-registered investment adviser (“SoFi Wealth“). Brokerage services are provided to SoFi Wealth LLC by SoFi Securities LLC.
2) Active Investing and brokerage services are provided by SoFi Securities LLC, Member FINRA ( Clearing and custody of all securities are provided by APEX Clearing Corporation.
For additional disclosures related to the SoFi Invest platforms described above please visit
Neither the Investment Advisor Representatives of SoFi Wealth, nor the Registered Representatives of SoFi Securities are compensated for the sale of any product or service sold through any SoFi Invest platform.

Investment Risk: Diversification can help reduce some investment risk. It cannot guarantee profit, or fully protect in a down market.

Financial Tips & Strategies: The tips provided on this website are of a general nature and do not take into account your specific objectives, financial situation, and needs. You should always consider their appropriateness given your own circumstances.

Tax Information: This article provides general background information only and is not intended to serve as legal or tax advice or as a substitute for legal counsel. You should consult your own attorney and/or tax advisor if you have a question requiring legal or tax advice.

Third-Party Brand Mentions: No brands, products, or companies mentioned are affiliated with SoFi, nor do they endorse or sponsor this article. Third-party trademarks referenced herein are property of their respective owners.


TLS 1.2 Encrypted
Equal Housing Lender