Capital Gains Tax on Stocks: 2026 Rates, Rules and Examples
When you sell a stock for more than you paid, the profit is a capital gain. Learn short-term vs. long-term rates, the 2026 0%, 15% and 20% brackets, losses, the wash sale rule and forms.

When you sell a stock for more than you paid, the profit is a capital gain, and it is taxable. When you sell for less, you have a capital loss, which can lower your taxes. How much tax you pay depends mostly on how long you held the stock.
Gains inside retirement accounts such as a 401(k) or IRA are not taxed this way; see Roth IRA vs. traditional IRA and what a 401(k) is.
Short-term vs. long-term capital gains
- Long-term: you held the stock for more than one year before selling. Long-term gains get lower tax rates: 0%, 15% or 20%.
- Short-term: you held it for one year or less. Short-term gains are taxed at your regular income tax rate.
To count the holding period, start the day after you bought the shares; the day you sell counts. Holding a stock just a little longer to cross the one-year line can make a big difference in tax.
2026 long-term capital gains tax brackets
Your rate depends on your taxable income. For tax year 2026:
Filing status | 0% rate up to | 15% rate up to | 20% rate above |
|---|---|---|---|
Single | $49,450 | $545,500 | $545,500 |
Married filing jointly | $98,900 | $613,700 | $613,700 |
Head of household | $66,200 | $579,600 | $579,600 |
Married filing separately | $49,450 | $306,850 | $306,850 |
Source: IRS Revenue Procedure 2025-32. These figures apply to tax year 2026 (returns filed in 2027).
The extra 3.8% net investment income tax
Higher earners may also owe the net investment income tax (NIIT) of 3.8% on investment income such as capital gains. It applies when modified adjusted gross income is above $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately).
How to calculate your gain
Capital gain = sale proceeds − cost basis
Your cost basis is generally what you paid for the shares plus costs such as commissions. Example: you bought 50 shares at $40 ($2,000) and sold them two years later at $60 ($3,000). Your long-term gain is $1,000.
If you bought the same stock at different prices, our average stock price calculator helps you see your average cost per share.
Capital losses can lower your tax
- Losses first offset your gains.
- If losses are larger than gains, you can deduct up to $3,000 a year from other income ($1,500 if married filing separately).
- Any loss above that carries forward to future years.
Watch out for the wash sale rule
You cannot deduct a loss if, within 30 days before or after the sale, you buy substantially identical stock, including in your IRA. The disallowed loss isn’t gone forever: it is added to the cost basis of the new shares.
The tax forms you will see
- Form 1099-B: your broker reports your sales, and usually your cost basis, to you and the IRS.
- Form 8949: where you list your sales.
- Schedule D (Form 1040): where the totals are summarized.
Dividends are taxed under separate rules; see what dividend stocks are.
Frequently asked questions
How long do I have to hold a stock to pay less tax?
More than one year. Gains on stock held longer than a year are long-term and taxed at 0%, 15% or 20%.
Do I pay capital gains tax if I don’t sell?
No. Gains are generally taxed only when you sell. Rising prices on shares you still own are “unrealized” gains.
Can I pay 0% tax on stock gains?
Yes, if your taxable income is within the 0% bracket, such as up to $49,450 for single filers in 2026, your long-term gains in that range are taxed at 0%.
How much of a stock loss can I deduct?
Losses offset gains first; beyond that, up to $3,000 a year ($1,500 if married filing separately), with the rest carried forward.
This guide is for education only and is not tax advice. Tax rules are complex; check IRS.gov or a tax professional for your situation.