Guide · Taxes & Tax Planning
Capital Gains, Dividends, and Investment Taxes Explained
How capital gains, dividends and interest are taxed in 2026, with rate tables, loss rules, wash sales, the 3.8% NIIT and New York notes.
Investments can be taxed in three main ways. When you sell something for a profit, you have a capital gain, while dividends and interest are paid to you as you hold the investment. The tax rate on each depends on how long you held it, what kind of income it is, and your total taxable income.
1. What is a capital gain?
A capital gain is the profit you make when you sell an investment for more than you paid. The tax law calls the thing you sell a capital asset. That covers almost anything you own as an investment, like stocks, funds, bonds or a home.
What you paid is your cost basis, which you can think of as your starting line. Your basis is the price you paid plus fees, adjusted for things like reinvested dividends and stock splits. Your proceeds are what you get when you sell, minus selling fees.
Rosa buys 20 shares for $100 each, so her basis is $2,000. When she later sells them for $2,700, her capital gain is $700. If she had sold for $1,500, she would have a capital loss of $500.
2. You only owe tax when you sell
A rising price is not taxed by itself. If Rosa's shares grow to $2,700 and she just holds on, the $700 is an unrealized gain, a gain on paper only.
When she sells, it becomes a realized gain, and it goes on that year's tax return. The same goes for losses: a red number in your app is not a tax deduction until you sell.
The account matters too. Buying and selling inside a 401(k), IRA or Roth IRA creates no capital-gains tax. Those accounts have their own rules for when you take money out. Everything in this guide is about a regular taxable brokerage account, the kind with no special tax status.
3. Short-term vs. long-term gains
How long you owned the investment before selling is your holding period. It sorts every gain into one of two groups:
- Short-term: you held it one year or less. The gain is taxed at ordinary rates, the same brackets as your paycheck (10% up to 37% federally).
- Long-term: you held it more than one year. The gain gets lower federal rates of 0%, 15% or 20%.
Your holding period starts the day after you buy. So shares bought on March 10, 2025 become long-term if you sell on March 11, 2026 or later.
Here's what that can be worth. Diego is in the 24% federal bracket and has a $1,000 gain. If he sells after eight months, he owes about $240 in federal tax. If he waits past one year, the rate drops to 15%, and he owes about $150.
4. The 2026 long-term rates
Your long-term rate depends on your taxable income, which is your income after deductions (the number the tax brackets are applied to). It also depends on your filing status, the category you file under, such as single or married filing jointly.
Your salary alone won't tell you your rate. What counts is your taxable income with the gain included.
| Filing status (2026) | 0% rate if taxable income is 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 |
These lines are for 2026. The IRS updates them each fall for the next year.
How a gain stacks on top of your other income
Your gain sits on top of your other taxable income, so part of one gain can fall in the 0% band and part in the 15% band.
Carmen is single, and in 2026 her taxable income from her job is $40,000. She sells fund shares she has held for three years for a $15,000 long-term gain, which brings her taxable income to $55,000.
The 0% rate covers income up to $49,450, so the first $9,450 of her gain is taxed at 0%. The other $5,550 is taxed at 15%, which is $832.50. Her federal tax on a $15,000 gain is about $833, not $2,250.
Assets with their own rates
Two kinds of long-term gains have higher top rates:
- Collectibles, like art, coins and gold, are taxed at up to 28%. Many gold funds that hold physical metal count as collectibles too.
- Rental real estate gain that comes from past depreciation deductions is taxed at up to 25%. Depreciation is the yearly write-off landlords take for wear on a building.
5. Dividends and interest
A dividend is a payment a company or fund makes to its owners. There are two kinds:
- Qualified dividends get the same 0%, 15% and 20% rates as long-term gains. Most dividends from U.S. companies qualify. You must have owned the stock more than 60 days during the 121-day window around the ex-dividend date. That's the cutoff date for getting the next payout.
- Nonqualified dividends are everything else, such as most payouts from real estate investment trusts (REITs) and money market funds. These are taxed at ordinary rates. (Your Form 1099-DIV lists all dividends as "ordinary dividends" and shows the qualified part on its own line.)
Reinvesting doesn't change any of this. Even if a dividend buys more shares on its own, it still counts as income that year. The good news is that each reinvested dividend adds to your basis, so you won't pay tax on it again when you sell.
Interest from savings accounts, CDs and most bonds is taxed at ordinary rates, just like your paycheck. Interest from U.S. Treasury bills, notes and bonds is taxed federally but is free from state and local income tax. Interest from most municipal bonds is free from federal income tax.
Mutual funds add one more twist. When a fund sells holdings at a profit, it must pass those gains to you as a capital gain distribution, often in December. You owe tax on it even if you never sold a share. Index funds and ETFs tend to pay out less of these than actively managed funds.
6. Losses and how they offset gains
Losses are useful. At tax time, you net them against your gains:
- Short-term losses offset short-term gains, and long-term losses offset long-term gains.
- Any loss left on one side then offsets gains on the other side.
- If your losses are bigger than all your gains, you can subtract up to $3,000 a year ($1,500 if married filing separately) from your other income, like wages.
- Anything left over is a carryforward. It rolls into next year and follows the same steps, with no time limit.
Priya has $5,000 of gains and $2,000 of losses in 2026. Her net gain is $3,000. If she had $7,000 of losses instead, she would have a $2,000 net loss. She could subtract all $2,000 from her wages.
Selling losing investments on purpose to lower your tax is called tax-loss harvesting. It works, as long as you avoid the wash-sale rule.
7. The wash-sale rule
A wash sale happens when you sell an investment at a loss and buy the same or a substantially identical one within 30 days before or after the sale. Substantially identical means essentially the same investment, such as the same stock or the same fund. Counting the sale day, that's a 61-day window.
If you make a wash sale, you can't claim the loss right now. But in a normal wash sale, the loss isn't gone. It's added to the basis of the shares you bought back, so you get the benefit when you sell those later.
Tess sells 50 shares of a fund at a $1,000 loss on March 1. On March 20 she buys the same fund again for $4,000. The $1,000 loss is blocked for now. It's added to her new shares, so her basis becomes $5,000.
There's one costly trap. If Tess had bought those shares back in her IRA or Roth IRA instead, the $1,000 loss would be gone for good. Purchases in your spouse's accounts count too.
To harvest a loss and stay invested, many people buy a similar fund that isn't substantially identical. One example is switching from one S&P 500 fund to a total market fund.
8. The extra 3.8% tax for higher earners
The Net Investment Income Tax (NIIT) is an extra 3.8% federal tax. It applies when your modified adjusted gross income (MAGI) is above a set line. MAGI is your total income after a few adjustments, before deductions.
| Filing status | NIIT starts above this MAGI |
|---|---|
| Single or head of household | $200,000 |
| Married filing jointly | $250,000 |
| Married filing separately | $125,000 |
These lines are set by law and do not rise with inflation. The tax applies to the smaller of two amounts: your net investment income, or how far your MAGI is over the line. Investment income includes gains, dividends, interest and rents. Wages and IRA withdrawals don't count as investment income.
Jamal is single, with $230,000 of MAGI. That includes $50,000 of investment income. He's $30,000 over the $200,000 line. The tax applies to the smaller amount, $30,000, so he owes 3.8% × $30,000 = $1,140 on top of his regular tax.
9. Special cases: your home, gifts and inheritances
Selling your home
You can leave up to $250,000 of gain on your main home out of your income, or $500,000 if married filing jointly. To qualify, you must have owned the home and lived in it as your main home for at least 2 of the 5 years before the sale. You can use this break once every 2 years.
Ben and Lucy bought their Albany home for $300,000. They sell it for $650,000 after living there 6 years. Their $350,000 gain is under the $500,000 married limit, so they owe no federal tax on it.
Gifts and inheritances
When someone gives you an investment while they're alive, you usually keep their basis. (If it's worth less than they paid when you get it, a different rule applies to losses; see IRS Publication 551.) If your aunt paid $2,000 for shares and gives them to you, your basis is $2,000.
When you inherit an investment, its basis usually resets to its value on the day the owner died. This is called a stepped-up basis. If those shares were worth $9,000 when your aunt died, your basis is $9,000. Selling soon after for $9,000 means no gain at all. Inherited assets are treated as long-term no matter how long you hold them.
10. Forms, lots and paying the tax
The forms you'll see
Early each year your broker sends a Form 1099-B, which lists your sales, proceeds and basis. You'll also get a Form 1099-DIV for dividends and fund distributions, and a Form 1099-INT for interest. Your sales go on Form 8949, and the totals go on Schedule D of your return. Tax software fills these in from your 1099s.
Check the 1099-B for a missing basis. That happens with old shares or shares moved from another broker. If basis is blank, you could be taxed on the whole sale price.
Choose which shares you sell
Each batch of shares you buy on one date at one price is a tax lot. Most brokers sell your oldest lots first unless you pick. That default is called FIFO (first in, first out). You can often choose specific lots instead, such as the ones with the highest basis or the ones held over a year. Set this in your account before you sell. You can't change it after the trade settles.
Paying during the year
Taxes on investment income aren't withheld like taxes on a paycheck. If a big sale will leave you owing $1,000 or more at tax time, you may need to make a quarterly estimated tax payment to avoid an underpayment penalty. You're safe from the penalty if your withholding and estimated payments together cover at least 90% of this year's tax or 100% of last year's total tax. That second number rises to 110% if last year's adjusted gross income was over $150,000 ($75,000 if married filing separately). You can also raise the withholding at your job to cover it.
11. If you live in New York
New York has no special lower rate for long-term gains or qualified dividends. It taxes them as regular income, at the same rates as your wages, and New York City residents pay city income tax on them too.
So a long-term gain that's taxed at 0% federally can still be taxed in New York. Interest from U.S. Treasuries is free from New York State and City tax. Interest from other states' municipal bonds is taxable in New York, while most New York municipal bonds are tax-free there.
Common mistakes
- Selling at 11 months. A few more weeks can turn a short-term gain into a long-term one and cut the rate.
- Buying back in your IRA after a loss sale. It makes the loss disappear for good.
- Forgetting reinvested dividends in your basis. That makes you pay tax twice on the same money.
- Buying a mutual fund in early December. You may get a taxable distribution right away, on gains you never shared in.
- Ignoring estimated taxes after a big sale. An April surprise can come with a penalty.
- Assuming a 0% federal gain is tax-free everywhere. States like New York still tax it.
Frequently asked questions
Do I owe tax just because my stock went up?
No. You owe tax when you sell, not when the price rises. The exception is a fund's capital gain distribution, since the fund sells for you.
Does reinvesting dividends avoid the tax?
No. Reinvested dividends are taxed the year they're paid. They do raise your basis, which lowers the tax when you sell later.
Can investment losses offset my salary?
Yes, up to $3,000 a year ($1,500 if married filing separately). The rest carries forward to future years.
Are trades inside a Roth IRA taxed?
No. Trades inside a Roth IRA aren't taxed. If you follow the Roth rules, withdrawals in retirement are tax-free too.
Do I owe tax when I sell my house?
Often not. Up to $250,000 of gain ($500,000 married filing jointly) is tax-free if you owned and lived in the home for 2 of the last 5 years.
The bottom line
Your tax on a sale starts with three facts: what you paid, what you sold for, and how long you held it. Holding more than a year, using losses wisely and watching the wash-sale rule can lower your bill. Just don't let taxes be the only reason you buy or sell. If you'd like help seeing how your investments fit your bigger plan, start with the Financial Clarity Quiz.
Related reading: How HYSA and CD interest is taxed · Tax brackets explained · Taxable vs. tax-advantaged accounts · Tax planning for high-income households
Authoritative sources
- IRS Publication 550: Investment Income and Expenses
- IRS Topic 409: Capital Gains and Losses
- IRS Topic 701: Sale of Your Home
- IRS Revenue Procedure 2025-32: 2026 inflation adjustments
- IRS: Tax inflation adjustments for tax year 2026
- IRS: Net Investment Income Tax
- IRS: Questions and answers on the Net Investment Income Tax
- IRS: Instructions for Form 8949
- Investor.gov: Wash sales
Convivial Wealth education guide · General education for U.S. readers, not personalized tax, legal or investment advice. Figures are for 2026 and are reviewed each year.