Your tax bill depends on three things: how long you held the asset, your total income, and your filing status

The amount of capital gains tax you owe is not a fixed percentage. The IRS taxes long-term gains (assets held over one year) at lower rates than short-term gains (held one year or less). Your tax bracket matters too — the same $10,000 gain costs different people different amounts depending on their other income. And your filing status (single, married filing jointly, head of household) changes where the tax brackets start and stop.

To estimate what you'll pay, you need to know: the profit you made (sale price minus what you paid), how long you owned it, your total income for the year including the gain, and whether you're single or married. The IRS does not send you a bill based on a guess — you calculate it when you file your tax return, usually using Schedule D (Form 1040).

Key Takeaways

  • Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% depending on your income and filing status; short-term gains are taxed as ordinary income at rates up to 37%.
  • Your total income for the year — wages, interest, dividends, and the capital gain itself — determines which tax bracket applies to the gain.
  • The 3.8% Net Investment Income Tax may explore on top of capital gains tax if your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).
  • State and local taxes on capital gains vary widely; some states tax them as ordinary income, others have separate rates, and a few have no capital gains tax at all.
  • You report capital gains on Schedule D and carry the result to your Form 1040; the calculation happens on your tax return, not before you sell.

Long-term vs. short-term: the rate difference

Long-term capital gains — profits from assets you held for more than one year — are taxed at preferential rates: 0%, 15%, or 20%. Which rate applies depends on your taxable income and filing status. These rates are lower than the ordinary income tax rates (10% through 37%) that explore to short-term gains.

Short-term capital gains — profits from assets you held one year or less — are taxed as ordinary income. If you're in the 24% tax bracket for wages, a short-term gain is also taxed at 24%. This is why holding an asset just over one year can cut your tax bill significantly.

The holding period is measured from the date you bought the asset to the date you sold it. If you bought stock on March 15, 2023, and sold it on March 16, 2024, it qualifies as long-term. If you sold it on March 15, 2024, it's short-term.

How your income bracket determines your long-term rate

The 0%, 15%, and 20% long-term rates are not tied to your job or salary alone. They're tied to your taxable income — the total of all your income for the year minus deductions. When you sell an asset at a gain, that gain is added to your taxable income, which may push you into a higher tax bracket.

For 2024, the long-term capital gains brackets are:

Tax RateSingle FilersMarried Filing JointlyHead of Household
0%Up to $47,025Up to $94,050Up to $62,700
15%$47,025 to $518,900$94,050 to $583,750$62,700 to $551,350
20%Over $518,900Over $583,750Over $551,350

These brackets adjust each year for inflation. If your taxable income (including the capital gain) falls within the 0% bracket, you pay no federal tax on the gain. If it falls in the 15% bracket, you pay 15% on the portion of the gain that sits in that bracket. If the gain pushes you into the 20% bracket, only the portion above the 15% threshold is taxed at 20%.

Example: You're single with $40,000 in wages and $15,000 in long-term capital gains. Your taxable income is $55,000. The first $7,025 of the gain ($47,025 minus $40,000) is taxed at 0%. The remaining $7,975 is taxed at 15%, which equals $1,196. Your total federal tax on the gain is $1,196, not $2,250 (which would be 15% of the whole gain).

The Net Investment Income Tax and state taxes

On top of capital gains tax, you may owe the Net Investment Income Tax (NIIT) — an additional 3.8% tax on investment income if your modified adjusted gross income exceeds certain thresholds. For 2024, the threshold is $200,000 for single filers and $250,000 for married couples filing jointly. The 3.8% applies to the lesser of your net investment income or the amount your income exceeds the threshold.

Example: You're single with $210,000 in modified adjusted gross income, which includes $20,000 in long-term capital gains. You owe 3.8% on the lesser of $20,000 (your investment income) or $10,000 (the amount over the $200,000 threshold). That's $380 in NIIT on top of your regular capital gains tax.

