Lesson 7.1 · 1 of 5 · Tax, pensions and protection where you live
Capital gains tax on stocks in the US: rates and examples
In the US you pay federal tax on a stock only when you sell it at a profit. Held for one year or less, the gain is taxed like your salary, at 10% to 37%. Held for more than a year, it is taxed at 0%, 15% or 20%, depending on your taxable income.
Terms in this lesson
- Capital gain
- The difference between the price you sell at and the price you bought at.
- Broker
- The firm through which you buy and sell stocks, ETFs and other investments.
- ETF
- A fund listed on the stock exchange that buys dozens or hundreds of companies at once.
Opening question
You live in the US. You bought shares for $5,000 and sold them 8 months later for $7,000. What does the IRS tax?
Only the profit is taxed, not the whole sale. Shares held for one year or less give a short-term gain, taxed at the same rates as your salary. Leaving the cash in the brokerage account changes nothing: the sale is what counts.
It does not matter if you get it wrong: trying first helps you remember.
How capital gains on stocks are taxed in the US
Definition
What is a capital gain?
Sale price minus what you paid, including fees.
What you paid is your cost basis. Sell for more and you have a capital gain; sell for less and you have a capital loss. While you hold the shares, nothing is taxed, however much they rise. How long you held them decides the rate.
- Held one year or lessshort-term gain: taxed as ordinary income, 10% to 37%
- Held more than one yearlong-term gain: 0%, 15% or 20%
- High income on topa further 3.8% net investment income tax may apply
| Long-term rate (2026) | Single: taxable income | Married filing jointly |
|---|---|---|
| 0% | up to $49,450 | up to $98,900 |
| 15% | up to $545,500 | up to $613,700 |
| 20% | above that | above that |
Taxable income is your income after deductions (the 2026 standard deduction for a single filer is $16,100). Your long-term gains sit on top of your other income, so part of a gain can fall in one band and part in the next. At 29 October 2026, the IRS had not yet published the 2027 thresholds.
Work it out
2026, single filer. Your taxable income from your job is $45,000. You also sell shares held for three years at a $10,000 gain. In 2026 the 0% rate covers taxable income up to $49,450 and 15% applies above it. How much federal tax do you pay on the gain?
A hint
The gain sits on top of your $45,000. How much of it fits under $49,450?
How sure are you?
Your total taxable income is $55,000. The first $4,450 of the gain fits under $49,450 and is taxed at 0%. The other $5,550 is taxed at 15%: 5,550 × 0.15 = $832.50. Not all of the gain jumps to 15%; only the part above the threshold does.
US broker or foreign broker: what changes for your taxes
US brokerthe usual choice for US residents
- you give it a Form W-9 with your Social Security number
- it sends you Form 1099-B with your sales, cost basis and holding period
- it reports the same figures to the IRS
- without a W-9 it must hold back 24% of some payments (backup withholding)
Foreign brokerrare, and many refuse US clients
- the tax rates on your gains are the same
- usually no 1099-B: you work out every cost basis yourself
- you file an FBAR once your foreign accounts together exceed $10,000 at any time in the year
- you may also need Form 8938 (single filers living in the US: once foreign assets pass $50,000 at year end, or a higher amount during the year)
- funds based outside the US, such as European ETFs, are usually treated as a PFIC, with harsh tax rules and Form 8621
Check yourself
You live in the US. In March your account at a broker in Germany holds $12,000. By December it has fallen to $8,000, and you have no other foreign accounts. With the 2026 rule (an FBAR is due once your foreign accounts together exceed $10,000 at any time in the year), do you file an FBAR?
The FBAR test looks at the highest combined value at any time in the year, not the year-end balance. A foreign brokerage account counts as a financial account. The FBAR is filed online with FinCEN, separately from your tax return.
Ready to start?
And inside a 401(k) or an IRA?
Selling inside the account is not taxed.
In a regular taxable brokerage account, every profitable sale counts in that year. In a 401(k), a traditional IRA or a Roth IRA, you can sell and buy inside the account without a tax bill; tax applies (or not, for a qualified Roth withdrawal) when money comes out. The next lessons cover these accounts.
Capital losses, the wash sale rule and Form 8949
- Losses first cancel gainsshort-term losses against short-term gains, long-term against long-term, then the rest against each other.
- Then up to $3,000 a year off other incomeif losses are bigger than gains, you deduct up to $3,000 ($1,500 if married filing separately) from your salary and other income.
- The rest carries forwardunused losses move to the next year, and the year after, until they are used up.
Work it out
2026, single filer. You have $2,000 of capital gains and $9,000 of capital losses. The yearly limit for deducting net losses from other income is $3,000. How much loss carries forward to 2027?
This exercise is in the free account, where we also save your progress.
Create a free accountWatch out
What is the wash sale rule?
Buy the same shares back within 30 days and the loss is put on hold.
If you sell at a loss and buy the same or “substantially identical” shares within 30 days before or after the sale, you cannot deduct the loss now. It is added to the cost basis of the new shares, so you get it back when you sell them. The rule also counts purchases in your IRA or Roth IRA, and there the loss is lost for good. Your broker only tracks wash sales inside one account.
Myth or fact?
“If I sell a stock at a loss on 1 December and buy it back on 10 December, I can still deduct the loss this year.”
This exercise is in the free account, where we also save your progress.
Create a free accountDefinition
How do you report it?
Form 1099-B in, Form 8949 and Schedule D out.
Early in the year your broker sends Form 1099-B. Each sale goes on Form 8949, and the totals go on Schedule D of Form 1040. If the 1099-B shows the basis was reported to the IRS and nothing needs adjusting, you can enter the totals straight on Schedule D. See also how to report investment income on your tax return.
Compare
2026. You are single, your salary puts you in the 22% bracket, and long-term gains would be taxed at 15%. Which sale leaves you with more money after federal tax?
This exercise is in the free account, where we also save your progress.
Create a free accountWhat would you do?
Your shares are up $6,000 after 10 months. In two months the gain would become long-term. What do you do?
This exercise is in the free account, where we also save your progress.
Create a free accountWhat you learned
- Gains are taxed only when you sell: held one year or less as ordinary income, held longer at 0%, 15% or 20%.
- Net losses cut up to $3,000 a year off other income, the rest carries forward, and buying back within 30 days triggers the wash sale rule.
- A US broker sends you Form 1099-B; a foreign account adds FBAR and Form 8938 duties and possible PFIC rules.
You reached the end
Keep what you learned
With a free account we remember your lessons, bring back the questions you got wrong exactly when you need them and keep your streak.
Save your progress with a free accountLessons are educational. They are not a recommendation to buy or sell. Investing involves risk and you can lose money. Sources: IRS Revenue Procedure 2025-32 (2026 thresholds), IRS Topic 409 and Topic 559, Instructions for Schedule D and Form 1099-B, IRS comparison of Form 8938 and FBAR, IRS backup withholding page, IRS Form 8621; checked on 29 October 2026.