9 Ways To Reduce Or Avoid Capital Gains Tax When You Sell Stocks

Are you looking to sell stocks that have gone up in value but are afraid of the capital gains tax hit?

There are ways to reduce your capital gains tax liability if you plan accordingly.

Some approaches even allow you to avoid capital gains tax altogether.

Each situation is different and the best approach is to work with your tax accountant or adviser on tax minimization strategies.

I am consistently exploring ways to limit my tax exposures around capital gains.

Based on my research, I’ve identified 9 ways for a reduction of capital gains tax upon a stock sale.  

Hopefully, this post can provide you with some background information for you to contemplate as you seek to lower or avoid capital gains tax when you sell appreciated stocks.

Get To Know The 3 Stock Market Indices

The public equity market in the United States has certainly had its ups and downs this year.

There are 3 major US stock indices: the Dow Jones Industrial Average, the S&P 500 Index, and the NASDAQ Composite Index.

The Dow Jones Industrial Average tracks 30 blue chip, large, public companies trading in the New York Stock Exchange or the NASDAQ.

The S&P 500 Index, as its name implies, tracks the 500 largest companies listed in the US exchanges.

The NASDAQ Composite Index is a list of over 2,500 stocks listed on the NASDAQ market.

These 3 indices are often cited by the news media and investment professionals as indications of how well US stocks are performing. 

I give more weight to the S&P 500 as an indicator of the overall health of the US stock market.

I think the Dow Jones Industrial Average, with only 30 stocks, has too narrow of a population. On the other hand, the NASDAQ Composite Index is too heavily weighted with technology stocks.

The year-to-date performances for the three major indices are on the chart below. 

The NASDAQ Composite is in red, the S&P 500 Index is in green, and the Dow Jones Industrial Average is in blue.

3 Major Indices YTD Return 2022
3 Major Indices YTD Return 2022

Year To Date Market Movement

As you can see from the chart above, the three major indices moved in tandem with each other since the beginning of the year. 

Immediately at the start of 2022, the stock market went down and stayed in negative territory over the course of the year.

All 3 gave back some of the gains experienced over the previous 2 years (March 2020 to December 2021).

A confluence of events happened in 2022 that led to a decrease in the stock market.

To combat the economic impact of COVID-19, the Federal government and the Federal Reserve both worked together in providing support to the economy in 2020 and 2021.

The United States government spent trillions on stimulus packages to help individuals and businesses impacted by the pandemic.

The Federal Reserve kept rates low to keep the cost of funds down for individuals and businesses. Additionally, the Federal Reserve purchased securities in the open market which provided liquidity.

They provided much needed relief for the economy and the stock market.

At the depth of the pandemic, all three indices lost more than 20% since the start of 2020, and both the S&P 500 and NASDAQ lost more than 30%.

During this time, I lost over 7-figure in my stock portfolio. Needless to say, this was a stressful time.

While government support was much needed at the time, the stimuli led to the high inflation rate we are experiencing now.

To fight inflation, the Federal Reserve aggressively raised rates which is resulting in a slowdown of the economy.

There is also geopolitical unrest with the war in Ukraine leading to high energy costs and the zero COVID policy in China leading to a slowdown in manufacturing.

Put all those economic headwinds together and you have the stock market in red territory.

Should I Sell My Stocks If There Is A Strong Rebound In The Stock Market?

Over the past month, the stock market rebounded by about 10%.

Paint me skeptical, but I believe the stock market will have another big drawdown in the next 6 months.

I am patiently sitting on the sideline accumulating cash waiting for a 20% decrease in the stock market.

When that happens, I plan to aggressively buy in.

Then, hopefully, after I am done accumulating after that 20% drop, all the negative news would have been priced in and the stock market can start its uninterrupted ascend again.

What happens if the stock market doesn’t perform in line with my forecast and continues to go up from here?

I am left wondering what I should then do with my stock portfolio if the market continues to rebound strongly without a pullback.

