top of page

How Tax Loss Harvesting Works: A Guide for Physicians

There’s a saying in investing that you don’t lose money until you sell. This advice is meant to protect you from making investment decisions based on market volatility, or from an emotional standpoint. This is because over time, your investment will likely return to and beat its previous price, so you don’t want to cut its growth potential early and finalize, or ‘lock in,’ that momentary loss. Tax loss harvesting, however, is an exception to this rule as it takes advantage of how capital gains taxes are calculated on your tax return, and by doing so, use losses to your advantage to offset gains from other investments that do well, thereby reducing your taxable income. This is an interesting tax strategy tool that all high income earners should be aware of. Below, we’ll cover what tax loss harvesting is, in which situations it is appropriate, how to do it, and what to be aware of so that you don’t run into trouble.


Disclaimer: As always, you should consult appropriate expertise before taking action based on this content, which is not individualized to your personal situation and can not be guaranteed to be accurate or up to date. While we have attempted to explain this to the best of our ability, we are not accountants and this is complex information that can be misinterpreted or unclear. To learn more, visit our disclaimers and disclosures.


How tax loss harvesting works


Article Navigation



What is tax-loss harvesting and why do it?


Tax-loss harvesting is the strategy of intentionally selling securities you own at a loss to offset taxable capital gain earnings (profits) from another investment or investments. By tax-loss harvesting, you can lower your taxable income, and thus your tax bill. It’s important to note that the gains do not have to be from the same year; you can use your losses to offset gains in the future as well, which opens up significant opportunities for tax strategy if executed correctly.


To ensure you don’t fully realize those losses in reality, the other half of tax-loss harvesting is you need to reinvest the capital from the sale of the first investment into a different but similar other investment. This is what allows you to avoid the cardinal mistake in investing of buying high and selling low. Different is the key here. Below, we cover what we mean by this.


As a reminder, when selling a security, you don’t pay taxes on the entire amount you sell. You pay taxes on how much that investment has grown since you purchased it. These are called capital gains taxes, and can be as high as 23.8% in 2024 for long term capital gains on assets you’ve held for more than a year (see below). However, if you sell the investment at a loss but buy another similar but ‘not substantially identical’ asset, you don’t pay taxes, you haven’t realistically realized a gain, and you can actually use those losses to your advantage through tax-loss harvesting.


As an additional perk, using the losses from your sale, you can also offset up to $3,000 of ordinary income annually, such as from your W2 job as a physician. For many physicians, that could reduce your tax bill by over $1,000 for your marginal tax bracket.  Note that the amount of your losses that can be applied to offsetting your ordinary income is AFTER the loss is applied to your short and long term capital gains for the year. However, for most physicians, that in and of itself isn’t going to be enough tax savings to make the hassle worth it - it’s the offset of the gains that you declare with another investment or plan on declaring in the future that makes it make sense.


TLDR: The real value in tax loss harvesting for most physicians is in the applied or suspended losses against your capital gains, not the annual $3,000 of ordinary income you can offset. For example, if you sold an investment at a capital gain of $10,000, and you tax loss harvested $15,000 of capital losses, you can offset $10,000 in capital gains, as well as 3,000 of ordinary income, effectively paying no taxes on those gains and offsetting a small percentage of your ordinary income. Plus, the remainder of the losses will be carried over into future years. If you do this routinely throughout the course of your investing career, at the very least you will defer paying taxes on gains within your taxable accounts until you sell the assets for good, and in the best case scenario, you’ll pass the income on to your heirs, they’ll inherit them with a step up in basis, locking in your tax savings for good.



Is tax loss harvesting a good strategy for me?


While capital gain tax rates are based on your income, they are often lower than the federal income tax brackets. The highest federal income tax bracket in 2024 is 37%, whereas the highest long term capital gains tax in 2024 is 20% (note that for short term capital gains, where you’ve held the investment less than a year, ordinary federal income tax brackets apply). Note that for especially high earners, you may also be subject to a 3.8% net investment income tax, which can then bring the maximum tax rate for long-term capital gains to 23.8%.


Learn more about how tax brackets work.


