Yes, you pay taxes on stocks — but the amount depends on how long you held them and what type of income they generated

The IRS taxes two things that happen with stocks: the profit you make when you sell them, and the dividends some stocks pay you while you own them. The tax rate on your profit changes based on how long you held the stock before selling. Dividends are taxed differently depending on whether the company classifies them as ordinary or may have access to. You do not owe tax straightforward for owning a stock that goes up in value — only when you sell it or receive a dividend payment.

Key Takeaways

  • Capital gains tax applies to the profit you make when you sell a stock for more than you paid for it, and the rate depends on whether you held it for less than a year or more than a year.
  • Short-term capital gains (stocks held under one year) are taxed as ordinary income at your regular tax bracket rate, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37%.
  • Long-term capital gains (stocks held over one year) are taxed at 0%, 15%, or 20% depending on your income level, which is usually lower than your ordinary income tax rate.
  • may have access to dividends are taxed at the same 0%, 15%, or 20% long-term rate, while ordinary dividends are taxed as regular income at your full tax bracket rate.
  • You report stock sales on Schedule D and dividends on Schedule B when you file your tax return, and your brokerage sends you a Form 1099-B or 1099-DIV showing what you earned.

How capital gains tax works when you sell a stock

A capital gain is the profit you make when you sell a stock for more than you paid for it. If you bought 100 shares at $10 per share and sold them at $15 per share, your capital gain is $500 (before accounting for any fees). The IRS taxes this profit, but the tax rate depends on how long you owned the stock before selling.

The holding period matters because the tax code treats short-term and long-term gains differently. If you held the stock for one year or less, it is a short-term capital gain. If you held it for more than one year, it is a long-term capital gain. The difference in tax rates can be significant — short-term gains are taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your income. Long-term gains are taxed at a lower rate: 0%, 15%, or 20%, also based on your income level.

Short-term capital gains: stocks you sell within a year

When you sell a stock you have owned for one year or less, the profit is taxed as short-term capital gain. This means it is added to your other income for the year and taxed at your ordinary income tax bracket. If you earn $50,000 in salary and have a $5,000 short-term capital gain, the IRS treats it as if you earned $55,000 total.

Your ordinary income tax bracket in 2024 depends on your total income and filing status. For a single filer, the brackets are 10%, 12%, 22%, 24%, 32%, 35%, and 37%. A married couple filing jointly has different income thresholds for each bracket. Short-term capital gains do not get any preferential treatment — they are straightforward added to your income and taxed at whatever rate applies to your total earnings.

Long-term capital gains: stocks you hold for more than a year

If you hold a stock for more than one year before selling, your profit is a long-term capital gain and receives preferential tax treatment. Instead of being taxed at your ordinary income rate, long-term gains are taxed at 0%, 15%, or 20% depending on your income level. These rates are much lower than ordinary income brackets for most people.

The 0% rate applies to long-term gains if your total income falls below a certain threshold — $47,025 for single filers and $94,050 for married couples filing jointly in 2024. The 15% rate applies to income above those thresholds up to higher limits — $518,900 for single filers and $583,750 for married couples in 2024. Anything above those limits is taxed at 20%. These income thresholds change each year, so check the current year's rates when you file.

How dividend taxes work

Some stocks pay dividends — cash payments the company distributes to shareholders, usually quarterly. The tax you owe on dividends depends on whether they are classified as ordinary or may have access to. Your brokerage statement and the Form 1099-DIV you receive will specify which type each dividend is.

may have access to dividends are taxed at the same preferential rates as long-term capital gains: 0%, 15%, or 20%. To may have access to for this treatment, you must have owned the stock for at least 60 days during the 121-day period centered on the dividend payment date. Most dividends from U.S. companies and certain foreign companies meet this test if you hold the stock long enough.

Ordinary dividends are taxed at your full ordinary income tax rate, the same as short-term capital gains. These include dividends from real estate investment trusts (REITs), master limited partnerships (MLPs), and some other investments. Your 1099-DIV will separate may have access to and ordinary dividends, so you know which rate applies to each.

Losses and how they offset gains

If you sell a stock for less than you paid for it, you have a capital loss. Capital losses can offset capital gains dollar-for-dollar. If you sold one stock for a $3,000 gain and another for a $2,000 loss in the same year, you would report a net gain of $1,000 and owe tax only on that amount.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the net loss against your ordinary income. Any losses beyond $3,000 carry forward to future years, so you can use them to offset gains or income in later tax years. This is why some investors track their losses carefully — they can reduce your tax bill in years when you have large gains.

What forms you need and how to report stock income

Your brokerage sends you a Form 1099-B for stock sales and a Form 1099-DIV for dividends. The 1099-B shows the proceeds from each sale (the amount you received), and you use it to calculate your gain or loss. The 1099-DIV breaks down may have access to and ordinary dividends separately.

You report capital gains and losses on Schedule D of your tax return. You list each sale, the date you bought it, the date you sold it, your cost basis (what you paid), the sale proceeds, and your gain or loss. The form automatically calculates your net short-term and long-term gains or losses. You then transfer the totals to your main tax return (Form 1040).

Dividends go on Schedule B if you have more than $1,500 in dividend income. If you have less, you can report them directly on Form 1040. The schedule separates may have access to and ordinary dividends so they are taxed at the correct rates.

Frequently Asked Questions

Do I owe taxes if my stock goes up but I do not sell it?

No. You only owe tax when you sell the stock or receive a dividend. An unrealized gain — a stock that is worth more than you paid but you still own — is not taxed. You could hold a stock that doubled in value and owe nothing until you sell it or it pays a dividend.

What if I sell a stock at a loss?

Capital losses reduce your taxable gains dollar-for-dollar. If you have no gains to offset, you can deduct up to $3,000 of net losses against your ordinary income in that year. Any remaining losses carry forward to future years and can offset gains or income then.

Are dividends from all stocks taxed the same way?

No. may have access to dividends from most U.S. stocks are taxed at 0%, 15%, or 20%. Ordinary dividends from REITs, master limited partnerships, and some other investments are taxed at your full ordinary income rate. Your 1099-DIV shows which type each dividend is.

How do I know my cost basis for calculating gains?

Your brokerage tracks this and reports it on your 1099-B. If you bought shares at different times or prices, you can choose which shares to sell — average cost, first-in-first-out (FIFO), or specific identification. Tell your brokerage which method you want before you sell, and they will calculate the basis accordingly.

Do I have to pay estimated taxes on stock gains during the year?

If you expect to owe more than $1,000 in taxes from stock sales or other income beyond what your employer withholds, you may need to make quarterly estimated tax payments. The IRS has a worksheet to calculate whether you need to do this. Underpayment can result in a penalty, so check if you have large gains expected.