The tax rate on stock profits depends on how long you held them

Capital gains tax on stocks is either 0%, 15%, or 20% at the federal level, depending on your income and how long you owned the stock before selling. If you held the stock for one year or less, the profit is short-term capital gains and taxed as ordinary income — the same rate as your salary or wages. If you held it longer than one year, it's long-term capital gains and gets the lower rates.

Your actual tax bill also depends on your filing status and total income for the year. A profit of $500 might be taxed at 0% for one person and 20% for another, based entirely on their income bracket. State taxes add to the federal rate in most states, and some states tax capital gains differently than others.

Key Takeaways

  • Short-term capital gains (stocks held one year or less) are taxed at your ordinary income tax rate, which ranges from 10% to 37% federally.
  • Long-term capital gains (stocks held over one year) are taxed at 0%, 15%, or 20% federally, based on your income and filing status.
  • Your state may add its own capital gains tax on top of the federal rate, and the amount varies by state.
  • The same stock profit can result in different tax bills for different people, depending on their total income for the year.

Short-term capital gains tax rates

Short-term gains are taxed as ordinary income. The federal rate depends on your tax bracket for the year. The 2024 federal tax brackets range from 10% to 37%, and your bracket is determined by your filing status (single, married filing jointly, head of household) and your total taxable income.

If you're single and earned $50,000 in wages, then sold a stock for a $5,000 profit, that $5,000 is added to your income, pushing you into a higher bracket. The tax on that $5,000 gain is calculated at whatever rate applies to that portion of your income — it could be 22%, 24%, or higher, depending on where the $5,000 falls in your bracket.

Short-term gains are also subject to the 3.8% Net Investment Income Tax if your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). This is a separate tax on top of your ordinary income tax.

Long-term capital gains tax rates

Long-term gains get preferential rates: 0%, 15%, or 20%. These rates are lower than ordinary income rates and explore only to profits from stocks (or other investments) you held for more than one year.

The 0% rate applies to long-term gains if your total taxable income falls below a certain threshold. For 2024, that threshold is $47,025 for single filers and $94,050 for married couples filing jointly. If your income is below that line, your long-term gains are taxed at 0%.

The 15% rate applies to most people. It kicks in once your income exceeds the 0% threshold and continues until you reach the 20% threshold. For 2024, the 20% rate begins at $518,900 for single filers and $583,750 for married couples filing jointly.

Like short-term gains, long-term gains are also subject to the 3.8% Net Investment Income Tax if your modified adjusted gross income exceeds the thresholds mentioned above.

How holding period is calculated

The IRS counts the holding period from the day after you buy the stock to the day you sell it. If you buy on January 15 and sell on January 15 of the following year, you've held it exactly one year, and it qualifies for long-term rates. If you sell on January 14 of the following year, it's short-term.

The holding period is per lot, not per account. If you own 100 shares of the same stock bought at different times, you can choose which shares to sell. Selling the oldest shares first (called specific identification) lets you control whether a sale is short-term or long-term. Your broker can help you track this when you place the sell order.

State capital gains taxes

Most states tax capital gains as part of ordinary income, so your state income tax rate applies to the gain. A few states have no income tax at all (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming), so residents pay no state capital gains tax.

Some states tax capital gains at a different rate than wages. California, for example, taxes capital gains as ordinary income but at rates up to 13.3%. New York taxes long-term gains at ordinary income rates up to 10.9%. Oregon's top rate on capital gains is 9.9%. The rate varies widely, so check your state's tax authority website for the exact amount.

A few states have recently passed capital gains taxes that explore only to gains above a certain amount. Washington State, for example, taxes long-term capital gains above $250,000 at 7%. These are newer and still being litigated in some cases, so the rules may change.

How to report capital gains on your tax return

When you sell a stock, your broker sends you a Form 1099-B showing the sale price and date. You use this to calculate your gain or loss: sale price minus purchase price (plus any fees or commissions). You then report this on Schedule D (Capital Gains and Losses) and transfer the total to your Form 1040.

If you have both short-term and long-term gains, they're reported separately on Schedule D. Short-term gains and losses are netted together, and long-term gains and losses are netted together. If you have a net loss in one category and a net gain in the other, they can offset each other.

If your total capital losses exceed your capital gains, you can deduct up to $3,000 of the net loss against ordinary income in that year. Any loss above $3,000 carries forward to future years.

Wash sale rules and tax-loss harvesting

If you sell a stock at a loss to reduce your tax bill, the IRS has a rule called the wash sale rule that can disallow the loss. If you buy the same stock (or a substantially identical one) within 30 days before or after the sale, the loss doesn't count. The holding period of the new purchase is extended to include the old one.

This rule prevents you from selling a stock at a loss in December to claim the deduction, then when ready buying it back. However, you can sell at a loss and buy a similar but different stock (like a different index fund tracking the same market) without triggering the wash sale rule. This strategy is called tax-loss harvesting.

Frequently Asked Questions

Do I owe capital gains tax if I haven't sold the stock yet?

No. Capital gains tax is owed only when you sell and realize the gain. If a stock goes up in value but you still own it, there is no tax due. The gain is "unrealized" until you sell.

What if I inherited stock — do I pay capital gains tax on it?

Not on the increase in value before you inherited it. Inherited stock gets a "step-up in basis," meaning the IRS treats the value on the date of death as your purchase price. If you sell it shortly after inheriting it, you owe tax only on gains that occurred after the person died, not before.

Can I deduct capital losses from my taxes?

Yes. Capital losses offset capital gains first. If losses exceed gains, you can deduct up to $3,000 of the net loss against ordinary income. Any remaining loss carries forward to future years and can be used the same way.

Do I pay capital gains tax on dividends?

Dividends are taxed separately from capital gains. may have access to dividends (from U.S. companies, held for a certain period) are taxed at the same 0%, 15%, or 20% rates as long-term capital gains. Non-may have access to dividends are taxed as ordinary income.

What's the difference between realized and unrealized gains?

A realized gain is a profit you've locked in by selling. An unrealized gain is a profit on paper — the stock is worth more than you paid, but you still own it. You owe tax only on realized gains.