You owe capital gains tax when you sell a stock for more than you paid for it, and the tax is due in the year you sell

Capital gains tax is not charged while you own the stock. It only becomes due when you actually sell and lock in a profit. If you buy 100 shares at $50 per share and the price rises to $75, you have an unrealized gain of $2,500 — but you owe no tax yet. The moment you sell those shares, the $2,500 gain becomes real, and you must report it on your tax return for that year.

The tax is calculated on the difference between what you paid (your cost basis) and what you received when you sold (your sale proceeds). If you paid $5,000 total and sold for $7,500, your taxable gain is $2,500. You report this gain on your tax return, and the IRS taxes it at either the long-term or short-term capital gains rate depending on how long you held the stock.

Key Takeaways

  • Capital gains tax is owed only in the year you sell the stock, not while you own it.
  • Long-term gains (stocks held over one year) are taxed at lower rates than short-term gains, which are taxed as ordinary income.
  • You must report all stock sales on Form 8949 and Schedule D, even small ones, and your broker sends you a Form 1099-B showing the sale details.
  • Losses on stock sales can offset gains from other stocks or up to $3,000 of other income in the same year.
  • The tax is due when you file your return for the year you sold, usually by April 15 of the following year.

Long-term versus short-term capital gains rates

The rate you pay depends on how long you held the stock before selling. If you owned it for more than one year, it is a long-term capital gain and is taxed at a preferential rate: 0%, 15%, or 20%, depending on your total income for the year. These rates are much lower than ordinary income tax rates.

If you owned the stock for one year or less, it is a short-term capital gain and is taxed as ordinary income at your regular tax bracket rate, which can be as high as 37%. The holding period is measured from the day after you bought the stock to the day you sold it. If you bought on January 15 and sold on January 16 the next year, that is long-term. If you sold on January 15 the next year, it is short-term.

Your broker's records show the exact purchase and sale dates, so you do not have to calculate this yourself. However, you should verify the dates on your Form 1099-B before filing your return, because errors do happen.

How to report stock sales on your tax return

You report stock sales using two forms: Form 8949 (Sales of Capital Assets) and Schedule D (Capital Gains and Losses). Form 8949 lists each individual sale with the date bought, date sold, cost basis, and sale proceeds. Schedule D summarizes your long-term and short-term gains and losses and calculates your net capital gain or loss for the year.

Your broker sends you a Form 1099-B by January 31 showing all the sales you made in the previous year. This form includes the stock name, number of shares, sale date, and sale proceeds. You use this form to fill out Form 8949. Many tax software programs (TurboTax, H&R Block, TaxAct) can import your 1099-B data directly, which reduces the chance of entry errors.

If you sold only a few shares, you still must report each sale. There is no threshold below which you can ignore a gain. If you sold at a loss, you must report that too, because losses can reduce your tax bill.

What cost basis means and why it matters

Cost basis is the original price you paid for the stock, plus any fees or commissions. If you bought 100 shares at $50 per share and paid a $10 commission, your total cost basis is $5,010, or $50.10 per share. When you sell, you subtract this cost basis from the sale proceeds to find your gain or loss.

If you bought the same stock at different times and prices, you need to track which shares you sold. If you bought 50 shares at $40 and 50 shares at $60, and you sell 50 shares for $70, your gain depends on which batch you sold. Most brokers use the first-in, first-out (FIFO) method by default, meaning they assume you sold the oldest shares first. You can request a different method (like specific identification) if it lowers your tax, but you must tell your broker in writing before you sell.

Your broker tracks cost basis and reports it on your 1099-B. If you bought the stock through a different broker or years ago, you may need to find old statements to confirm the original price. Keep all purchase confirmations and statements for at least three years after you file your return.

Using losses to reduce your tax bill

If you sold a stock for less than you paid, you have a capital loss. You can use this loss to offset capital gains from other stocks sold in the same year. If you sold one stock for a $3,000 gain and another for a $2,000 loss, your net gain is $1,000, and you are taxed on only $1,000.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against other income (wages, interest, dividends). Any loss beyond $3,000 carries forward to future years and can be used to offset future gains or income. This is called loss carryforward. If you had a $10,000 loss this year and only $3,000 in gains, you can deduct $3,000 of the loss this year and carry the remaining $7,000 forward to next year.

To use losses, you must report them on Form 8949 and Schedule D just as you report gains. Do not skip reporting a loss because it is small or because you are embarrassed about the trade. The IRS matches your 1099-B forms to your return, and unreported sales can trigger an audit notice.

Timing: when the tax is actually due

The tax is due when you file your income tax return for the year in which you sold the stock. If you sold shares in 2024, you report the gain on your 2024 tax return, which is due by April 15, 2025. You do not pay the tax when you sell the stock; you pay it when you file your return.

If you expect a large capital gains tax bill, you may want to make estimated tax payments during the year to avoid a penalty. The IRS charges a penalty if you owe more than $1,000 in taxes when you file and did not pay enough through withholding or estimated payments. Talk to a tax professional if you sold a large position and are unsure whether you need to make estimated payments.

If you file your return late, the tax is still due by the original important date (April 15), and you will owe interest and penalties on any unpaid amount. Filing an extension (Form 4868) gives you until October 15 to file, but it does not extend the tax payment important date.

State and local taxes on capital gains

In addition to federal capital gains tax, most states tax capital gains as income. The state rate varies widely: some states have no capital gains tax (like Florida, Texas, and Wyoming), while others tax gains at the same rate as ordinary income. A few states (like California and New York) have separate capital gains tax rates or brackets.

You report state capital gains on your state income tax return, usually using a schedule similar to Schedule D. Your state tax return is due on the same date as your federal return (April 15 or October 15 if you filed an extension). If you moved to a different state during the year you sold the stock, you may owe tax to both states, and you may be able to claim a credit on one return for taxes paid to the other.

Frequently Asked Questions

Do I owe capital gains tax if I sell a stock at a loss?

No, you do not owe tax on a loss. Instead, you can use the loss to reduce gains from other stocks or up to $3,000 of other income. Any loss beyond that carries forward to future years. You still must report the loss on Form 8949 and Schedule D.

What if I inherited stock and then sold it?

Inherited stock receives a "stepped-up basis," meaning your cost basis is the stock's value on the date of death, not what the original owner paid. If the stock was worth $100 on the death date and you sold it for $110 a month later, your gain is only $10. This can save you significant tax on inherited positions.

Do I owe capital gains tax on dividends?

Dividends are taxed separately from capital gains. may have access to dividends are taxed at the same preferential rates as long-term capital gains (0%, 15%, or 20%). Non-may have access to dividends are taxed as ordinary income. You report dividends on Schedule B and Form 1040, not on Schedule D.

Can I avoid capital gains tax by not selling?

Yes. As long as you own the stock, you owe no capital gains tax, even if the price rises significantly. The tax is only triggered when you sell. However, holding a losing position to avoid selling at a loss is usually not a good financial strategy.

What happens if I do not report a stock sale?

Your broker reports the sale to the IRS on Form 1099-B. If you do not report it on your return, the IRS will likely send you a notice of underreported income. You will owe the tax plus interest and penalties. It is always better to report the sale, even if you cannot pay the full tax when ready.