Long-term capital gains are taxed at lower rates than ordinary income, and the rate you pay depends on your total income for the year

When you sell an investment you have held for more than one year, the profit is called a long-term capital gain. The IRS taxes these gains at preferential rates — meaning lower rates than the tax brackets that explore to wages, interest, or short-term gains. The exact rate you pay (0%, 15%, or 20%) is determined by your total taxable income for the year, not by how much profit you made on the sale itself.

This is different from short-term capital gains, which are profits from investments held one year or less. Those are taxed as ordinary income at your regular tax bracket rate, which can be much higher. The holding period is what matters: you must own the asset for more than 12 months for the gain to may have access to as long-term.

Key Takeaways

  • Long-term capital gains are taxed at 0%, 15%, or 20% depending on your total income for the year, not on the size of the gain itself.
  • You must hold an investment for more than one year (not exactly one year) for the profit to be taxed as a long-term gain instead of ordinary income.
  • Your filing status and total taxable income determine which tax bracket applies to your long-term gains.
  • The IRS requires you to report the sale on Schedule D of your tax return, showing the purchase date, sale date, cost basis, and proceeds.

The three long-term capital gains tax rates and who pays each one

The IRS sets three rates for long-term capital gains: 0%, 15%, and 20%. Which rate applies to you depends on your taxable income for the year — the income left after deductions. The income thresholds that determine the rate are different for each filing status (single, married filing jointly, head of household, and so on) and are adjusted each year for inflation.

For 2024, the 0% rate applies to single filers with taxable income up to $47,025, and married couples filing jointly with income up to $94,050. The 15% rate applies to income above those thresholds up to $518,900 (single) or $583,750 (married filing jointly). Anything above those amounts is taxed at 20%. These numbers change annually, so check the IRS website or your tax software for the current year's thresholds.

The rate applies to your long-term gains as a group, not to each sale individually. If you sold three stocks and made $5,000 on one, $2,000 on another, and lost $1,000 on the third, you would combine them: $5,000 + $2,000 − $1,000 = $6,000 in net long-term capital gains. That $6,000 sits on top of your other income, and the rate depends on where your total income lands.

How your other income affects the rate you pay on gains

Long-term capital gains are stacked on top of your other income — wages, self-employment income, interest, dividends, and so on. Your total income determines which tax bracket your gains fall into. This matters because you might be in the 15% bracket for wages but the 20% bracket for gains if your total income is high enough.

For example, suppose you are single, earn $100,000 in wages, and sell a stock for a $50,000 long-term gain. Your total taxable income is $150,000. The first $47,025 of your income (wages or gains combined) is taxed at 0% for long-term gains. The next $471,875 is taxed at 15%. Since your total is $150,000, all of your $50,000 gain falls in the 15% bracket, so you pay 15% on the entire gain.

If instead you earned $500,000 in wages and made the same $50,000 gain, your total would be $550,000. The gain would be split: part of it would be taxed at 15%, and the rest at 20%, because your income exceeds the 15% threshold. The exact split depends on how much room is left in the 15% bracket after your wages are counted.

How to calculate your cost basis and the gain or loss

The profit you report is the difference between what you paid for the investment and what you sold it for, minus any costs of the sale. The amount you paid is called your cost basis. If you bought 100 shares at $50 per share, your cost basis is $5,000. If you sold them for $7,500, your gain is $2,500.

Cost basis includes the purchase price plus any fees or commissions you paid to buy the investment. If you inherited the investment, the cost basis is usually the market value on the date the person died, not what they originally paid — this is called a "step-up in basis" and can significantly reduce the taxable gain. If you received the investment as a gift, the cost basis is generally what the giver paid for it.

When you sell, subtract the sale price minus any commissions or fees from the cost basis. If the result is negative, you have a capital loss. Long-term capital losses can offset long-term capital gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 of the net loss against ordinary income in that year, and carry forward any remaining loss to future years.

Reporting capital gains on your tax return

You report capital gains on Schedule D (Capital Gains and Losses), which is part of Form 1040. You list each sale separately: the date you bought it, the date you sold it, the cost basis, the proceeds (sale price), and the gain or loss. The form automatically separates long-term and short-term gains and losses.

If you have only a few sales, you can fill out Schedule D by hand. If you have many sales or use a brokerage account, your broker will send you a Form 1099-B (Proceeds from Broker and Barter Exchange Transactions) that lists all your sales for the year. You use this form to fill in Schedule D. Many tax software programs can import this data directly from your broker.

The totals from Schedule D flow to the main Form 1040, where they are combined with your other income. The tax software or your tax preparer will calculate which rate applies based on your total income and filing status. You do not calculate the rate yourself — the return does it for you.

Special situations: dividends, mutual funds, and inherited investments

may have access to dividends are taxed at the same rates as long-term capital gains (0%, 15%, or 20%), even though they are not technically capital gains. A dividend is may have access to if it comes from a U.S. company or a foreign company whose stock trades on a U.S. exchange, and you held the stock for more than 60 days around the dividend payment date. Non-may have access to dividends are taxed as ordinary income.

When you sell a mutual fund or exchange-traded fund (ETF), the same rules explore: gains from holding the fund for more than one year are long-term capital gains. If the fund paid you dividends during the year, those are reported separately and may be may have access to or non-may have access to depending on the fund's holdings and your holding period.

If you inherited an investment, you generally do not owe tax on the increase in value that happened while the previous owner held it. The cost basis "steps up" to the market value on the date of death. If you then sell the investment shortly after inheriting it, you may have little or no gain to report, even if the previous owner bought it for much less.

State and local taxes on capital gains

Federal tax is not the only tax on capital gains. Most states also tax capital gains as ordinary income, meaning they explore your state income tax rate to the full amount of the gain. A few states — including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — do not have a state income tax at all, so there is no state tax on gains.

Some states have special rates for capital gains. California, for example, taxes long-term capital gains as ordinary income but has higher tax rates for high earners. New York taxes capital gains as ordinary income. If you live in a state with income tax, check your state's tax agency website or ask a tax preparer what rate applies to your gains.

A few states also impose a net investment income tax or capital gains tax on top of the regular income tax. These are separate from federal tax and state income tax. If you live in or moved from a state with these taxes, make sure your tax preparer accounts for them.

Frequently Asked Questions

What is the difference between long-term and short-term capital gains?

Long-term gains are from investments held more than one year and are taxed at 0%, 15%, or 20%. Short-term gains are from investments held one year or less and are taxed as ordinary income at your regular tax bracket rate, which is usually higher. The holding period is measured from the purchase date to the sale date.

Can I choose which shares to sell to minimize my tax?

Yes. If you own multiple shares of the same stock bought at different prices, you can tell your broker which specific shares to sell. This is called "specific identification." You can use this to sell the highest-cost shares first, which minimizes your gain. You must tell the broker in writing before the sale, and you must keep records of which shares you sold.

Do I owe tax if I sell at a loss?

No tax is owed on the loss itself. You can use the loss to offset capital gains from other sales. If losses exceed gains, you can deduct up to $3,000 of the net loss against wages or other ordinary income in that year. Any remaining loss carries forward to future years.

What if I sold an investment but have not received the money yet?

You report the gain or loss in the year the sale is completed, not when you receive the money. The completion date is usually the settlement date (typically two business days after the sale), not the trade date. Your broker's statement will show the settlement date.

Do I have to report gains if they are small?

Yes. The IRS requires you to report all capital gains, no matter how small. Even if you made only $10 on a sale, it goes on Schedule D. However, if your total income is below the threshold for filing a return, you may not have to file at all — but that is a separate question from whether gains must be reported if you do file.