Selling stocks and bonds? 6 steps to help trim your tax bill
Investments that have grown in value can produce capital gains when you sell them. Here are some points to consider that may help minimize the tax bite.
EVEN WHEN YOU’RE INVESTING FOR THE LONG TERM, you may want to sell stock along the way. Perhaps you need to get your portfolio back to your target mix after a period when stocks outperformed bonds. Or you may need to raise cash for your upcoming retirement or a major purchase. Or market volatility has you rethinking your tolerance for taking investment risks.
No matter the reason, when you sell investments that have gained in value, you may be looking at a significant tax bill. Here are answers to the most common questions about the federal income tax consequences of selling assets and what you can do to minimize how much you owe. (State and local taxes may also apply, so you should consult with your tax advisor.)

How are stocks and bonds taxed?
When you sell an asset like a stock or bond for a gain, your potential federal income tax liability depends on two factors: How long you’ve owned the asset and where you hold it. Within a tax-deferred account like a traditional IRA or workplace retirement plan, you will not owe federal income taxes on any gains from selling investments until you withdraw earnings and contributions.
Outside of a tax-deferred account, timing is crucial. If you’ve owned the asset for a year or less, your gain will be taxed as ordinary income, with rates currently as high as 37%.1 For stocks or bonds you’ve owned for more than a year, you could face a capital gains tax as high as 20%1 on your profits (rates vary depending on your income). Even a 20% tax “may be a small price to pay for success,” says Joe Curtin, head of Portfolio Management, Chief Investment Office, Merrill and Bank of America Private Bank. “You can celebrate keeping the 80%.”

Your profit when you sell a stock, house or other capital asset. If you owned the asset for more than a year, the gain is considered long-term, and special tax rates apply. The current capital gains tax rates are generally 0%, 15% and 20%, depending on your income.1
Stock dividends may also be subject to these favorable capital gains tax rates as long as they are “qualified,” which is based in part on how long you’ve owned the stock; if not, ordinary income tax rates apply. Bond interest payments are taxable as ordinary income, but federal and state tax treatment varies depending on the type of bond (municipal, government or corporate).

Can I avoid capital gains taxes?
For the most part, no. However, there are a few instances where you may be able to. When you sell your primary home, for instance, you may be able to exclude up to $500,000 in capital gains from your taxes if you’re a married couple filing jointly (or $250,000 for single filers). Here are other strategies to consider:

Does reinvesting reduce capital gains?
Real estate investors can employ certain tax strategies to potentially defer gains on the sale of a property. But with stocks, reinvesting your gains does not reduce the federal income taxes you may owe. When you reinvest the proceeds from selling a stock that has risen in value, you may have a higher cost basis for federal income tax purposes. If those tax rates rise significantly in the future, that might minimize your total tax liability on that investment, but otherwise you may simply owe some taxes now and some later.
But mutual funds may incur capital gains when managers buy and sell holdings within the portfolio, and the fund will pass those gains on to shareholders in the form of a distribution. This means that even if you reinvest dividends and capital gains distributions, you may still owe federal income tax. (Those reinvested payouts are added to your cost basis when you do sell.) As with individual stocks, mutual fund dividends are taxable at either capital gains rates or ordinary income rates depending on whether they are considered “qualified.”

A payment from a mutual fund or exchange-traded fund (ETF) — typically made at year-end — that represents the investor’s share of the fund’s gains from asset sales.
To help potentially minimize taxable capital gains distributions, consider favoring funds with low portfolio turnover such as exchange-traded funds, which typically follow a particular index. Actively managed funds may realize more capital gains due to higher portfolio turnover, the National Wealth Strategies team notes.

TIP: To get the federal tax benefits up front and the ability to make gifts to charity over time, consider donating appreciated stock to a donor-advised fund.

What if stocks or bonds are part of my estate?
When you gift appreciated investments to your beneficiaries in your will or earlier as part of your gifting plans, you can avoid paying capital gains taxes entirely. But your beneficiaries may not be able to.
When assets go to your beneficiaries as part of your estate upon your death, the cost basis, or original purchase price, for federal tax purposes is generally adjusted to fair market value. That means that when your beneficiaries sell the appreciated shares, their taxable gain (or loss) is the difference between the sale price and the fair market value of the shares on the date of death.
However, if you gift appreciated investments to your beneficiaries during your lifetime, the assets maintain a “carryover basis,” or the same cost basis you held in the stock. Still, your beneficiaries may have lower incomes and therefore face lower capital gains taxes than you would.

A private wealth advisor can help you get started.
1 Plus a potential 3.8% net investment income tax.
2 Internal Revenue Service, “Topic No. 409, Capital Gains and Losses,” Jan. 30, 2024.
Important Disclosures
Opinions are as of July 17, 2024, and are subject to change.
Investing involves risk including possible loss of principal. Past performance is no guarantee of future results.
Merrill, its affiliates, and financial advisors do not provide legal, tax or accounting advice. You should consult your legal and/or tax advisors before making any financial decisions.
This information should not be construed as investment advice and is subject to change. It is provided for informational purposes only and is not intended to be either a specific offer by Bank of America, Merrill or any affiliate to sell or provide, or a specific invitation for a consumer to apply for, any particular retail financial product or service that may be available.
The Chief Investment Office (CIO) provides thought leadership on wealth management, investment strategy and global markets; portfolio management solutions; due diligence; and solutions oversight and data analytics. CIO viewpoints are developed for Bank of America Private Bank, a division of Bank of America, N.A., (“Bank of America”) and Merrill Lynch, Pierce, Fenner & Smith Incorporated (“MLPF&S” or “Merrill”), a registered broker-dealer, registered investment adviser, Member SIPC and a wholly owned subsidiary of Bank of America Corporation (“BofA Corp.”).
Investments have varying degrees of risk. Some of the risks involved with equity securities include the possibility that the value of the stocks may fluctuate in response to events specific to the companies or markets, as well as economic, political or social events in the U.S. or abroad. Investments in foreign securities (including ADRs) involve special risks, including foreign currency risk and the possibility of substantial volatility due to adverse political, economic or other developments. These risks are magnified for investments made in emerging markets. Investments in a certain industry or sector may pose additional risk due to lack of diversification and sector concentration.
Explore more of our latest thinking
1 of 1