State and local taxes on capital gains vary widely and can add significantly to your bill. Some states tax capital gains as ordinary income (using the same brackets as wages). Others have separate capital gains tax rates — for example, California taxes long-term gains at the same rate as ordinary income, while Washington State has a 7% tax on long-term gains over $250,000. A few states (including Texas, Florida, and Wyoming) have no income tax at all. Check your state's tax authority website or a tax professional for your specific state's rules.

How to calculate your estimated tax bill

You cannot know your exact capital gains tax until you file your return, because the tax depends on your total income for the entire year. But you can estimate it before you sell using a worksheet or tax software.

Start with your expected income for the year (wages, interest, dividends, rental income, and any other sources). Add the capital gain you expect to realize. Look up the long-term capital gains brackets for your filing status. Subtract your standard deduction (or itemized deductions if you itemize). The result is your estimated taxable income. Find where it falls in the brackets and calculate the tax.

If you're close to a bracket threshold, the order in which income is taxed matters. Long-term capital gains are taxed after ordinary income, so ordinary income fills up the lower brackets first. This can push more of your gain into higher brackets than you might expect.

Tax software (like TurboTax, H&R Block, or TaxAct) can run this calculation for you. Many also let you model different scenarios — selling now versus later, or selling in a different year — to see how the tax changes.

When you owe tax before filing your return

If you expect to owe more than $1,000 in capital gains tax for the year, you may need to make estimated tax payments to the IRS quarterly. This applies if you don't have enough tax withheld from wages or other income to cover what you'll owe.

Estimated payments are due on April 15, June 17, September 16, and January 15 (the dates vary slightly by year). You file Form 1040-ES with the IRS to calculate and pay them. If you don't make estimated payments and you owe more than $1,000, you may face a penalty when you file your return, even if you pay the full amount owed.

If you have a spouse and file jointly, you can split the estimated payment obligation between you. Self-employed people and retirees with investment income often use estimated payments because they don't have an employer withholding taxes.

Losses that offset gains

If you sold assets at a loss in the same year you had gains, you can use the losses to reduce your taxable gains. This is called tax-loss harvesting. Long-term losses offset long-term gains first, and short-term losses offset short-term gains first. If losses exceed gains, you can deduct up to $3,000 of the excess loss against ordinary income in that year. Any remaining loss carries forward to future years.

Example: You had $25,000 in long-term gains and $10,000 in long-term losses. Your net long-term gain is $15,000, and that's what you report on Schedule D. If you also had $5,000 in short-term losses and no short-term gains, you can use $3,000 of that loss against ordinary income and carry $2,000 forward to next year.

Losses must be from actual sales. Unrealized losses (assets that have dropped in value but you haven't sold) do not count. You must also follow the wash-sale rule: if you sell a security at a loss, you cannot buy the same or substantially identical security within 30 days before or after the sale, or the loss is disallowed.

Frequently Asked Questions

Do I pay capital gains tax in the year I sell or when I file my return?

You owe the tax in the year you sell, but you calculate and pay it when you file your return (usually the following April). If you expect to owe more than $1,000, you should make estimated payments during the year to avoid penalties. The IRS does not bill you separately — the tax is part of your overall return calculation.

What if I sold an asset at a loss?

Capital losses reduce capital gains dollar-for-dollar. If you have no gains, you can deduct up to $3,000 of losses against ordinary income (like wages) in that year. Any loss beyond $3,000 carries forward to future years and can be used to offset future gains or income.

Does the time of year I sell affect my tax bill?

Yes, because your total income for the entire year determines your tax bracket. Selling in December versus January can change your taxable income and push you into a different bracket. Selling in a year when you have lower income (like after retirement) may result in a lower tax rate on the gain.

Are inherited assets taxed on capital gains?

No. When you inherit an asset, its value is "stepped up" to its fair market value on the date of death. If you sell it shortly after inheriting it, you owe little or no capital gains tax. You only owe tax on gains that occur after you inherit it.

What if I'm not sure whether my gain is long-term or short-term?

Count the days from the purchase date to the sale date. If it's more than 365 days, it's long-term. Your brokerage statement or tax software will usually calculate this for you and report it on Form 1099-B. If you're unsure, ask your tax preparer or check the IRS Publication 544 (Sales of Assets).