How much is capital gains tax?
You pay tax only on the profit when you sell. Holding over 1 year usually drops the rate to 0% or 15%.
New to this?
A capital gain is the profit when you sell something you own, like stock or fund shares, for more than you paid. The tax applies only when you sell, and only to the profit. Money inside a 401(k) or IRA is not taxed this way. Anyone with a regular brokerage account will meet it.
Read first
Myth
If I sell my shares, the government takes a big cut of the whole amount.
Truth
Tax applies only to the profit, not the sale price. Priya sells $10,000 of shares she bought for $6,000. Only the $4,000 gain is taxed, and at 15% that is $600.
Worth memorizing
- 1
You are taxed on profit, not the sale.
Subtract what you paid (your cost basis) from what you sold for. Only that difference is a capital gain.
- 2
Holding more than 1 year lowers the rate.
Long-term gains are taxed at 0%, 15% or 20%. Short-term gains are taxed at your regular income tax rate.
- 3
Losses can cancel out gains.
Sell at a loss and it offsets gains. Up to $3,000 of extra loss a year can also lower your other income.
Here's what I'd do: keep long-term investing inside a 401(k) or IRA first, so selling never triggers a tax bill. In a regular account, I'd try hard to hold anything I sell for more than a year. The rate drop is large.
Do this today
Log in to your brokerage account and open the cost basis or unrealized gains page. For anything you might sell this year, note the purchase date and the gain, and mark which lots turn long-term soon.
Practice
1 of 3
You bought shares for $2,500 and sell them for $4,000 after 2 years. Your long-term rate is 15%. What is the federal tax?
The gain is $4,000 − $2,500 = $1,500. At 15%, $1,500 × 15% = $225. The tax is on the profit only.
2 of 3
You bought shares on March 3 and sell them on March 3 one year later. What kind of gain is it?
Long-term needs more than 1 year. Selling on March 4 or later would have made it long-term.
3 of 3
Which sale creates capital gains tax this year?
Only a sale for a profit in a taxable account creates a capital gain. Trades inside retirement accounts and paper gains are not taxed this way.
Tips
Check the purchase date first
Before you sell, look up when you bought. Selling one day past the 1 year mark can move a gain from your regular rate to the 15% rate or lower.
Keep records of what you paid
Your brokerage usually reports cost basis on Form 1099-B. For older shares or transferred accounts, keep your own record so you don't pay tax on money you already paid tax on.
Use retirement accounts for long holds
Trades inside a 401(k), IRA or Roth IRA don't create capital gains tax. You can rebalance there without a tax bill.
Set aside tax when you sell
Nobody withholds tax on a stock sale. Move 15% of a long-term gain, or your bracket rate on a short-term one, into savings right away.
A worked example: selling fund shares after more than a year
Priya is single with $60,000 of taxable income from her job. She sells index fund shares in a brokerage account for $10,000. She paid $6,000 for them.
- Her gain is $10,000 − $6,000 = $4,000. Only that profit is taxed.
- Her income is already past the 0% line, so a long-term gain is taxed at 15%: $4,000 × 15% = $600.
- Held 1 year or less, the gain lands in her 22% bracket: $4,000 × 22% = $880. Waiting saves $880 − $600 = $280.
- Sale price$10,000
- Cost basis−$6,000
- Capital gain=$4,000
- Tax if short-term (22%)$880
- Tax if long-term (15%)−$600
- Saved by holding over 1 year=$280
Common mistakes
Paying tax on the whole sale
Your cost basis is money you already paid tax on. If your brokerage form is missing the basis, add it yourself, or you could be taxed on the full sale price.
Selling a few days too early
One year or less is short-term. Check the purchase date for each lot before you sell, since shares bought on different dates have different holding periods.
Forgetting to set money aside
No tax is withheld on a sale. A large gain can mean a surprise bill in April, and sometimes an underpayment penalty, unless you set money aside or make an estimated payment.
Going deeper
Capital gains tax is the tax on your profit when you sell an investment for more than you paid. Hold it more than 1 year and the federal rate is 0%, 15% or 20% depending on your income; sell sooner and the profit is taxed like your paycheck.
The gain is sale price minus cost basis
Your cost basis is what you paid, including fees. If you sell for more, the difference is a capital gain. If you sell for less, it is a capital loss. Nothing is taxed until you sell.
Short-term means 1 year or less
To be long-term, you must hold the investment more than 1 year. Short-term gains are added to your other income and taxed at your regular bracket rate, which runs from 10% to 37%.
The three long-term rates
A single filer pays 0% on long-term gains while taxable income stays at or under $49,450, 15% up to $545,500, and 20% above that. For married couples filing jointly, the 0% rate runs to $98,900 and 15% runs to $613,700.
Losses lower the bill
Capital losses first offset capital gains. If losses are bigger, you can deduct up to $3,000 a year against other income ($1,500 if married filing separately) and carry the rest into future years.
When capital gains tax applies
The tax is triggered by a sale in a regular, taxable account: a brokerage account, shares you hold directly, or other property like a rental home. If your shares go up and you keep them, you owe nothing. A rise on paper is called an unrealized gain, and it is not taxed.
Accounts built for retirement work differently. Inside a 401(k), traditional IRA or Roth IRA, you can buy and sell as often as you like and no capital gains tax is due. Traditional accounts tax withdrawals later as regular income, and qualified Roth withdrawals are tax-free.
How the long-term rates stack on your income
Long-term rates depend on your taxable income, which is your income after deductions, with the gain included. Think of the gain as sitting on top of your other taxable income. The part of the gain that fits under the 0% line is taxed at 0%. The part above it is taxed at 15%, and only very high incomes reach 20%.
For 2026, the 0% line is $49,450 for single filers, $66,200 for heads of household and $98,900 for married couples filing jointly. The IRS adjusts these lines for inflation every year. If your income is low this year, for example during school or between jobs, selling long-term shares can cost nothing in federal tax.
Why short-term gains cost more
A short-term gain is treated like extra salary. If you are in the 22% bracket, a $4,000 short-term gain adds $880 to your federal tax. The same gain held more than 1 year would cost $600 at the 15% rate.
The holding period starts the day after you buy. Shares bought on March 3 and sold on March 3 the next year are still short-term. Sell on March 4 or later and the gain is long-term.
Using losses to offset gains
If you sold one investment at a $2,000 gain and another at a $2,500 loss in the same year, you have a $500 net loss. That loss can reduce your other income, like wages, which lowers your income tax.
Net losses above $3,000 are not wasted. They carry forward to future years with no time limit, where they can offset future gains or another $3,000 of income each year.
Other taxes and special cases
Higher earners may also owe the 3.8% net investment income tax. It applies when modified adjusted gross income is above $200,000 for single filers or $250,000 for married couples filing jointly.
Selling your main home has its own rule. If you owned and lived in it for at least 2 of the last 5 years, you can usually exclude up to $250,000 of gain, or $500,000 if married filing jointly. Collectibles like art and coins can be taxed at up to 28%. Many states also tax capital gains, often as regular income, so check your state's rules.
Questions people ask
Do I pay capital gains tax if I reinvest the money?
Yes, in a regular brokerage account. Selling is what triggers the tax, even if you buy something else the same day. Trades inside a 401(k) or IRA are the exception.
Do capital gains push me into a higher tax bracket?
A short-term gain adds to your regular income and can push the top slice into a higher bracket. A long-term gain counts toward your taxable income too, but it is taxed at its own 0%, 15% or 20% rates.
How do I report capital gains?
Your brokerage sends Form 1099-B early in the year. The sales go on Form 8949 and Schedule D, which tax software fills in from the 1099-B. Check that the cost basis on the form is right.
Can I avoid capital gains tax completely?
Sometimes. Long-term gains are taxed at 0% when your taxable income stays under the 0% line, and trades inside retirement accounts are not taxed. Losses can also cancel out gains in the same year.
Printable worksheet with answer key, free for classrooms. Lesson plan for this unit.
Sources
- IRS Topic 409: Capital gains and losses
- IRS Publication 550: Investment income and expenses (holding period)
- IRS Revenue Procedure 2025-32: inflation adjustments, including capital gains rate amounts
- IRS Topic 559: Net investment income tax
- IRS Topic 701: Sale of your home
Updated October 4, 2026. General education, not personalized financial, tax or legal advice. Figures are examples. Check current rates and limits before you act.
Terms on this page
Related lessons
Get your money plan by email
One step each morning: what to do, why it comes in that order, and one small thing to try. About 5 minutes. Then one short note a week. Free, unsubscribe anytime.