Investing basics · Accounts and taxes
Capital gains tax on stocks: 2026 rates, holding periods and basis
How US federal tax treats stock and fund gains in 2026: short- versus long-term, the 0%, 15% and 20% thresholds, the 3.8% NIIT, cost basis methods and loss limits.
On this page
- What a capital gain is
- Short-term versus long-term
- The 2026 long-term capital gains thresholds
- The 3.8% net investment income tax
- Cost basis: what you paid, and which shares you sold
- Capital losses: netting, the $3,000 limit and carryforwards
- Common mistakes
- Capital gains tax compared with other investment income
- How Finabase helps
- Frequently asked questions
- Summary
When you sell a stock, an ETF or a fund share for more than you paid, the profit is a capital gain, and in a regular US brokerage account it is taxable in the year you sell. Sell for less and you have a capital loss, which can reduce your tax. How much tax a gain costs depends on two things more than any other: how long you held the investment and how much other income you have.
The difference is large. The same $10,000 gain can be taxed at 0%, 15%, 20%, or at your ordinary income rate of up to 37%, plus a 3.8% surtax at higher incomes. This guide explains short- and long-term gains, the 2026 rate thresholds, the net investment income tax, how cost basis is measured and chosen, and how losses offset gains, with worked examples.
Everything here is US federal tax law for tax year 2026, using the thresholds in IRS Revenue Procedure 2025-32. Most states also tax capital gains, usually as ordinary income, and a few have no income tax at all. This page is general education, not tax advice.
What a capital gain is
A capital asset is almost anything you own for investment: stocks, bonds, ETFs, mutual fund shares, and also a home or a collectible. The tax rules come into play only when you realize a gain or loss, usually by selling. A stock that has doubled while you still hold it has an unrealized gain, and in the US that isn't taxed.
Two things are often taxed as capital gains even though you sold nothing: capital gain distributions from mutual funds and ETFs, which pass the fund's own realized gains to shareholders and are always treated as long-term, and gains in a merger or acquisition paid in cash. The ETFs vs. mutual funds: costs, taxes, trading and which fits page explains why ETFs usually distribute fewer gains.
Gains inside IRAs, 401(k)s and other retirement accounts are not taxed when you sell. The rules on this page apply to taxable accounts.
Short-term versus long-term
The holding period sorts every gain into one of two classes:
- Short-term: held one year or less. Taxed as ordinary income at the regular brackets, from 10% to 37% in 2026.
- Long-term: held more than one year. Taxed at the preferential 0%, 15% or 20% rates.
The IRS counts the holding period from the day after you acquired the asset through the day you dispose of it. Buy on March 10, 2025, and a sale on March 10, 2026 is still short-term; a sale on March 11, 2026 is long-term. For a trade, the trade date counts, not the settlement date.
Some acquisitions carry their own holding period. Shares you inherit are treated as long-term whenever you sell them, and their basis is generally reset to the market value on the date of death. Shares received as a gift take on the giver's basis and holding period in most cases.
The 2026 long-term capital gains thresholds
The 0%, 15% and 20% rates are set by taxable income (income after deductions), not by the size of the gain. Rev. Proc. 2025-32 sets these thresholds for 2026:
| Filing status (2026) | 0% rate up to | 15% rate up to | 20% rate above |
|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 |
| Married filing jointly / surviving spouse | $98,900 | $613,700 | $613,700 |
| Head of household | $66,200 | $579,600 | $579,600 |
| Married filing separately | $49,450 | $306,850 | $306,850 |
IRS Topic 409 still showed 2025 figures in October 2026, so use the revenue procedure for 2026 numbers. A few special categories have higher maximum rates: gains on collectibles such as art and coins (up to 28%) and the part of a real estate gain that reflects past depreciation (up to 25%).
How gains stack on top of your other income
Long-term gains are taxed as if they sit on top of your ordinary income. Your wages and other ordinary income fill the lower part of taxable income first, and the gain occupies the space above. That is why a gain can be partly taxed at 0% and partly at 15%.
The stacking order also means the gain can't push your wages into a higher ordinary bracket. It can, however, raise your AGI, which affects other items such as the NIIT, the taxation of Social Security benefits and some credits.
The 3.8% net investment income tax
The net investment income tax (NIIT) is a separate 3.8% tax on investment income for higher earners. It applies to the smaller of your net investment income or the amount by which your modified AGI exceeds:
| Filing status | NIIT threshold (MAGI) |
|---|---|
| Single, head of household | $200,000 |
| Married filing jointly / surviving spouse | $250,000 |
| Married filing separately | $125,000 |
These thresholds are written into the statute (IRC §1411) and are not adjusted for inflation, so each year more households cross them. Net investment income includes capital gains, dividends, taxable interest and rental income; it does not include wages, distributions from retirement accounts, or tax-exempt municipal bond interest.
Cost basis: what you paid, and which shares you sold
Your cost basis is your investment in the shares for tax purposes: the price you paid plus commissions and fees. Several events adjust it later:
- Stock splits spread the same basis over more shares. A 4-for-1 split of 10 shares bought at $400 ($4,000 basis) gives 40 shares at $100 basis each.
- Reinvested dividends buy new shares, each with its own basis and purchase date. Forgetting them means paying tax twice on the same money.
- Return of capital distributions reduce basis.
- A wash sale adds the disallowed loss to the replacement shares' basis (see Tax-loss harvesting: how it works, the wash-sale rule and its limits).
When you've bought the same security more than once, each purchase is a separate lot, and the lots usually have different prices and dates. Which lot you sell changes both the size and the type of the gain.
- First in, first out (FIFO). The oldest shares are sold first. If you don't identify specific shares, the IRS treats the sale as FIFO.
- Specific identification. You tell your broker, no later than the trade's settlement, exactly which lot to sell, and get written confirmation. This lets you choose a high-basis lot to realize a smaller gain or a loss, or a lot held over a year to get long-term treatment.
- Average cost. Available for mutual fund shares and many DRIP shares: basis is the average of all shares. Many fund companies use it by default.
Since 2011 for stocks (and 2012 for most funds), brokers track basis for covered securities and report it to you and the IRS on Form 1099-B. You still report each sale on Form 8949 and total them on Schedule D. For shares bought before those dates, or moved between firms, the basis may be missing, and keeping your own records is what prevents an overstated gain.
Capital losses: netting, the $3,000 limit and carryforwards
Losses are netted against gains in a fixed order:
- Short-term losses offset short-term gains, and long-term losses offset long-term gains.
- A net loss in one class then offsets a net gain in the other.
- If the overall result is a net capital loss, up to $3,000 a year ($1,500 if married filing separately) reduces your ordinary income.
- Any remaining loss carries forward to future years without limit, keeping its short- or long-term character.
Losses on personal-use property, such as selling your car for less than you paid, aren't deductible. Losses inside retirement accounts can't be claimed at all.
Common mistakes
- Selling a few days short of a year. The holding period is "more than one year," counted from the day after purchase. A sale on the anniversary date is short-term.
- Leaving reinvested dividends out of basis. Each reinvestment raised your basis; a missing record inflates the gain.
- Not choosing lots. Many brokers default to FIFO, which in a rising market sells the cheapest, oldest shares and realizes the biggest gain. Lot selection has to be made by settlement, not when you file.
- Forgetting fund distributions. A mutual fund can hand you a taxable capital gain distribution in a year you sold nothing, and even in a year the fund lost value.
- Ignoring state tax. A 0% federal long-term rate does not mean your state charges 0%.
Capital gains tax compared with other investment income
| Income (taxable account, 2026 federal) | Rate | When taxed |
|---|---|---|
| Short-term capital gain | Ordinary rates, 10%–37% | Year of sale |
| Long-term capital gain | 0%, 15% or 20% | Year of sale |
| Fund capital gain distribution | Long-term rates, whatever your holding period | Year paid |
| Qualified dividend | 0%, 15% or 20% | Year paid |
| Ordinary dividend, taxable interest | Ordinary rates | Year paid or credited |
| Unrealized gain | Not taxed | Only when realized |
All of the investment income above can also owe the 3.8% NIIT above the thresholds. The How dividends and interest are taxed: qualified, ordinary, muni page covers the income rows in detail.
How Finabase helps
Finabase doesn't prepare tax forms, track your official cost basis, or replace your broker's 1099-B. Its portfolios do something simpler and useful: you record each buy and sell with its date, price and commission, and the portfolio shows each position's cost, average cost, market value, unrealized gain and realized gain. Realized gains in Finabase are matched against your open buy lots first in, first out, the same default the IRS applies when you don't identify shares, and splits are applied automatically. It does not split gains into short- and long-term, so check your trade dates for that. The reports page adds dividends and cash entries and can export to CSV. Each symbol page shows price history, splits and dividends, which helps when you reconstruct an old lot's adjusted basis.
Frequently asked questions
How long do I have to hold a stock to pay the lower tax rate?
More than one year. The holding period starts the day after you buy, so shares bought on June 15, 2025 become long-term on a sale made June 16, 2026 or later.
Do I pay capital gains tax if I reinvest the money?
Yes. In a taxable US account, selling at a gain is a taxable event even if you immediately buy something else with the proceeds. Only trades inside tax-advantaged accounts, or specific exchanges the tax code allows for other property, avoid it.
What are the 2026 capital gains tax rates?
For long-term gains, 0% on taxable income up to $49,450 for single filers ($98,900 joint), 15% up to $545,500 ($613,700 joint), and 20% above that. Short-term gains are taxed at ordinary income rates, and the 3.8% NIIT can apply on top at higher incomes.
How much capital loss can I deduct?
Losses first offset all of your capital gains without limit. Beyond that, up to $3,000 of net loss a year ($1,500 married filing separately) reduces other income, and the rest carries forward to later years.
Summary
US federal tax on investment gains turns on the holding period and your income. Gains on assets held a year or less are taxed as ordinary income; gains held longer get the 2026 long-term rates of 0%, 15% or 20%, with thresholds set by Rev. Proc. 2025-32 and gains stacked on top of your other income. Higher earners also owe the 3.8% net investment income tax above unindexed thresholds of $200,000 or $250,000. The gain itself is sale proceeds minus an adjusted cost basis, and with several lots the method you choose, FIFO or specific identification, can change the result. Net losses offset gains without limit, then $3,000 a year of other income, and carry forward for as long as it takes.
Sources and further reading
- Internal Revenue Service — Rev. Proc. 2025-32 (2026 inflation adjustments, §.03 maximum capital gains rate)
- Internal Revenue Service — Topic no. 409, Capital gains and losses
- Internal Revenue Service — Topic no. 559, Net investment income tax
- Internal Revenue Service — Publication 550, Investment Income and Expenses
- Internal Revenue Service — Publication 551, Basis of Assets
- Internal Revenue Service — Instructions for Form 8949 and Schedule D
- Internal Revenue Service — Instructions for Form 1099-B (covered securities)