Disclosure: PortfolioPilot is a technology product of Global Predictions Inc, a Registered Investment Advisor. You must subscribe to receive personalized investment advice.
Taxes

Tax-loss Harvesting: How a Few Trades Now Could Save You Thousands of Dollars

By
Alexander Harmsen
Alexander Harmsen is the Co-founder and CEO of PortfolioPilot. With a track record of building AI-driven products that have scaled globally, he brings deep expertise in finance, technology, and strategy to create content that is both data-driven and actionable.
Reviewed by
PortfolioPilot Compliance Team
The PortfolioPilot Compliance Team reviews all content for factual accuracy and adherence to SEC marketing rules, ensuring every piece meets the highest standards of transparency and compliance.
Tax-loss Harvesting: How a Few Trades Now Could Save You Thousands of Dollars

The investing information provided on this page is for educational purposes only. Global Predictions does not offer tax advisory services. Any potential tax savings will depend on individualized circumstances. Quantification of potential savings based on 3rd party research linked within article. Specific investments described herein do not represent all investment decisions made by Global Predictions. The reader should not assume that investment decisions identified and discussed were or will be profitable. Specific investment advice references provided herein are for illustrative purposes only and are not necessarily representative of investments that will be made in the future.

TL;DR‍
Tax-loss harvesting is one of the easiest ways to lower or eliminate your tax bill, potentially saving you thousands of dollars. If this is already something you are ready to take advantage of, we just launched the first-of-its-kind tax-loss harvesting feature within PortfolioPilot. Log in or create a free account to save money on your tax bill. Remember, you only have till December 30 to take advantage of it until the next calendar year’s taxes.

One of the biggest mistakes self-directed investors make is not taking advantage of tax-loss harvesting, which involves offsetting gains with holdings that have incurred losses. For many investors they’re leaving money on the table if they don’t know how to optimize their tax bill.

In fact, most investors can often save thousands of dollars by just making a few trades (some studies have shown over $3K on average per year for investors holding at least $200K.)

Somehow tax-loss harvesting has gained the reputation of being too complex and too tedious to be worth doing on your own. Therefore you might think it should be left up to professionals or robo-advisors to handle on your behalf.

It’s simply not the case. We’d like to show you how straightforward and powerful this act can be for self-directed investors everywhere.

Is tax loss harvesting for you?

If you meet the following criteria, the answer is most likely yes!

  • You are invested in public markets, and
  • You have at least one security that has decreased in value since you bought it, in a taxed (i.e., non-retirement) account

We think the best starting point is a simple example – a portfolio of just two common assets – but with real-world numbers, so you can see the ease and impact yourself. If the numbers below seem large to you, don’t fret – tax loss harvesting can still be quite useful in saving you money and will be an instrumental tool to know about as you continue investing over the years. If these numbers look small to you, you’ll likely be saving even more because both your account balances and (likely) marginal tax rates will be higher than in the example.

Also, because every state has different capital gains rates – and some are zero – we are only considering Federal capital gains in the example below, but harvesting can usually save money on state taxes too!

A simple two-stock example (for US investors)

Let’s say that you bought 250 shares of $SPY at the start of 2022 and 250 shares of $TSLA after January earnings. The S&P 500 ETF (SPY) costs you about $120K at the prevailing market price, while the Tesla stock costs you about $70K. When rumors of an Elon Twitter deal cropped up, and with Tesla stock at a high, you sold 80% of those shares at $380 in early April – quite a bit better than the entry price of $275!

You might not realize it, but if you are in the middle tax bracket (which means 24% tax on all short-term capital gains), you now owe the government five thousand dollars ($5K) for your TSLA stock sale. What is even more disappointing is that your initial portfolio of nearly $190K (in total) is now only worth $185K (counting the cash proceeds from the sale) due to the S&P 500 drawdown year-to-date and the underperformance of your remaining Tesla stock post partial liquidation. If only these realized gains and paper losses could offset each other, right?

Well, investors who are savvy to so-called “tax-loss harvesting” practices can take the above situation and save nearly all the $5K owed right away without materially changing their investment strategy. In this case, it works simply by selling the entire SPY position and replacing it with a substantively similar, but not indistinguishable, ETF like VTI (which tracks the CRSP US Total Market Index rather than the S&P 500). By doing this, you will have booked a capital loss of roughly the same magnitude as your gain, and you will owe $200 only instead of $5K (based on current market prices). Two trades for ~$5K saved with very little risk – not bad!

