Capital Gains Tax: What It Is, How It Works, and Current Rates

Discover what happens to your investment profits

Capital Gains Tax Definition

Investopedia / Theresa Chiechi

What Is the Capital Gains Tax?

The capital gains tax is the levy on the profit that an investor makes when an investment is sold. It is owed for the tax year during which the investment is sold.

The long-term capital gains tax rates for the 2022 and 2023 tax years are 0%, 15%, or 20% of the profit, depending on the income of the filer. The income brackets are adjusted annually. (See tables below.)

An investor will owe long-term capital gains tax on the profits of any investment owned for at least one year. If the investor owns the investment for one year or less, short-term capital gains tax applies. The short-term rate is determined by the taxpayer's ordinary income bracket. For all but the highest-paid taxpayers, that is a higher tax rate than the capital gains rate.

Key Takeaways

  • Capital gains taxes are due only after an investment is sold.
  • Capital gains taxes apply only to “capital assets,” which include stocks, bonds, digital assets like cryptocurrencies and NFTs, jewelry, coin collections, and real estate.
  • Long-term gains are levied on profits of investments held for more than a year.
  • Short-term gains are taxed at the individual's regular income tax rate. For everyone other than the wealthiest, that's higher than the tax on long-term gains.

Capital Gains Tax

Understanding the Capital Gains Tax

When stock shares or any other taxable investment assets are sold, the capital gains, or profits, are referred to as having been "realized." The tax doesn't apply to unsold investments or "unrealized capital gains." Stock shares will not incur taxes until they are sold, no matter how long the shares are held or how much they increase in value.

Under current U.S. federal tax policy, the capital gains tax rate applies only to profits from the sale of assets held for more than a year, referred to as "long-term capital gains." The current rates are 0%, 15%, or 20%, depending on the taxpayer's tax bracket for that year.

Most taxpayers pay a higher rate on their income than on any long-term capital gains they may have realized. That gives them a financial incentive to hold investments for at least a year, after which the tax on the profit will be lower.

Day traders and others taking advantage of the ease and speed of trading online need to be aware that any profits they make from buying and selling assets held less than a year are not just taxed—they are taxed at a higher rate than assets that are held long-term.

Taxable capital gains for the year can be reduced by the total capital losses incurred in that year. In other words, your tax is due on the net capital gain. There is a $3,000 maximum per year on reported net losses, but leftover losses can be carried forward to the following tax years.

In 2021, President Biden proposed raising long-term capital gains taxes for individuals earning $1 million or more to 39.6%. Added to the existing 3.8% investment surtax on higher-income investors, the tax on those individuals could rise to 43.4%, not counting state taxes.

Capital Gains Tax Rates for 2022 and 2023

The profit on an asset that is sold less than a year after it is purchased is generally treated for tax purposes as if it were wages or salary. Such gains are added to your earned income or ordinary income on a tax return.

The same generally applies to dividends paid by an asset, which represent profit although they aren't capital gains. In the U.S., dividends are taxed as ordinary income for taxpayers who are in the 15% and higher tax brackets.

A different system applies, however, for long-term capital gains. The tax you pay on assets held for more than a year and sold at a profit varies according to a rate schedule that is based on the taxpayer's taxable income for that year. The rates are adjusted for inflation each year.

The rates for tax years 2022 and 2023 are shown in the tables below:

2022 Tax Rates for Long-Term Capital Gains
 Filing Status  0%  15%  20%
Single Up to $41,675 $41,675 to $459,750 Over $459,750
Head of household Up to $55,800 $55,800 to $488,500 Over $488,500
Married filing jointly and surviving spouse Up to $83,350 $83,350 to $517,200 Over $517,200
Married filing separately Up to $41,675 $41,675 to $258,600 Over $258,600
Here's how much you'll pay for profits from taxable assets held for a year or more.
2023 Tax Rates for Long-Term Capital Gains
  Filing Status   0%   15%   20%
  Single Up to $44,625 $44,626 to $492,300 Over $492,300
  Head of household Up to $59,750 $59,751 to $523,050 Over $523,050
  Married filing jointly and surviving spouse Up to $89,250 $89,251 to $553,850 Over $553,850
  Married filing separately Up to $44,625 $44,626 to $276,900 Over $276,900
Here's how much you'll pay for profits from taxable assets held for a year or more.

The tax rates for long-term capital gains are consistent with the trend to capital gains being taxed at lower rates than individual income, as this table demonstrates.

Special Capital Gains Rates and Exceptions

Some categories of assets get different capital-gains tax treatment than the norm.