For lower income physician families such as medical students, residents, or fellows, there’s a good chance you don’t need to worry about capital gains taxes. For a married couple filing jointly, if your taxable income is $94,050 or less, you pay 0% in capital gains taxes in 2024, and it doesn’t make sense to tax loss harvest. 


Note that this exemption amount is significantly lower if filing single or married filing separately ( $47,025 in 2024), so many single residents and fellows will still have to worry about a long term capital gains tax between 15-20%. 


As you transition into practice and get an attending job, you will likely find yourself in a higher tax bracket for capital gains purposes, and feel more inclined to learn about and capitalize on the advantages of tax loss harvesting.


Another thing to note: Since your assets within your retirement accounts such as your HSA, 401(k), and IRAs are tax-advantaged, this isn’t a strategy for them since you don’t owe taxes on the capital gains held within these accounts.


Tax loss harvesting is a strategy to help lower the taxes you pay on your holdings inside your taxable brokerage accounts. These are the accounts you likely contribute to once you’ve capped out your tax-advantaged retirement account options, or are using to save up for long-term savings goals, such as purchasing a rental property.


Lastly, note that when you tax-loss harvest, you are going to lower the tax basis on your investment in the new asset that you buy since you bought it a lower price than the original asset. This means that if you end up selling that security at the same price you would’ve sold your original security that was swapped out, you will have to pay more in capital gains at that time. 


Critics will say that this negates the value of tax loss harvesting, which can be true to a certain degree. Therefore, when you’re considering whether you want to tax-loss harvest, consider when it is that you plan on selling the security for good. If you’re going to sell it in 5-10 years so that you can buy that dream vacation home, you may not come out ahead. 


BUT if you’re going to hold it for many decades, such that you take advantage of deferring the taxes and the fact that inflation means the same amount of money paid in taxes now is worth less in 40 years, it becomes very valuable. Not to mention that if you never sell those shares and instead pass them on to your heirs, they will inherit the security with a step up in basis, thus completely locking in your tax savings. This is where we see the real value for high income physicians.



When should you consider tax loss harvesting?


Here are some examples of instances where you may consider harvesting some losses:


  • Stocks have taken a large hit over the course of a few months in a market downturn and you currently have a loss

  • You want to rebalance your portfolio as it has tracked significantly away from your three-fund portfolio target percentages for asset allocation

  • You are just learning about investing and want to alter what you’re invested in, such as reducing the amount of single stocks you have and diversifying into index funds


Ideally, the investments that you have bought and are harvesting are investments you’d want to hold for the long run regardless, because when you do the tax loss harvesting, in order to not ‘realize’ the losses practically speaking, you are going to buy something that demonstrates high correlation with the asset that you sell, although ‘not substantially identical.’


Also note that there are usually transaction fees associated with buying and selling, so don’t get so excited about tax-loss harvesting that you do it for small amounts where your tax savings end up being less than or essentially the same as the transaction fees. 



What is the “wash sale rule,” why is it important, and what other conditions or rules should I be aware of when tax-loss harvesting?


You may be tempted to sell at a loss and immediately rebuy at the lower price to ride the gains back up as the security rebounds. Doing this, you would get all the benefits of capitalizing on the long-term gains of that security while taking the credit against your current tax bills.


If it sounds too good to be true, that’s because it is.


To prevent you from gaming the system, the IRS has what is called a “wash sale rule.” This rule states that you cannot purchase the same or “substantially identical” security within 30 days before the sale and 30 days after (so for a total of 60 days). If you do, the IRS typically excludes the loss from counting against your income when calculating your taxes owed, “washing” out the benefit and preventing you from tax loss harvesting. The exception to that is if you also sell the shares of the security that you bought within the last 30 days, but to avoid confusion, it’s probably better not to get into this nuance.


This also applies to the dividend date - keep in mind that selling the investment within 60 days (before and after) the dividend date will change that dividend to a non-qualified dividend. Because you pay a much lower tax percentage on qualified dividends, you could negate some of the tax benefit of tax-loss harvesting, or even pay more in taxes this way depending on how large the dividend was.


Also note that while you can’t tax loss harvest within a tax-advantaged retirement account, the IRS can check purchases within these accounts when assessing the wash sale rule, so many recommend against doing that.



