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

Capital gains tax is not a flat rate. The IRS taxes investment profits differently depending on whether you held the asset for more than one year (long-term) or one year or less (short-term). Long-term gains get lower rates. Short-term gains are taxed as ordinary income at your regular tax bracket rate, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your income and filing status.

Long-term capital gains rates are 0%, 15%, or 20%. Which rate you pay depends on your income level in the year you sell, not on the size of your gain. The income thresholds change every year and differ based on whether you file as single, married filing jointly, head of household, or another status. For 2024, a single filer with taxable income under $47,025 pays 0% on long-term gains. Between $47,025 and $518,900, you pay 15%. Above $518,900, you pay 20%.

Your total income for the year matters because capital gains are added to your other income (wages, interest, dividends) to determine your tax bracket. If you earned $50,000 in wages and sell an investment for a $30,000 gain, your taxable income is $80,000 for the year, and that affects which capital gains rate applies.

Key Takeaways

  • Long-term capital gains (assets held over one year) are taxed at 0%, 15%, or 20% based on your total income for the year, not the size of your gain.
  • Short-term capital gains (assets held one year or less) are taxed as ordinary income at your regular tax bracket rate, which ranges from 10% to 37%.
  • Your filing status and total income from all sources determine which rate you pay, and income thresholds change annually.
  • State and local taxes may add 3% to 13% or more to your federal bill, depending on where you live and where you earned the gain.
  • Net Investment Income Tax of 3.8% applies to long-term gains if your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).

How holding period changes what you owe

If you bought a stock, mutual fund, or real estate and sold it within 12 months, the profit is short-term capital gain. The IRS taxes this as ordinary income. If you are in the 24% tax bracket, you pay 24% on the gain. If you are in the 12% bracket, you pay 12%. This is the same rate you pay on wages.

If you held the asset for more than one year before selling, it is long-term capital gain. The tax rate drops significantly. Most people in the middle income range pay 15%. People with lower total income may pay 0%. People with very high income pay 20%. The difference between short-term and long-term can mean paying 24% instead of 15%, or 37% instead of 20%.

The holding period clock starts the day after you buy. If you bought on January 15, 2024, the one-year mark is January 16, 2025. Selling on January 16 or later qualifies for long-term rates. Selling on January 15 does not.

State and local taxes on top of federal

Federal capital gains tax is only part of your bill. Most states tax capital gains as income. California taxes long-term gains at the same rate as ordinary income, up to 13.3%. New York adds up to 10.9%. Massachusetts adds 5%. Some states add nothing: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming have no state income tax on capital gains.

A few states tax capital gains separately from ordinary income. Iowa, Vermont, and Rhode Island have dedicated capital gains tax rates that differ from their income tax rates. Check your state's tax website or speak with a tax preparer to learn what your state charges.

Local taxes in cities and counties can add another 1% to 4% in some places. New York City, for example, adds local income tax on top of state and federal rates. Your total bill can easily be 40% or higher in high-tax states if you are in the top federal bracket.

Net Investment Income Tax adds 3.8% for higher earners

If your modified adjusted gross income (MAGI) exceeds $200,000 (single filer) or $250,000 (married filing jointly), you owe an additional 3.8% Net Investment Income Tax on capital gains. This is a separate tax from the capital gains tax itself, not a replacement.

MAGI for this purpose is roughly your adjusted gross income plus certain foreign income. If you sold an investment for a $50,000 gain and your MAGI is $210,000, you owe 3.8% of the $50,000 gain, which is $1,900, on top of the regular capital gains tax.

This tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. If your MAGI is $205,000 and your net investment income is $100,000, the tax applies only to $5,000 of the gain.

How to calculate your actual bill

Start by adding up all your income for the year: wages, self-employment income, interest, dividends, and capital gains. This is your total income. Subtract your standard deduction (for 2024, $14,600 for single filers, $29,200 for married filing jointly). The result is your taxable income.

Next, find where your taxable income falls in the long-term capital gains brackets for your filing status. If you are single with $60,000 in taxable income, you fall in the 15% bracket (between $47,025 and $518,900). If you are single with $30,000 in taxable income, you fall in the 0% bracket (under $47,025).

Multiply your long-term capital gain by the rate that applies. If your gain is $20,000 and you are in the 15% bracket, you owe $3,000 in federal capital gains tax. Add your state and local taxes. If you are in California, add 13.3% of the gain. If your MAGI exceeds the threshold, add 3.8%.

Short-term gains are simpler: multiply the gain by your ordinary income tax bracket rate. If you are in the 24% bracket and have a $10,000 short-term gain, you owe $2,400 in federal tax, plus state and local taxes.

Capital losses can reduce what you owe

If you sold an investment at a loss, you can use that loss to offset capital gains. If you had a $30,000 gain on one stock and a $10,000 loss on another, your net capital gain is $20,000. You pay tax only on the $20,000.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against ordinary income. Any remaining loss carries forward to future years. This means a bad year in the market can reduce your tax bill now and in years to come.

Losses must be matched to gains in a specific order for tax purposes. Long-term losses offset long-term gains first. Short-term losses offset short-term gains first. Only after those are matched do you net long-term against short-term. A tax preparer can help you arrange this to minimize your bill.

Frequently Asked Questions

Do I owe 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. If you sold a stock for $50,000 that you bought for $30,000, you owe tax on the $20,000 gain whether you spend it, save it, or buy another investment. Reinvesting does not defer or eliminate the tax.

What if my capital gain pushes me into a higher tax bracket?

Capital gains are added to your other income to determine your bracket. If you earned $45,000 in wages and have a $10,000 long-term gain, your taxable income is $55,000. You may move from the 12% bracket into the 22% bracket for ordinary income, but your capital gains are still taxed at the long-term rate that applies to your total income level, not at 22%.

Do I have to pay capital gains tax the year I sell, or can I pay it later?

You owe the tax in the year you sell the asset. You report it on your tax return for that year, due April 15 of the following year. If you expect a large gain, you may need to make quarterly estimated tax payments to avoid penalties. A tax preparer can tell you whether you need to do this.

What if I inherited an investment — do I owe capital gains tax on it?

Inherited investments receive a "step-up in basis," meaning your cost basis is the value on the date of death, not what the original owner paid. If you inherit a stock worth $50,000 and sell it for $50,000 a month later, you owe no capital gains tax. You only owe tax on gains that occur after you inherit it.

Are there any capital gains I don't have to pay tax on?

Gains on your primary residence are partially excluded. If you are single, you can exclude up to $250,000 of gain if you owned and lived in the home for at least two of the last five years. Married couples filing jointly can exclude up to $500,000 under the same conditions. Other gains are generally taxable.