I started investing in stocks during my college years and have always been diligent in putting my money to work in the stock market.

That is why I was able to accumulate over $1 million in my retirement account in my 30s.

Since I started buying stocks 2 decades ago, I am sitting in some nice unrealized gains. 

Even with its ups and downs, the U.S. equity market has performed very well over the past 20 years.

I think with a strong rebound I have to explore selling some of my stocks for rebalancing purposes and diversification purposes.

If I Sell Stocks, What About My Large Tax Bill On The Gains?

I have stocks in both tax deferred accounts (such as my IRA) and taxable accounts such as a personal trading account with an online brokerage firm.

If I do end up selling my stocks in a taxable account, I will be hit with a substantial tax bill. 

The Federal government imposes a capital gains tax on the gains generated from the sales of stocks. 

The holding period of the stock determines if the gains are subject to a long term capital gains tax or a short term capital gains tax.

Capital Gains Tax

Short term capital gain treatment is applied to a stock held for one year or less. The gains are added to your ordinary income and taxed at your marginal income tax rate.

Long term capital gain treatment is applied to a stock held for longer than one year. The Federal government wants to incentivize people to hold stocks for longer than a year. 

The tax rates are lower on long term capital gains. 

Long Term Capital Gains Tax Rates 2023
Long Term Capital Gains Tax Rates 2023

Net Investment Income Tax

There is also the Net Investment Income Tax (“NIIT”) for high income earners at 3.8%. This is in addition to the long term capital gains tax.

NIIT is paid by a single or head-of-household tax filer with a modified adjusted gross income (“AGI”) over $200,000, a married couple filing a joint return with a modified AGI over $250,000, or a married person filing a separate return with a modified AGI over $125,000.

Therefore, the highest rate on long term capital gains + NIIT is 23.8%. 

NY State And Local Tax On Capital Gains

I live in New York City. There is also a tax on realized stock gains at the state and local levels.

When it is all said and done, I can expect to pay an all-in tax rate of around 35% on long term capital gains. 

I am always one who likes to drive down my expenses. Taxes are my single biggest expense.

I started researching ways to help reduce my tax bill if I do end up selling appreciated stocks with unrealized gains.

Based on my research, there are 9 ways to reduce, or in some cases, eliminate the capital gains tax on selling stocks.

#1 – Convert Short Term Capital Gains To Long Term Capital Gains

#2 – Make A Donation With Appreciated Stocks

#3 – Harvest Losses

#4 – Wait Until I Move Into A Lower Income Tax Bracket Before Selling

#5 – Move To A Tax Friendly State Before Selling

#6 – Use Carry-Over Losses From Prior Years To Offset Gains

#7 – Relieve The Highest Cost Basis

#8 – Consider Security Based Lending

#9 – Gift The Stock And Then Sell

More information is provided on each strategy below.

#1 – Convert Short Term Capital Gains To Long Term Capital Gains

Long term capital gains are taxed at a lower rate to the seller than short term capital gains. 

Therefore, it is wise to keep track of a stock’s holding period. 

I always buy stocks intending to hold them for over a year in my taxable account because of the large difference between long term capital gains tax and short term capital gains tax.

The tax rate I pay on short term capital gains is north of 50% since it is added to my ordinary income and taxed at the highest marginal rate. This includes taxes at the Federal level, as well as, state and local taxes.

For me, the difference between short term and long term is 15%. That can potentially be a large amount depending on the size of the gains.

The stocks I am thinking about selling have all been held for longer than a year. 

If you want to lower your tax on your gains, then you should decide if holding it to over a year is worth the market risk.

#2 – Make A Donation With Appreciated Stocks

If you plan to donate to a charitable organization, don’t make it with cash if you have stocks that have appreciated.

I made that mistake early on. I wrote donation checks out of my bank account instead of the smarter, tax-advantage way of making a stock donation.

You can take a tax deduction on the market value of the stocks donated. 

If you donate 100 shares with a market value of $10,000, you can deduct $10,000 from your taxable income.