Further your understanding of tax-loss harvesting below with more detail about capital gains in the US and Canada, whether or not you should harvest, and how to harvest.

Tax-loss Harvesting In-depth

In the real world, you probably hold more than only two stocks, and you probably accumulate shares at different times. That complexity can make the calculations a little more challenging, but it also unlocks a lot more possibilities to save on your tax bill. Below we will walk through how it all works and how you can try to get the most benefit with the least effort.

How capital gains are assessed for US investors

In the US, capital gains are segmented into two tax categories – short-term and long-term, based on whether a security has been held for shorter or longer than one year, respectively. Short-term capital gains are taxed as if they were ordinary income (i.e., you pay the same percentage on money earned from a short-term investment as you would from earning the same incremental earnings at your job). This rate can be up to 37% for high-income individuals. Long-term capital gains are either 0%, 15%, or 20% (plus an additional Net Investment Income Tax for the highest of earnings), based on a simple mapping of filing status and household income which you can find here. As such, the government generally provides an incentive to invest for the long haul.

For any security sold with a gain, however, you can offset the amount of tax owed with a loss. If, for instance, you have a capital gain of $15K and a capital loss of $10K within a tax category, these offset, and you only have a $5K taxable gain. What if you have more losses than gains? Here’s the amazing part: net losses can be deducted from ordinary income up to $3K (for individual or married-filing-jointly) and carried forward indefinitely. This is covered in more detail below.

How capital gains are assessed for Canadian investors

All capital gains in Canada are assessed at the same rate, which is 50% of your ordinary income tax rate. Similar to in the US, tax losses can be netted against gains and can be carried forward if unused in a current year (or even used retroactively against gains in the previous three years).

Can you harvest?

In order to figure out if there is an opportunity to harvest, take stock of your current realized gains and losses based on your trading activity over the course of the year in any taxed accounts. For each category (either short-term & long-term for US investors or just general capital gains for Canadian investors), calculate your net capital gain or net capital loss (for sophisticated investors with tax loss carryovers from prior years, include these too). The net capital gain or net capital loss on any security is simply the selling price minus the purchase price (the purchase price is also known as the cost basis)[1] times the quantity of shares, and your overall net capital gain or net capital loss will be the sum of these for all securities.

In the US, because there are short-term and long-term categorizations, you will have two net capital gains or losses. If one is positive and the other is negative, you can use the negative value to offset the positive value. For example, if you have a net long-term capital loss of $15K and a net short-term capital gain of ‌$10K, you can use ‌$10K of the long-term loss to offset the short-term gain (but not more because there is no more gain to offset). The same netting can be done if there is a net short-term loss but a net long-term gain. At the end of the day, you will either have a short-term and long-term gain or loss in the same direction or a gain or loss in one category with the other category at zero.

Scenario 1 – you are left with gains
If you have accumulated capital gains in either one or two categories, you’ve also accumulated some taxes that will need to be paid. You could multiply the gain amounts from above by your marginal tax rate in each category to understand how much tax you’d owe now if you didn’t make any additional securities sales. In principle, you really don’t want to pay short-term capital gains, and you’d like to defer paying long-term capital gains for as long as possible. Time to harvest! See the harvesting section below.
Scenario 2 – you are left with losses
If you have accumulated capital losses in either one or two categories, you’ve accumulated some tax offsets that you can either use or carry forward. In the US, you can deduct up to $3K of these (for individual or married-filing-jointly filers or $1.5K per person for married-filing-separately) from your ordinary income. If in the middle tax bracket, that means up to $720 of savings or more for higher earners. Anything above $3K can be carried forward indefinitely as a future offset in upcoming years. That means that if you lock in $15K in losses in 2022 and carry that forward, you could deduct $3K every year for the next 5 years even if you don’t ever lose money in markets again.

If there are adjustments you’d like to make to your portfolio that would incur capital gains, you can feel free to sell those assets to the degree that you are able to cover these capital losses without having to pay the government. This simply reduces the amount you have available towards the $3K deduction and carry forward, but often uses the offset for a good cause.

How to harvest

If you are in scenario 1, or even scenario 2 above but under the $3K deduction threshold, it may make sense to harvest – that is, realize some losses now to offset either capital gains or a limited amount of ordinary income.

