When you start investing, you might be excited about the potential for growth over time and benefits to you, your family and the causes you support. But you should be aware that you may need to pay capital gains taxes when you sell certain investments.
Understanding how capital gains tax works, including who pays it, can help you better manage your investments. Here's what you need to know.
How capital gains tax works
The capital gains tax on investments comes into play when an investment's value increases between the time it is bought and the time it is sold. When you sell capital assets at a profit, you may be required to pay this tax.
What assets have a capital gains tax?
Capital gains tax only applies to the sales of capital assets. These items usually are considered significantly valuable assets, such as:
- Investment properties
- Cars
- Stocks
- Bonds
- Art
- Other collectibles
When does the capital gains tax not apply?
Capital gains tax doesn't apply to all investment returns, including:
- Dividends. Dividends on stocks, bonds and mutual funds are not taxed as capital gains. Instead, they are taxed at ordinary or qualified dividend tax rates depending on the nature of the dividend-paying security.
- Sale of your primary home. If you sell your main residence, up to $250,000 of profit ($500,000 if married filing jointly) is excluded from the capital gains tax if you have owned and lived in it for at least two of the past five years.
How to calculate capital gains: Cost basis & example
The price you pay to purchase an asset is its cost basis. When you sell that asset for more than what your
In the event you've inherited something,
Capital gains tax example
Here's an example of how capital gains taxes work.
- In 2014, Julia bought 100 shares of XYZ Corp. for $50 per share. Her initial investment was $5,000 (100 shares x $50 per share).
- In 2024, Julia decided to sell those shares. By that time, the price per share was $150. She sold all her shares for $15,000 (100 shares x $150 per share).
- Julia will owe capital gains tax on her $10,000 profit (the $15,000 sales price minus her $5,000 basis).
When do you pay capital gains tax?
You only pay capital gains tax on investments when you sell the investment or item at a profit, which is called a realized gain. When you are merely holding your assets — even if they increase in value under your watch (known as unrealized gains) — you won't owe any capital gains tax yet. After all, the asset's value could decrease before you sell it, so you're not taxed until you sell it and make a profit.
The capital gains tax is levied for the tax year in which you sold your investment. But you don't have to pay the tax immediately when you sell the asset. Instead, you report capital gains using IRS
How capital losses work with capital gains
Capital gains taxes cover your investment sales as a whole. In other words, you pay capital gains tax only on net capital gains, which means you deduct your capital losses from them before calculating the tax.
A capital loss occurs when you sell an investment for less than your cost basis. You can offset capital losses against capital gains for similar investments. For example, if you sell one stock at a loss but another at a gain, you deduct the loss from the gain to determine your net capital gain or loss.
If you had a downward year and had a net capital loss (after applying losses to gains) of up to $3,000, you can deduct that against your other types of income for that year, such as your salary, reducing your overall taxable income. You can deduct capital losses up to the amount of your capital gains plus $3,000 ($1,500 if married filing separately) and reduce your taxable income in those years.
Short-term vs. long-term capital gains
The amount of the capital gains tax depends on how long you owned the asset.
Short-term capital gain
A short-term capital gain applies to an asset you owned for one year or less before you sold it. These gains are taxed at the same rate as your ordinary income, such as your salary. Your federal income tax rate (anywhere from 10% to 37% depending on your tax bracket) applies to the profit you earned on the sale of your investment.
Long-term capital gain
Long-term capital gains apply to assets you owned for more than one year before you sold them. This rate is generally lower than your ordinary income rate. These gains are taxed at 0%, 15% or 20%. The rate is determined by how you file and what your taxable income is:
2024 capital gains rates
Capital gains rate of 0%
You can avoid capital gains tax if your taxable income is less than or equal to:
- $47,025 for single filers and married filing separately
- $94,050 for married filing jointly and qualifying surviving spouse
- $63,000 for head of household
Capital gains rate of 15%
A capital gains tax of 15% applies if your taxable income is:
- $47,026 to $518,900 for single filers
- $47,026 to $291,850 for married filing separately
- $94,051 to $583,750 for married filing jointly and qualifying surviving spouse
- $63,001 to $551,350 for head of household
Capital gains rate of 20%
A capital gains rate of 20% applies if your taxable income exceeds the thresholds set for the 15% capital gain rate.
- Over $518,900 for single filers
- Over $291,850 for married filing separately
- Over $583,750 for married filing jointly and qualifying surviving spouse
- Over $551,350 for head of household
Capital gains tax rate on collectibles
Capital gains tax on the sale of collectibles is capped at 28%, even if it is a short-term gain and your ordinary income tax rate is higher.
Net investment income tax
In addition to capital gains tax, if you have a capital gain from an investment and your modified adjusted income is over the limit, you may need to pay an additional 3.8% tax called the
- Single or head of household: $200,000 income threshold
- Married filing jointly: $250,000 income threshold
- Married filing separately $125,000 income threshold
- Qualifying widow(er) with a child: $250,000 income threshold
How to reduce capital gains taxes
Understanding how to lower your capital gains tax burden can help you hold on to more of your investment profits. Here are a few strategies to consider.
- Use tax-advantaged accounts. You don't have to pay taxes on capital gains within tax-advantaged accounts, including
401(k)s ,529 plans andRoth IRAs . In some cases, withdrawals from these accounts can be tax-free as well.
- Practice tax loss harvesting.
Tax loss harvesting involves selling investments that have lost value to offset gains from other investments. For example, if you have a $10,000 gain from one investment and a $4,000 loss from another, you can net them, resulting in a taxable capital gain of only $6,000.
- Hold investments longer. Long-term capital gains are taxed at lower rates than short-term capital gains. You can benefit from these lower tax rates by holding onto your investments for longer than a year.
- Focus on dividend-paying stocks. Qualified dividends are taxed at the same rate as long-term capital gains rather than your ordinary income tax rate. To qualify for the lower rate, the dividends must be paid by a U.S. corporation or qualified foreign corporation and meet specific holding period requirements.
Investing in dividend-paying stocks can provide a tax-advantaged income stream.
- Time your sales. Timing your sales to occur in years when your income is lower can help you stay in a lower capital gains tax bracket. If you anticipate a lower-income year, plan to sell investments with gains during that year to take advantage of the lower rates.
- Invest in your primary residence. Improvements to your primary residence increase your cost basis, reducing the realized capital gain when you sell it. If your gain is less than the home sale exclusion amount, you won't have to pay taxes on the gain at all.
- Donate appreciated assets to charity. When you
donate appreciated assets to a qualified charity, you avoid paying capital gains taxes on the appreciation. Additionally, you may be able to claim a charitable deduction for the full market value of the donated asset.
- Pass investments on to heirs. Maintaining an investment until your death and
passing it on to your heirs can give them a stepped-up basis so neither of you has to pay taxes on the capital gains that occurred during your lifetime.