This is very powerful for me. I have stocks that have gone up over 10 times in 20 years. 

Take Apple for instance. I acquired Apple at about $10 a share over a decade ago. The stock price has gone up to about $150 today.

If I decide to sell 100 shares of Apple, my proceeds at $150/share come out to $15,000. It would be great if I can pocket the entire $15,000. 

But Internal Revenue Service wants its cut.

Donating appreciated stocks as opposed to cash to a charitable organization creates a win-win situation for both me and the charitable organization. 

Benefits of Stock Donations vs Cash Donation
Benefits of Stock Donations vs Cash Donation

The charitable organization receives $15,000 in donations instead of $9,100. I win because I get to save $7,500 in taxes as opposed to $4,550.

Additionally, the real cost of this $15,000 donation to me is only $1,600 which is the difference between the $9,100 of net proceeds I would have pocketed upon a sale of the stock and the $7,500 tax savings I received from the stock donation.

It’s no secret wealthy people love to donate highly appreciated assets. They can advertise a donation of millions while the actual cost might be a fraction of that amount. 

You can set up a donor advised fund with a brokerage company to start your donation of appreciated stocks.

#3 – Harvest Losses

Another way to reduce your capital gains tax is to harvest losses. 

In addition to selling winners which have appreciated, you can sell winners with losers to lower the amount of the gains.

As a hypothetical example, I sell my Apple stock with a gain of $20,000. Now I owe capital gains tax on the $20,000. 

To reduce the amount of taxes owed, I sell my holding in Wells Fargo which is down $15,000 since when I purchased it. Now between the two transactions, I am up only $5,000. 

People tend to harvest losses close to year-end since they have a better picture of the capital gains incurred throughout the year. 

Harvesting losses not only reduce the tax bill but allows the holder to get out of undesirable stocks.

The loss harvesting needs to be done within the same calendar year as the transactions which gave rise to the gains.

Given the run up in the stock market over the years, I have limited stocks which have losses.

But I do have crypto losses that I can use to offset stock gains.

#4 – Wait Until I Move Into A Lower Income Tax Bracket Before Selling

Since there are different tiers to the capital gains tax, waiting to sell a stock until you are in a lower income tax bracket is another way of reducing the tax obligation on gains.

There is a tradeoff between the risk of holding onto a stock that can go down in value versus the benefit of a better tax rate.

This one probably works best if you know when your income might be lowered in the near future. 

It is hard for me to wait for when I am in a lower tax bracket since I don’t know today when that will happen, if ever. 

#5 – Move To A Tax Friendly State Before Selling

This tax strategy can help lower your capital gains tax on stock sales if you plan to move to a different state in the near future.

New York City has some of the highest taxes in the United States given both the state level tax along with the city level tax.

The New York tax rates can run north of 10% combined. 

Selling appreciated stocks while living in New York City results in an additional 10% of income taxes on the gains.

Instead of selling stocks while living in New York, I can wait until I move to a tax friendlier state – preferably one of the 9 states without an income tax.

I don’t expect to move out of New York City anytime soon, so this becomes a difficult strategy for me to implement.

#6 – Use Carry-Over Losses From Prior Years To Offset Gains

You can carry over capital losses from prior years to offset capital gains this year.

If you took a bath on a stock and ended up with a net capital loss for the year, there is a cap of $3,000 that you can deduct against your income in one year. 

Any loss amount remaining can be used in future years to offset capital gains.

This is also another way to reduce the capital gains tax. Understand how much of a carry-over loss you have remaining that can be applied to any capital gains this year.

But this only works when there is carry-over loss. 

I don’t have any carry-over losses given how well the stock market has performed over the past years.

#7 – Relieve The Highest Cost Basis

Another way to lower the capital gains tax is to wisely select the cost relief method to apply to the stocks sold.

Each purchase transaction is its separate tax lot. So if I made two separate purchases of Apple (say in  May 2010 at $9/share and June 2011 at $12/share), I can select to relieve the one in June with the higher cost basis to reduce my overall capital gains.

