How Capital Gains Tax Works and What You Pay
Capital gains tax is the tax you owe when you sell an investment or asset for more than you paid for it
The difference between what you paid and what you sold it for is your capital gain. The government taxes that profit. How much you owe depends on how long you held the asset before selling it, your total income that year, and whether you live in a state with its own capital gains tax.
Capital gains are separate from income tax on wages or salary. You may owe capital gains tax even in a year when you earned no paycheck, and you may owe it on top of your regular income tax if you sold multiple assets or had a large gain.
Key Takeaways
- Long-term capital gains (assets held over one year) are taxed at lower federal rates than short-term gains, which are taxed as ordinary income.
- Your federal capital gains tax rate depends on your total income that year and filing status, not just the size of the gain itself.
- You report capital gains on Schedule D of your federal tax return, and you must report them even if you did not receive a 1099 form.
- Some states tax capital gains as income, while others do not, so your state of residence affects your total tax bill.
- Losses from investments can offset gains dollar-for-dollar, and unused losses can carry forward to future years.
Long-term versus short-term capital gains rates
The federal tax rate on your gain depends on how long you owned the asset. If you held it for more than one year before selling, it is a long-term capital gain. If you held it for one year or less, it is a short-term capital gain.
Short-term capital gains are taxed at your ordinary income tax rate — the same rate as wages. That rate can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your income and filing status.
Long-term capital gains have their own lower tax brackets: 0%, 15%, or 20%. Which bracket you fall into depends on your total taxable income for the year, not the size of the gain. For example, a married couple filing jointly with taxable income under $89,250 in 2024 pays 0% federal tax on long-term gains, while a single filer with income over $492,300 pays 20%.
These federal rates change each year because the income thresholds adjust for inflation. The IRS publishes the current year's brackets in the instructions to Form 1040.
How to calculate what you owe
Start with the sale price of the asset and subtract what you originally paid for it, including any fees or commissions. That number is your capital gain (or loss if the sale price was lower).
Next, determine whether it is long-term or short-term by counting the days you owned it. The IRS counts the day after you bought it as day one, and the day you sold it as the final day. If that span is more than one year, it is long-term.
Then add up all your income for the year — wages, interest, dividends, and all capital gains combined — to find your total taxable income. This total determines which capital gains tax bracket you fall into. If you have both long-term and short-term gains, the short-term gains are taxed first at your ordinary rate, and then the long-term gains are taxed at the lower rates.
If you sold assets at a loss, you can subtract those losses from your gains. If losses exceed gains, you can deduct up to $3,000 of the excess loss against other income in that year. Any remaining loss carries forward to future years.
State capital gains taxes
Nine states have a separate capital gains tax in addition to federal tax: California, Illinois, Iowa, Minnesota, New Jersey, New York, Oregon, Vermont, and Washington. Three others — Connecticut, Delaware, and Rhode Island — tax capital gains as ordinary income under their income tax systems.
In states with a separate capital gains tax, the rate is usually between 5% and 13.3%, and it applies only to long-term gains (assets held over one year). Short-term gains are taxed as ordinary income under that state's income tax brackets.
If you moved to a new state during the year you sold an asset, the state where you lived when you sold it generally taxes the gain. Some states have specific rules for residents who relocate; check your state's tax authority website for details.
Reporting capital gains on your tax return
You report capital gains on Schedule D (Form 8949, Sales of Capital Assets), which attaches to your Form 1040. You must list each sale separately: the date you bought it, the date you sold it, the purchase price, the sale price, and whether it was long-term or short-term.
If you sold stocks, mutual funds, or bonds through a brokerage, the broker sends you a Form 1099-B showing the sales. If you sold real estate, you may receive a Form 1099-S from the title company or real estate agent. These forms help the IRS match your return to their records, but you must report the gain even if you did not receive a form.
If you have many transactions, you can attach a separate statement listing them all instead of writing each one on Schedule D. Your tax software or preparer can help organize this.
Special situations and exceptions
If you sell your primary home, you may be able to exclude up to $250,000 of the gain from federal tax (or $500,000 if you are married filing jointly), provided you owned and lived in the home for at least two of the last five years. This exclusion applies only once every two years.
Inherited assets receive a "step-up in basis," meaning the cost basis resets to the asset's value on the date of death. If you inherit stock worth $50,000 and sell it a month later for $52,000, you owe tax only on the $2,000 gain, not the gain from when the original owner bought it.
Certain investments like municipal bonds and some retirement account distributions have different rules. Gains inside a traditional IRA or 401(k) are not taxed when you sell the investment; instead, withdrawals are taxed as ordinary income. Gains inside a Roth IRA are not taxed at all if you follow the withdrawal rules.
Frequently Asked Questions
Do I owe capital gains tax if I sold an investment at a loss?
No tax is owed on the loss itself. Instead, you can use the loss to reduce any capital gains you had that year. If losses exceed gains, you can deduct up to $3,000 against other income. Any unused loss carries to the next year.
What if I do not know my original purchase price?
Contact the brokerage or seller for records. If records are truly unavailable, the IRS allows you to use a reasonable estimate based on historical price data, though you should document your effort to find the actual price. Your tax preparer can advise on your specific situation.
How do I report capital gains if I use a tax software?
Most tax software has a section for investment income where you enter each sale. You will need the purchase date, sale date, purchase price, and sale price. If your brokerage uploaded data to the software, it may pre-fill some fields, but always verify the information is correct.
Can I deduct investment losses to reduce my taxes?
Yes. Capital losses offset capital gains first. If you have more losses than gains, you can deduct up to $3,000 of the excess against wages, interest, or other income. Losses beyond that carry forward indefinitely to future years.
Does the holding period start from the purchase date or settlement date?
The IRS counts from the day after the purchase settlement date as day one. For stocks and bonds, settlement is usually two business days after you place the order. For real estate, it is the closing date. Your brokerage statement shows the settlement date.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.