How Stocks Are Taxed in the US: A Plain-English Guide
How the IRS taxes stocks: short vs long-term capital gains, 2026 brackets, qualified dividends, the 3.8% NIIT, cost basis, and Form 1099-B, with worked examples.
In the United States, owning a stock is not a taxable event. You owe federal tax in two situations: when you sell shares for more than you paid (a capital gain), and when the company pays you a dividend.
In short: a gain on shares held one year or less is taxed like wages. A gain on shares held more than one year, and most dividends from ordinary US companies, get lower rates of 0%, 15%, or 20%. Higher earners can owe an extra 3.8% net investment income tax on top. Shares inside a 401(k) or IRA follow different rules entirely.
This guide covers the federal rules for the 2026 tax year, as of November 2026, using IRS publications and revenue procedures by name. States add their own tax, and most of them tax capital gains as ordinary income.
The two ways stocks create taxable income
Capital gains and losses
When you sell shares, the IRS compares two numbers:
- Cost basis: what you paid for the shares, including commissions and fees.
- Amount realized: what you received, minus selling costs.
Amount realized minus basis is your capital gain (if positive) or capital loss (if negative). Nothing is owed while you hold the shares, no matter how much the price rises. The gain is “unrealized” until you sell. This is why the timing of a sale matters so much.
Dividends
A dividend is cash a company pays out of its profits, explained in how dividends work. Dividends are taxable in the year you receive them, even if your broker automatically reinvests them in more shares. A reinvested dividend is treated as if you received the cash and then bought new shares, so each reinvestment also creates a new tax lot with its own basis.
Short-term vs long-term
The holding period decides the tax rate on a gain. According to IRS Topic No. 409, Capital Gains and Losses:
- Short-term: shares held one year or less. The gain is taxed at your ordinary income rate, the same as your salary.
- Long-term: shares held more than one year. The gain gets the preferential 0%, 15%, or 20% rates.
The holding period starts the day after you buy and includes the day you sell. Buying on March 3, 2025 and selling on March 3, 2026 is exactly one year, which is still short-term. Selling on March 4, 2026 makes it long-term. The trade date counts, not the settlement date (see how a stock trade settles for why those differ).
2026 long-term capital gains rates
These thresholds come from IRS Revenue Procedure 2025-32, which set the inflation-adjusted figures for the 2026 tax year. They apply to your taxable income (after deductions), including the gain itself.
| Rate | Single | Married filing jointly | Head of household | Married filing separately |
|---|---|---|---|---|
| 0% | up to $49,450 | up to $98,900 | up to $66,200 | up to $49,450 |
| 15% | $49,451 to $545,500 | $98,901 to $613,700 | $66,201 to $579,600 | $49,451 to $306,850 |
| 20% | over $545,500 | over $613,700 | over $579,600 | over $306,850 |
2026 ordinary income brackets
Short-term gains and non-qualified dividends are taxed at these rates, also from Revenue Procedure 2025-32.
| Rate | Single | Married filing jointly |
|---|---|---|
| 10% | $0 to $12,400 | $0 to $24,800 |
| 12% | $12,401 to $50,400 | $24,801 to $100,800 |
| 22% | $50,401 to $105,700 | $100,801 to $211,400 |
| 24% | $105,701 to $201,775 | $211,401 to $403,550 |
| 32% | $201,776 to $256,225 | $403,551 to $512,450 |
| 35% | $256,226 to $640,600 | $512,451 to $768,700 |
| 37% | over $640,600 | over $768,700 |
For the 2026 tax year the standard deduction is $16,100 for single filers and $32,200 for married couples filing jointly, per the same revenue procedure.
How the 2025 law affected these numbers
The One Big Beautiful Bill Act (Public Law 119-21, signed July 4, 2025) made the seven ordinary income rates from the 2017 tax law permanent, so the 10% to 37% structure above did not expire after 2025 as previously scheduled. It did not change the 0%, 15%, and 20% long-term capital gains rates or the 3.8% net investment income tax. It added some new deductions that can lower taxable income, such as an extra $6,000 deduction for people 65 and older for 2025 through 2028 (phasing out above $75,000 of modified adjusted gross income, or $150,000 for joint filers). A lower taxable income can push more of a gain into the 0% band.
Qualified vs ordinary dividends
Dividends come in two tax flavors, and your Form 1099-DIV separates them.
- Qualified dividends (box 1b) are taxed at the same 0%, 15%, or 20% rates as long-term gains.
- Ordinary (non-qualified) dividends are taxed at your ordinary income rate.
To be qualified, a dividend generally has to come from a US corporation or a qualified foreign corporation, and you have to meet a holding period. IRS Publication 550 says you must have held the stock “for more than 60 days during the 121-day period that begins 60 days before the ex-dividend date.” Count the day you sold but not the day you bought.
In practice, ordinary dividends that are not qualified often come from:
- shares bought shortly before the ex-dividend date and sold soon after,
- most real estate investment trust (REIT) distributions,
- money market funds and bond funds (which pay interest-like distributions),
- some foreign companies that do not meet the qualified foreign corporation tests.
For more on how dividend income compares with growth, see dividend investing explained.
The 3.8% net investment income tax
The net investment income tax (NIIT) is a separate 3.8% tax. According to IRS Topic No. 559, it applies to the lesser of:
- your net investment income, or
- the amount by which your modified adjusted gross income (MAGI) exceeds a threshold.
| Filing status | MAGI threshold |
|---|---|
| Single or head of household | $200,000 |
| Married filing jointly | $250,000 |
| Married filing separately | $125,000 |
Net investment income includes dividends, interest, and net gains from selling stocks, bonds, and funds. It does not include wages or distributions from qualified retirement plans and IRAs. These thresholds are written into the law as fixed dollar amounts and are not indexed for inflation, so more people cross them each year. The tax is reported on Form 8960.
The practical top federal rate on long-term gains and qualified dividends is therefore 20% + 3.8% = 23.8%, and on short-term gains it is 37% + 3.8% = 40.8%.
Cost basis and how your broker reports it
Your broker sends Form 1099-B after year end. It lists each sale with proceeds, dates, and, for “covered” securities, your cost basis. Brokers have been required to report basis for most stock bought on or after January 1, 2011, and for mutual fund and dividend reinvestment shares bought on or after January 1, 2012. For older or transferred-in shares, basis may be blank, and it is your job to supply it.
When you own several lots of the same stock bought at different prices, which lot you sell matters:
- First in, first out (FIFO) is the default if you do not choose. The oldest shares are treated as sold first.
- Specific identification lets you name the exact lot, as long as you tell the broker at the time of the sale.
- Average cost is allowed for mutual fund and certain dividend reinvestment shares, not individual stocks.
Basis is also adjusted by events such as stock splits, which divide your basis across more shares without changing the total.
Losses: offsetting and the $3,000 limit
Losses are netted against gains. Short-term losses first offset short-term gains, long-term losses offset long-term gains, and any remaining net loss in one category offsets net gain in the other. If you still have a net capital loss, IRS Topic No. 409 says you can deduct up to $3,000 of it against other income per year ($1,500 if married filing separately). The rest carries forward to future years with no expiry.
One trap: if you sell at a loss and buy the same or a substantially identical stock within 30 days before or after the sale, the wash-sale rule disallows the loss for now. The mechanics, and how they differ from Canada’s version, are in wash sale and superficial loss rules.
Where it goes on your return
- Form 8949: each sale, split into short-term and long-term parts.
- Schedule D: totals Form 8949 and carries the net gain or loss to Form 1040.
- Form 1040, lines 3a and 3b: qualified and ordinary dividends.
- Form 8960: the net investment income tax, if it applies.
- Schedule B: required if your ordinary dividends or interest exceed $1,500.
Worked example 1: a typical year
A single filer has a $95,000 salary in 2026 and takes the $16,100 standard deduction, leaving $78,900 of taxable wages. Her brokerage account produced:
- $2,000 of qualified dividends,
- $300 of ordinary dividends from a REIT,
- a $10,000 long-term gain on shares held three years,
- a $1,500 short-term gain on shares held five months.
Ordinary income: $78,900 + $300 + $1,500 = $80,700. That falls in the 22% bracket ($50,401 to $105,700).
Preferential income: $2,000 + $10,000 = $12,000.
Total taxable income: $80,700 + $12,000 = $92,700. Since that is above $49,450 and below $545,500, the whole $12,000 is taxed at 15%.
Federal tax caused by her investments:
- Short-term gain and REIT dividends: $1,800 × 22% = $396
- Long-term gain and qualified dividends: $12,000 × 15% = $1,800
- Total: $2,196
Her MAGI is about $108,800, well under $200,000, so no NIIT applies. If she had sold the short-term position a few months later, after holding it more than a year, that $1,500 would have been taxed at 15% instead of 22%, saving $105.
Worked example 2: how gains “stack” on the 0% band
Long-term gains sit on top of ordinary income. A single retiree has $40,000 of ordinary taxable income and a $20,000 long-term gain, for $60,000 of taxable income.
- The 0% band runs up to $49,450. Ordinary income uses the first $40,000 of it.
- Room left at 0%: $49,450 - $40,000 = $9,450 of the gain is taxed at 0%.
- The remaining $20,000 - $9,450 = $10,550 is taxed at 15%: $1,582.50.
Someone with lower ordinary income could realize more gain at 0%. This is why some people spread large sales across tax years.
Worked example 3: the NIIT
A single filer has a MAGI of $260,000, which includes $30,000 of dividends and gains.
- MAGI over threshold: $260,000 - $200,000 = $60,000
- Lesser of $60,000 and $30,000: $30,000
- NIIT: $30,000 × 3.8% = $1,140, on top of regular income tax.
Worked example 4: choosing a lot
You bought 50 shares at $100 in June 2021 and 50 more at $160 in February 2026. In October 2026 you sell 50 shares at $150.
- FIFO: the 2021 lot is sold. Gain: 50 × ($150 - $100) = $2,500 long-term.
- Specific identification of the 2026 lot: loss of 50 × ($150 - $160) = $500 short-term.
Same sale, same price, very different tax result. You can only use specific identification if you designate the lot with your broker when you sell, not afterward.
What can go wrong
- Selling one day too early. A sale on the one-year anniversary is still short-term.
- Missing basis. Shares transferred between brokers, inherited, or received as gifts may show no basis on the 1099-B. Without your own records, the IRS can treat the whole sale as gain. Inherited shares generally get a basis equal to their value on the date of death; gifted shares generally keep the giver’s basis.
- Double-counting reinvested dividends. Reinvested dividends were already taxed. Forgetting to add them to basis means paying tax on them again when you sell.
- Assuming dividends are qualified. Check box 1b of your 1099-DIV, not box 1a.
- Overlooking state tax. A 15% federal rate can become 20% or more once state tax is added.
- Ignoring the NIIT threshold. A one-time large sale can push MAGI over $200,000 in a single year.
- Using last year’s numbers. Brackets change every year. Check the IRS revenue procedure for the year you are filing.
The short version
Stocks are taxed when you sell at a gain and when you receive dividends. For the 2026 tax year, gains on shares held one year or less are taxed at ordinary rates from 10% to 37%, while gains on shares held longer, and qualified dividends, are taxed at 0%, 15%, or 20% depending on taxable income. The 3.8% NIIT applies above $200,000 of MAGI for single filers and $250,000 for joint filers. Your broker reports sales on Form 1099-B, but you are responsible for the right basis and for choosing lots. Shares inside retirement accounts are covered in US retirement accounts explained.
This is general education, not tax or legal advice. Tax rules depend on your circumstances and change every year. For decisions about your own return, consult a qualified tax professional or the IRS directly.
Related: How stocks are taxed in Canada · US retirement accounts explained · Wash sale and superficial loss rules · How dividends work
Stay in the loop
New explainers, by email
One short email when a new plain-English explainer goes up. No price tips, no "next 100x coin", no selling your address. Unsubscribe any time.