Brokerage firms are now required to report the cost of the stocks sold. Just understand that the cost relief method set by the brokerage firm is set to a default arrangement.

That default arrangement can be modified by you in order to give you the lowest capital gains tax.

If you are only selling some of the shares in a particular stock, see if you have purchased them at different times which resulted in different tax lots. 

If yes, then it is best to select the most advantageous tax lot to relieve.

#8 – Consider Security Based Lending

Selling stocks isn’t the only way to obtain liquidity for the shares you own.

If you don’t mind continued exposure to your stocks, then consider security based lending.

You can go to a private bank and apply for a line of credit using your stocks as collateral.

That way, you can have funds available at your disposal without having to sell your stocks.

The upside is that liquidity is available to you and you still have exposure to stocks you like without selling out of them.

Additionally, because you didn’t sell your appreciated stocks, there will be no capital gain tax payment required on them.

The downside is that, as a line of credit, you will need to pay interest when you borrow on the line.

Outside of having a line of credit with a bank, you can use your stocks as collateral in a margin account with a brokerage firm.

This is something I’ve taken advantage of before and am a big fan of in creating liquidity.

I keep a portion of my stock portfolio with Interactive Brokers because they have a very attractive margin borrowing rate.

If I ever need money, I can withdraw cash on margin.

The downside with using margin is that if the stock market moves against you, you might get liquidated.

I tend to be very conservative with my margin borrowing.  

I keep the margin borrowing at a very low percentage of my overall investments with Interactive Brokers. Hence, I never want to get over 30% borrowing.

That way, I have plenty of buffer in the event of a market downturn.

#9 – Gift The Stock And Then Sell

The IRS allows the gifting of up to $17,000 per person in 2023 without incurring any gift tax. Even if the gift exceeds $17,000, the excess amount is applied against the estate tax exemption.

If a stock is gifted to a person in a lower tax bracket and then sold by that person, the person might not be subject to any capital gains tax depending on income.

The cost basis and holding period carry over to the recipient of the gift.

In situations where you might feel inclined to financially support your adult children, gifting them appreciated stocks held for over a year might be a smarter tax move than providing them with cash.

The $17,000 amount is per recipient and per gifter. That means if you are married, you can gift $34,000 to a single person without the need to dip into your estate exemption amount

It also means if you have two adult children, you and your spouse can give $34,000 to each for a total of $68,000. 

They can then sell the stocks and the gains will be taxed at their tax bracket instead of yours.

This approach might come in handy for me.

I might be able to gift some of my stocks to my siblings who are in a lower tax bracket than me resulting in some tax savings.

Final Thoughts

I don’t know if I will end up selling my stocks. I am a big fan of holding investments for a very long time in general.  

Additionally, I always find market timing to be challenging to get right.

Fortunately for me, I don’t need cash right now.

So I don’t plan to sell stocks just to hold onto cash.

I would sell stocks only if I put the proceeds into another asset class such as real estate. 

When I do sell stocks, I will be sure to employ some of the tax savings strategies above to help reduce the capital gains tax on my sales.

To The Audience: Is capital gains tax a consideration when you look to sell stocks? How do you plan to reduce the amount of taxes owed? Have you implemented any of the 9 strategies above?

Related Posts

$400,000 Income, No Taxes Paid 

Doing This One Thing During Your First 3 Years At Work Can Lead To Millions

Easy Math Trick To Crush Retirement Goals And Why People Have The Wrong View About It

Facebooktwitterredditpinterestmail

3 thoughts on “9 Ways To Reduce Or Avoid Capital Gains Tax When You Sell Stocks”

  1. I am new to investing and receiving dividends. Thank you for sharing this valuable information and your experience!

    Reply
  2. In regards to #5, can I still move to Nevada (i.e.) as long as I become a resident for over 6 months and avoid capital gains tax that I sold on January 2021 for 2022?

    Reply

Leave a Comment