Gains on collectibles, including art, antiques, jewelry, precious metals, and stamp collections, are taxed at a 28% rate regardless of your income. Even if you're in a lower bracket than 28%, you'll be levied at this higher tax rate. If you're in a tax bracket with a higher rate, your capital gains taxes will be limited to the 28% rate.

Owner-Occupied Real Estate

A different standard applies to real estate capital gains if you're selling your principal residence. Here's how it works: $250,000 of an individual's capital gains on the sale of a home are excluded from taxable income ($500,000 for those married filing jointly).

This applies so long as the seller has owned and lived in the home for two years or more.

However, unlike with some other investments, capital losses from the sale of personal property, such as a home, are not deductible from gains.

Here's how it can work. A single taxpayer who purchased a house for $200,000 and later sells his house for $500,000 had made a $300,000 profit on the sale. After applying the $250,000 exemption, this person must report a capital gain of $50,000, which is the amount subject to the capital gains tax.

In most cases, the costs of significant repairs and improvements to the home can be added to its cost, thus reducing the amount of taxable capital gain.

Investment Real Estate

Investors who own real estate are often allowed to take depreciation deductions against income to reflect the steady deterioration of the property as it ages. (This is a decline in the home's physical condition and is unrelated to its changing value in the real estate market.)

The deduction for depreciation essentially reduces the amount you're considered to have paid for the property in the first place. That in turn can increase your taxable capital gain if you sell the property. That's because the gap between the property's value after deductions and its sale price will be greater.

For example, if you paid $100,000 for a building and you're allowed to claim $5,000 in depreciation, you'll be taxed as if you'd paid $95,000 for the building. The $5,000 is then treated in a sale of the real estate as recapturing those depreciation deductions.

The tax rate that applies to the recaptured amount is 25%. So if the person then sold the building for $110,000, there would be total capital gains of $15,000. Then, $5,000 of the sale figure would be treated as a recapture of the deduction from income. That recaptured amount is taxed at 25%. The remaining $10,000 of capital gain would be taxed at 0%, 15%, or 20%, depending on the investor's income.

Investment Exceptions

If you have a high income, you may be subject to another levy, the net investment income tax.

This tax imposes an additional 3.8% of taxation on your investment income, including your capital gains, if your modified adjusted gross income or MAGI (not your taxable income) exceeds certain maximums.

Those threshold amounts are $250,000 if married and filing jointly or a surviving spouse; $200,000 if you’re single or a head of household, and $125,000 if married, filing separately.

Calculating Your Capital Gains

Capital losses can be deducted from capital gains to calculate your taxable gains for the year.

The calculation becomes a little more complex if you've incurred capital gains and capital losses on both short-term and long-term investments.

First, sort short-term gains and losses in a separate pile from long-term gains and losses. All short-term gains must be reconciled to yield a total short-term gain. Then the short-term losses are totaled. Finally, long-term gains and losses are tallied.

The short-term gains are netted against the short-term losses to produce a net short-term gain or loss. The same is done with the long-term gains and losses.

Capital Gains Calculator

Most individuals figure their tax (or have a pro do it for them) using software that automatically makes the computations. But you can use a capital gains calculator to get a rough idea of what you may pay on a potential or actualized sale.

How Can You Avoid Capital Gains Taxes

If you want to invest money and make a profit, you will owe capital gains taxes on that profit. There are, however, a number of perfectly legal ways to minimize your capital gains taxes:

  • Hang onto your investment for more than one year. Otherwise, the profit is treated as regular income and you'll probably pay more.
  • Don't forget that your investment losses can be deducted from your investment profits. The amount of the excess loss that you can claim to lower your income is $3,000 a year. Some investors use that fact to good effect. For example, they'll sell a loser at the end of the year in order to have losses to offset their gains for the year. If your losses are greater than $3,000, you can carry the losses forward and deduct them from your capital gains in future years.
  • Keep track of any qualifying expenses that you incur in making or maintaining your investment. They will increase the cost basis of the investment and thus reduce its taxable profit.
  • Be mindful of tax-advantaged accounts. For example, by holding securities in a 401(k) or IRA may limit the liquidity you have in your investment and options in which you can withdraw funds. However, you may have greater capabilities in buying and selling securities without incurring taxes on gains.
  • Seek out exclusions. For example, if you want to sell your house, ensure you understand rules that allow you to exclude a portion of gains from the house sale. You should be mindful to intentionally meet criteria if you can to plan the timing of the sale and ensure you meet exclusion requirements.

Capital Gains Tax Strategies

The capital gains tax effectively reduces the overall return generated by the investment. But there is a legitimate way for some investors to reduce or even eliminate their net capital gains taxes for the year.

The simplest of strategies is to simply hold assets for more than a year before selling them. That's wise because the tax you will pay on long-term capital gains is generally lower than it would be for short-term gains.

1. Use Your Capital Losses

Capital losses will offset capital gains and effectively lower capital gains tax for the year. But what if the losses are greater than the gains?

Two options are open. If losses exceed gains by up to $3,000, you may claim that amount against your income. The loss rolls over, so any excess loss not used in the current year can be deducted from income to reduce your tax liability in future years.

For example, say an investor realizes a profit of $5,000 from the sale of some stocks but incurs a loss of $20,000 from selling others. The capital loss can be used to cancel out tax liability for the $5,000 gain. The remaining capital loss of $15,000 can then be used to offset income, and thus the tax on those earnings.

So, if an investor whose annual income is $50,000 can, in the first year, report $50,000 minus a maximum annual claim of $3,000. That makes a total of $47,000 in taxable income.

The investor still has $12,000 of capital losses and can deduct the $3,000 maximum every year for the next four years.

2. Don't Break the Wash-Sale Rule

Be mindful of selling stock shares at a loss to get a tax advantage and then turning around and buying the same investment again. If you do that in 30 days or less, you will run afoul of the IRS wash-sale rule against this sequence of transactions.

Material capital gains of any kind are reported on a Schedule D form.

Capital losses can be rolled forward to subsequent years to reduce any income in the future and lower the taxpayer's tax burden.

3. Use Tax-Advantaged Retirement Plans

Among the many reasons to participate in a retirement plan like a 401(k)s or IRA is that your investments grow from year to year without being subject to capital gains tax. In other words, within a retirement plan, you can buy and sell without losing a cut to Uncle Sam every year.

Most plans do not require participants to pay tax on the funds until they are withdrawn from the plan. That said, withdrawals are taxed as ordinary income regardless of the underlying investment.

The exception to this rule is the Roth IRA or Roth 401(k), for which income taxes are collected as the money is paid into the account, making qualified withdrawals tax-free.

4. Cash in After Retiring 

As you approach retirement, consider waiting until you actually stop working to sell profitable assets. The capital gains tax bill might be reduced if your retirement income is lower. You may even be able to avoid having to pay capital gains tax at all.

In short, be mindful of the impact of taking the tax hit when working rather than after you're retired. Realizing the gain earlier might serve to bump you out of a low- or no-pay bracket and cause you to incur a tax bill on the gains.

5. Watch Your Holding Periods

Remember that an asset must be sold more than a year to the day after it was purchased in order for the sale to qualify for treatment as a long-term capital gain. If you are selling a security that was bought about a year ago, be sure to check the actual trade date of the purchase before you sell. You might be able to avoid its treatment as a short-term capital gain by waiting for only a few days.

These timing maneuvers matter more with large trades than small ones, of course. The same applies if you are in a higher tax bracket rather than a lower one.

6. Pick Your Basis 

Most investors use the first-in, first-out (FIFO) method to calculate the cost basis when acquiring and selling shares in the same company or mutual fund at different times.

However, there are four other methods to choose from: last in, first out (LIFO), dollar value LIFOaverage cost (only for mutual fund shares), and specific share identification.

The best choice will depend on several factors, such as the basis price of shares or units that were purchased and the amount of gain that will be declared. You may need to consult a tax advisor for complex cases.

Computing your cost basis can be a tricky proposition. If you use an online broker, your statements will be on its website. In any case, be sure you have accurate records in some form.

Finding out when a security was purchased and at what price can be a nightmare if you have lost the original confirmation statement or other records from that time. This is especially troublesome if you need to determine exactly how much was gained or lost when selling a stock, so be sure to keep track of your statements. You'll need those dates for the Schedule D form.

Examples of Capital Gains Taxes

Consider Larry, a taxpayer, who purchased 100 shares of ABC stock for $1,000 on January 1st, 2023. He sold all the shares for $1,500 on April 1st, 2023. Since the holding period was less than one year, Larry's capital gain is considered short-term. He would be subject to his ordinary income tax rate on the $500 gain.

In a separate example, consider Jane. Jane bought a piece of land for $50,000 on January 1st, 2020. She held the land for more than one year and sold it for $80,000 on June 1st, 2023. Sarah's capital gain is considered long-term as she met the minimum holding period requirement. She would be subject to the long-term capital gain tax rate on the $30,000 gain.

Last, think about Amy. Amy invested $10,000 in stocks within her IRA. Over time, the value of the stocks increased to $20,000. She decides to sell the stocks within her IRA and withdraw the funds for her retirement. Since the sale occurred within the IRA, Emily avoids capital gains taxes altogether, allowing her to enjoy the full $20,000 without any tax liability on the gains. Note that the holding period in this last example does not matter. Whether Amy sold the securities after 10 days or 10 years, there would be no capital gains taxes because of the IRA.

When Do You Owe Capital Gains Taxes?

You owe the tax on capital gains for the year in which you realize the gain. For example, if you sell some stock shares anytime during 2022 and make a total profit of $140, you must report that $140 as a capital gain on your tax return for 2022.

Capital gains taxes are owed on the profits from the sale of most investments if they are held for at least one year. The taxes are reported on a Schedule D form.

The capital gains tax rate is 0%, 15%, or 20%, depending on your taxable income for the year. High earners pay more. The income levels are adjusted annually for inflation. (See the tables above for the capital gains tax rates for the 2022 and 2023 tax years.)

If the investments are held for less than one year, the profits are considered short-term gains and are taxed as ordinary income. For most people, that's a higher rate.

Do I Have to Pay Capital Gains Taxes Immediately?

In most cases, you must pay the capital gains tax after you sell an asset. It may become fully due in the subsequent year tax return. For example, selling a security in 2021 that is subject to capital gains taxes may result in taxes due for your annual tax return filing for 2021 that is due in the spring of 2022.

Note that in some cases, the IRS may require quarterly estimated tax payments. Though the actual tax may not be due for a while, you may incur penalties for having a large payment due without having made any installment payments towards.

What Is Good About Reducing the Capital Gains Tax Rate?

Proponents of a low rate on capital gains argue that it is a great incentive to save money and invest it in stocks and bonds. That increased investment fuels growth in the economy. Businesses have the money to expand and innovate, creating more jobs.

They also point out that investors are using after-tax income to buy those assets. The money they use to buy stocks or bonds has already been taxed as ordinary income, and adding a capital gains tax is double taxation.

What Is Bad About Reducing the Capital Gains Tax Rate?

Opponents of a low rate on capital gains question the fairness of a lower tax on passive income than on earned income. Low taxes on stock gains shifts the tax burden onto working people.

They also argue that a lower capital gains tax primarily benefits the tax-sheltering industry. That is, instead of using their money to innovate, businesses park it in low-tax assets.

The Bottom Line

Taxes known as capital gains are levied on earnings made from the sale of assets like stocks or real estate. Based on the holding term and the taxpayer's income level, the tax is computed using the difference between the asset's sale price and its acquisition price, and it is subject to different rates.

Article Sources
Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial policy.
  1. Internal Revenue Service. "Tax Topic No. 409: Capital Gains and Losses."

  2. Tax Foundation. "Biden's Top Marginal Capital Gains Tax Rate Would Be Highest in OECD."

  3. Internal Revenue Service. "Publication 550: Investment Income and Expenses," Page 19.

  4. Internal Revenue Service. "Rev. Proc. 2021-45," Page 8-9.

  5. Internal Revenue Service. "Rev. Proc. 2022-38," Pages 8-9.

  6. Internal Revenue Service. "Publication 523: Selling Your Home," Page 2.

  7. Internal Revenue Service. "Publication 523: Selling Your Home," Pages 2–7.

  8. Internal Revenue Service. "Publication 550: Investment Income and Expenses," Page 49.

  9. Internal Revenue Service. "Publication 946: How to Depreciate Property," Pages 3–13.

  10. Internal Revenue Service. "Publication 550: Investment Income and Expenses," Pages 64-67.

  11. Internal Revenue Service. "Topic No. 559 Net Investment Income Tax."

  12. Internal Revenue Service. "Publication 544: Sales and Other Disposition of Assets," Pages 34–37.

  13. Internal Revenue Service. "Publication 544: Sales and Other Disposition of Assets," Pages 35–36.

  14. Internal Revenue Service. "Publication 550: Investment Income and Expenses," Pages 56–57.

  15. Internal Revenue Service. "About Schedule D (Form 1040)."

  16. Internal Revenue Service. "Publication 550 (2021), Investment Income and Expenses."

  17. Internal Revenue Service. "Topic No. 412: Lump-Sum Distributions."

  18. Internal Revenue Service. "Sales and Other Dispositions of Assets," Page 35.

  19. Internal Revenue Service. "Publication 538: Accounting Periods and Methods," Pages 14–18.

  20. Hoover Institution. "Capital Gains Tax Hike: No Gains, No Fairness."

  21. Brookings. "The Case Against the Capital Gains Tax Cuts."

Take the Next Step to Invest
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.