How do I pick a good tax-loss harvesting swap partner that doesn’t violate the “wash sale rule”?


The key is how the IRS views “substantially identical.” What you want to do is pick a fund to buy that has very high correlation with the fund you are selling in every way possible, but with key differences. This means you want funds that invest in the same types of investments, have similar expense ratios, and have similar performance both over the last 5 years and by year to date. In other words, holding either one of them is essentially the same. However, you want them to be different enough that the IRS would not call them substantially identical. This could be because they follow different indices, because of the number of stocks that the fund invests in, or because they have different CUSIP numbers. If you’re not aware of what a CUSIP number is, this consists of nine characters with letters and numbers, and is used as a unique identification code representing a specific company or issuer and type of financial instrument. 


An example of what you can’t do is swap out the ETF and index fund version of the same security. 


In practice, it’s very rare that the IRS looks into these transactions in a lot of detail as long as the funds are different, but you still want to make sure you have a solid argument for why they are different.


Example: If you are selling an investment such as the Vanguard Total Stock Market Index Fund (VTSAX), you could consider swapping it with the Vanguard S&P 500 index fund. This is because you can make a legitimate argument that the Vanguard S&P 500 index fund is substantially different from VTSAX.  While both offer diversified exposure to the entire US equity market, VTSAX tracks the CRSP US Total Market Index and has 1000s of holdings, while the Vanguard S&P 500 index tracks the S&P, and offers exposure to 500 of the largest US companies. These two funds correlate their growth quite closely. Therefore, it’d be a reasonable trading partner to swap one for the other and therefore not lock in your losses but still have them on paper. 


Note that if you are stressed about finding a reasonable “swap partner,” you could just wait 30 days and re-buy the same security that you sold, but you are definitely taking a risk that the security you sold goes up in value in the interim, thus locking in those losses you took, which is exactly what you were trying to avoid, so most people who advocate for tax-loss harvesting advise against this.



How do I actually tax-loss harvest?


Okay, so if you’ve identified that it’s a good idea and time to do so, the next thing you need to know is how to do it properly. There are some key rules here to be aware of.


The steps required to tax-loss harvest

First, identify the security that you own that is currently demonstrating a substantial loss. 


You can tax loss harvest with any tradable security, such as:


  • Stocks

  • Bonds

  • ETFs

  • Index funds


When you login to your taxable account, look at the total gain or loss column, and see which security is demonstrating a loss. Generally speaking, if you bought this same security multiple times, you’re going to want to sell the shares within that security that have the biggest losses to harvest. You can actually sort your shares by when you bought them to make sure you’re selling the ones with the biggest losses within your brokerage account. 


You should then ensure that that security isn’t trading up that day as an additional check as that could erase some of the losses you’re about to claim.


Second, you need to choose the security you’re going to buy in its place.


Again, the goal is not to lock in your losses on this investment, so you’re going to buy a security that demonstrates high correlation with the security that you’re selling, but is not ‘substantially identical,’ or you’ll violate the wash sale rule discussed above, and all of your efforts at tax-loss harvesting will be for nothing.  


Importantly, you would want to purchase the tax-loss harvesting partner fund right after selling the first fund in case the market changes dramatically in between. Just ensure you find an adequate tax-loss harvesting swap partner for your fund prior to selling.


Third, you actually sell the security that you are claiming the losses on and buy the security that you chose in its place.


That’s it. It’s not that hard, as long as you keep in mind the wash sale and dividend rules!



Conclusion


Tax loss harvesting can be a useful and strategic opportunity for physicians looking to lower their tax bill and have suspended losses that can be applied to future capital gains. You need to be careful to know the applicable rules, but overall, it’s not that complicated and can lead to huge tax savings over the course of your investing career, which can potentially be locked in permanently if you pass the shares down to your heirs.



Resources


If you’re unsure of the best way to capitalize on tax loss harvesting, we suggest working with a financial advisor for physicians to help with your overall investment strategy. A robo-advisor can also be a useful tool, as many are meant to help tax loss harvest as part of their overall investing strategy.


Want to learn more about investing for physicians? Check out these other resources on our website:

bottom of page