As illustrated in the SPY and TSLA examples, this can be relatively simple. All you need to do is sell stock at a loss to reduce the amount of tax owed and if desired, buy substantively similar, but not indistinguishable, security. Look around your portfolio for anything trading below the purchase price: those are the candidates. From there, you will want to ask several questions:

  1. Do you want this exposure in your portfolio? If you are thinking about selling it or reducing its size anyway, you can sell it now to reap the benefit of tax loss harvesting and also move your portfolio closer to your desired allocation at the same time.
  2. Is this security replaceable? Assuming you do want the exposure, is there something else you could replace it with that would be equally good? This is a bit more art than science. Still, for most passive investments like Index ETFs and index mutual funds, there are many securities with the same basic underlying exposure that are interchangeable (just beware of the “wash sale rule” as described below). Even for unique securities like a single-name equity or an actively managed fund, what if you replaced it with stocks from the same sector or a sector ETF in the former case or a passively managed fund with the same underlying exposure in the latter case?
  3. Would you be better off selling now and just waiting 30 days to buy back the security? You can avoid the “wash sale rule” by waiting 30 calendar days before buying back the same security. In many cases, it is a reasonable probabilistic bet to think that the money saved against taxes will be more important than owning a security for a month; however, this is ultimately up to your discretion.
  4. (For US investors) – does selling this security get you the type of loss that you need? Let’s say that you have $50K of long-term gains and $5K of short-term gains, and your primary strategy this year is just to do enough not to pay the $5K of short-term capital gains tax. In this case, if you sell a long-term loss, it will first net against the $50K long-term loss, thus not meeting your objective.
Wash Sales

A final note about tax loss harvesting is the “wash sale rule”, which prevents you from buying a “substantially identical” security 30 days before or after realizing a loss that you use as a tax offset. (Note that you can’t get around this by buying the “substantially identical” security in another account controlled by you or your spouse).

The IRS is a little vague about what does and does not constitute a wash sale, but selling and buying back the same security is definitely a violation. Past that, it probably makes sense to avoid, for example, selling a company’s stock only to buy a different share class of the same company or even selling an ETF and buying a different ETF that passively tracks the same index. Here is a good graphic on thinking about good and bad substitute securities. It is worth checking yearly to see if IRS guidance has changed materially.

Tax-Loss Harvesting FAQs

What’s the last day to harvest losses for this tax year using PortfolioPilot’s feature?
The article notes investors “only have till December 30” to harvest losses for the current calendar year’s taxes.
How much tax could a mid-bracket U.S. investor owe after selling TSLA at a short-term gain in the example?
In the example, a 24% short-term bracket produces about $5,000 of tax due from the Tesla sale.
How did replacing SPY with VTI affect the example investor’s tax bill?
Selling SPY to realize a loss and buying a similar, not identical, ETF (VTI) reduced the estimated tax from $5,000 to about $200.
What portfolio value change set up the loss in the SPY/TSLA scenario?
The portfolio dropped from nearly $190,000 to about $185,000 after the SPY drawdown and remaining TSLA underperformance, creating an unrealized loss to offset gains.
What federal categories determine U.S. capital gains tax rates, and how are they taxed?
U.S. gains are short-term (taxed as ordinary income, up to 37%) and long-term (0%, 15%, or 20% plus possible NIIT), based on holding period and income.
How do U.S. investors use losses across categories within a tax year?
Losses first offset gains within the same category; any remainder offsets the other category. If losses exceed gains, up to $3,000 reduces ordinary income, with the rest carried forward indefinitely.
What inclusion rate applies to Canadian capital gains in the article?
In Canada, 50% of capital gains are taxed at the investor’s ordinary income rate.
How far back can Canadian investors apply unused losses?
Canadian capital losses can be carried forward or applied retroactively against gains in the prior three years.
Which account types are excluded from harvesting benefits in the article’s framework?
Retirement accounts such as 401(k)s and IRAs: gains aren’t currently taxed, and losses there cannot offset taxable-account gains.
What conditions make an investor a likely candidate for tax-loss harvesting here?
Being invested in public markets with at least one security below cost in a taxable (non-retirement) account.

How optimized is your portfolio?

PortfolioPilot is used by over 30,000 individuals in the US & Canada to analyze their portfolios of over $30 billion1. Discover your portfolio score now:

Sign up for free
1: As of February 20, 2025