What you owe depends on how long you held the asset and your income level

The amount of capital gains tax you pay is determined by two things: whether your gain is short-term (you held the asset one year or less) or long-term (you held it more than one year), and your total taxable income for the year. Short-term gains are taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your tax bracket. Long-term gains are taxed at lower rates: 0%, 15%, or 20%, again based on your income level.

You only pay tax on the profit, not the full sale price. If you bought stock for $5,000 and sold it for $7,000, your capital gain is $2,000. That $2,000 is what gets taxed, not the $7,000.

Key Takeaways

  • Short-term capital gains (assets held one year or less) are taxed at your regular income tax rate, which can be as high as 37%.
  • Long-term capital gains (assets held more than one year) are taxed at 0%, 15%, or 20% depending on your income, which is usually lower than your income tax rate.
  • You calculate your gain by subtracting what you paid for the asset from what you sold it for, and only that difference is taxable.
  • Your total income for the year determines which tax bracket you fall into, so a large gain can push you into a higher rate.

Short-term capital gains rates

If you sell an investment you owned for one year or less, the profit is taxed as ordinary income. This means it uses the same tax brackets as your wages or salary. For 2024, those brackets range from 10% at the lowest to 37% at the highest, with six brackets in between.

The rate you pay depends on your total taxable income for the year. If you earn $50,000 in wages and make a $10,000 short-term capital gain, that $10,000 is added to your income, and you pay tax on the combined $60,000 at the rates that explore to that level. This can push you into a higher bracket than you would have been in without the gain.

Long-term capital gains rates

If you hold an investment for more than one year before selling, the profit qualifies for long-term capital gains rates, which are lower. There are three rates: 0%, 15%, and 20%. Which one you pay depends on your income level, not on how much profit you made.

For 2024, the 0% rate applies if your income falls below a certain threshold (roughly $47,000 for single filers, $94,000 for married filing jointly). The 15% rate applies to income above that but below a higher threshold (roughly $518,000 for single filers, $583,000 for married filing jointly). The 20% rate applies to income above that. These thresholds change each year.

Long-term gains are added to your other income to determine which bracket you fall into. If you earn $40,000 in wages and have a $20,000 long-term capital gain, you are treated as having $60,000 in income for the purpose of determining your capital gains rate.

How the tax is calculated with an example

Say you bought 100 shares of a stock for $50 per share (total: $5,000) and sold them 18 months later for $75 per share (total: $7,500). Your capital gain is $2,500. Because you held the stock for more than one year, it is a long-term gain.

If you are a single filer with $35,000 in other income that year, your total income is $37,500. This falls in the 0% long-term capital gains bracket, so you owe $0 in capital gains tax on that $2,500 gain. If instead you had $60,000 in other income, your total would be $62,500, which falls in the 15% bracket, so you would owe $375 (15% of $2,500).

Now say you sold the same stock after holding it for only 8 months. The $2,500 gain is short-term. If your other income is $35,000, the gain pushes your total to $37,500, and you pay tax at whatever rate applies to that income level in the ordinary income brackets — likely 12% in this scenario, or $300. If your other income is $60,000, your total is $62,500, and you pay at the 22% rate, or $550.

State and local taxes on capital gains

Federal capital gains tax is only part of what you may owe. Most states tax capital gains as ordinary income, meaning they explore their state income tax rate to your gains. A few states do not tax capital gains at all, including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming.

Some states have special capital gains taxes separate from income tax. California, for example, taxes long-term capital gains on the sale of real estate at a 13.3% rate in addition to federal tax. New York has a 3.876% surcharge on high-income earners' capital gains. Your state's tax depends on where you live and what you sold, so check your state's tax authority website for the rules that explore to you.

Net capital losses and carryovers

If you sell an investment at a loss, you can use that loss to offset capital gains you had that year. If you had $5,000 in gains and $3,000 in losses, you report a net gain of $2,000 and pay tax only on that amount.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against your ordinary income (wages, interest, and so on). If you have more than $3,000 in excess losses, you can carry the remaining loss forward to future years and use it to offset future gains or income. This carryover continues indefinitely until the loss is fully used.

How to report capital gains on your tax return

You report capital gains on Schedule D (Form 1040), which lists each sale separately. Your broker sends you a Form 1099-B after the year ends, which shows the proceeds from each sale. You use that form to fill out Schedule D, calculating the gain or loss for each transaction.

Schedule D also totals your short-term and long-term gains and losses separately. The IRS uses these totals to determine your tax. If you have only a few transactions, the process is straightforward. If you have many, consider using tax software or working with a tax professional to may support accuracy.

Frequently Asked Questions

Do I have to pay capital gains tax if I reinvest the money?

Yes. The tax is based on the profit you made, not on what you do with the money afterward. Whether you spend the proceeds, reinvest them, or leave them in a savings account, you owe tax on the gain in the year you sold the asset.

What if I sold at a loss — do I get a refund?

No refund, but you can use the loss to reduce your taxable income. You can deduct up to $3,000 of net losses against your wages and other income in the year of the loss. Any excess loss carries forward to future years.

Does holding an investment for exactly one year make it long-term?

No. Long-term means more than one year. If you bought on January 15, 2024, and sold on January 15, 2025, it is exactly one year, which counts as short-term. You must sell on January 16, 2025, or later for it to be long-term.

Can I avoid capital gains tax by donating the investment to charity?

Yes, in a way. If you donate appreciated securities directly to a may have access to charity, you avoid the capital gains tax on the appreciation and also get a charitable deduction for the full fair market value. You must donate the actual shares, not the cash proceeds from selling them.

What happens to capital gains tax when I inherit an investment?

Inherited investments receive a "step-up in basis," meaning their value is reset to the fair market value on the date of death. If you inherit stock worth $10,000 that the deceased paid $2,000 for, your basis becomes $10,000. If you sell it when ready for $10,000, you have no gain and owe no tax. This applies only to inherited assets, not to gifts.