Ledger Money
Ledger Taxes 13 min read

Capital gains: what sets your rate, and what cancels your loss

How long you held it decides which rates apply; how much other income you have decides which one. And one rule voids the loss on an obvious trade.

Ledger Editorial Updated October 11, 2026

Most explanations of the capital gains tax start with the rates. The rates are the least useful part of it, because you do not get to choose yours.

You choose two other things — how long you held the asset, and how much other income you have in the year you sell. Those two facts determine which rates apply and how much of the gain lands in each one. Everything else is arithmetic.

There is also one rule in this area that voids the loss on the trade that looks most obviously smart. It is worth understanding long before you need it.

What is actually being taxed

Almost everything you own and use for personal or investment purposes is a capital asset: a home, household furnishings, stocks, bonds, land. Sell one for more than its adjusted basis — usually what you paid, plus improvements and purchase costs, minus any depreciation you claimed — and the difference is a capital gain. Sell it for less and the difference is a capital loss.

Two asymmetries in that sentence are worth stopping on.

The first is that a loss on personal-use property is not deductible at all. Your home, your car, your furniture. The gain side is taxed and the loss side is not.

The second is that the holding period, not the asset, decides which rate schedule applies. The same shares can produce ordinary income or a preferential rate depending only on a date.

The holding period is the fork in the road

Hold an asset for more than one year and the gain is long-term. Hold it one year or less and it is short-term, and short-term gains are taxed as ordinary income at the graduated rates — a schedule that for 2026 runs from 10% to 37%. For a taxpayer in the 24% bracket, that is the difference between 24% and 15%, or between 24% and nothing at all.

The counting rule is stricter than most people assume. You count from the day after the day you acquired the asset, up to and including the day you disposed of it. So shares bought on January 5 of one year are still short-term on January 5 of the next. The one-year anniversary itself is inside the short-term window; the day after is not.

This is the most controllable variable in the system, and the one that gets surrendered most casually, in December, to a person who wants a loss on the books before year end.

The long-term rates for 2026, and the rule that splits a gain

The long-term rates are 0%, 15% and 20%, and the thresholds are restated every year for inflation. For tax year 2026, Revenue Procedure 2025-32 sets the following amounts:

Filing statusTaxable income taxed at 0% up toTaxable income taxed at 15% up toAbove that
Single$49,450$545,50020%
Married filing jointly, or surviving spouse$98,900$613,70020%
Married filing separately$49,450$306,85020%
Head of household$66,200$579,60020%
Estates and trusts$3,300$16,25020%

These are ceilings on taxable income, not on the gain. Nothing here says a gain is taxed at a single rate. The statute works the two lower bands out of your ordinary income: the amount taxed at 0% is the room left between the zero-rate ceiling and your taxable income excluding the gain, and the 20% rate then applies to the gain in excess of the amounts already taxed at 0% and 15%. So one sale can be taxed at two or even three different rates at once, and the income you already have is what decides how much of it lands in each.

A caution about where you read these numbers. The IRS publishes a plain-language summary page for this topic, and it lags. As this is written, that page still displays the prior year’s thresholds. The revenue procedure published each autumn for the following year is the authority; a summary page is not. If a page of tax figures does not say which year it is stating, treat the figures as unverified until you find the revenue procedure behind them.

The gain stacks on top of your income

This is the part that catches people, because it runs against the intuition that a gain is taxed “on its own.”

A long-term gain sits on top of your ordinary taxable income. It does not get its own band. To find the room available at 0%, you subtract your ordinary taxable income from the top of the 0% band, and whatever is left is the amount of gain that pays nothing.

Two single filers, both with a $30,000 long-term gain, in 2026:

Filer AFiler B
Ordinary taxable income$30,000$60,000
Long-term gain$30,000$30,000
Total taxable income$60,000$90,000
Room left in the 0% band ($49,450 ceiling)$19,450none — the band is already full
Gain taxed at 0%$19,450$0
Gain taxed at 15%$10,550 → $1,582.50$30,000 → $4,500

Same gain, same filing status, same year. Filer B pays nearly three times as much, because a larger salary used up the free band. Your capital gains rate is a function of your other income, and that is why the same sale can be cheap in a sabbatical year and expensive in a good one.

The 3.8% surtax that rides on top

Above certain income levels a second tax applies to the same gain. The net investment income tax is 3.8% of the lesser of your net investment income and the amount by which your modified adjusted gross income exceeds a threshold — $200,000 for single and head of household, $250,000 for married filing jointly, $125,000 for married filing separately.

Three consequences follow from the way that is written.

  • It phases in rather than switching on. The base is the smaller of the two figures, so the first dollar over the threshold is taxed on a base of one dollar, not on your whole portfolio.
  • The thresholds are not indexed and have not moved since the tax took effect in 2013, so its reach widens every year that nominal incomes rise.
  • Some income is outside it: tax-exempt municipal bond interest, and the part of a home-sale gain that the exclusion removes, are not net investment income.

A long-term gain at the top rate therefore costs 23.8%, not 20%.

Losses: a three-thousand-dollar door and a long hallway

Capital losses are useful, but not as useful as their headline suggests.

They first offset capital gains. If losses exceed gains, the excess can reduce ordinary income by at most $3,000 a year — $1,500 for a married person filing separately. What is left over is not wasted: it carries forward to later years until it is completely used up, and it keeps its character, so a long-term loss carried forward reduces a later year’s long-term gains first.

The practical consequence is that a $60,000 loss does not shelter $60,000 of salary. It shelters $3,000 a year of it, for twenty years. That is a real benefit and a slow one, and it is the reason loss harvesting is a strategy for offsetting gains rather than a strategy for reducing income.

The wash sale: the rule that punishes the obvious move

Here is the trade that seems obviously correct. You hold a position at a loss, you still like it, so you sell it in December to book the loss and buy it back in January. You keep the position and you get the deduction.

That does not work. If you sell or trade stock or securities at a loss and within 30 days before or after the sale you buy substantially identical stock or securities, the loss is not deductible. The window is not 30 days forward; it is 61 days wide and it runs both directions, so the shares you bought last week can already have spoiled the sale you are planning today.

Four things trigger it:

  1. Buying substantially identical stock or securities.
  2. Acquiring substantially identical stock or securities in a fully taxable trade.
  3. Acquiring a contract or option to buy substantially identical stock or securities.
  4. Acquiring substantially identical stock for your IRA or Roth IRA.

A purchase by your spouse, or by a corporation you control, triggers it too.

“Substantially identical” is a facts-and-circumstances test, not a safe harbor. Ordinarily, the IRS says, stock of one corporation is not substantially identical to stock of another. That sentence is narrower than it looks, and it does not answer the question most people actually have. The IRS has not published a rule on whether two different funds tracking the same index are substantially identical. Where the replacement gives you the same exposure as the position you just sold, the prudent assumption is that the loss may be disallowed, and the cost of being wrong is the deduction.

What happens to the disallowed loss depends on where the replacement shares were bought. In a taxable account, the loss is postponed, not destroyed: you add it to the basis of the replacement shares, and the deduction arrives when you sell those. But Publication 550 states the exception in the same breath — the basis adjustment does not apply to shares acquired in an IRA or a Roth IRA. There is no basis to adjust inside an IRA, so a loss disallowed that way is never recovered. That is the one version of this mistake that is permanent.

Two smaller mechanics ride along. Your holding period for the replacement shares includes the holding period of the shares you sold, so a wash sale does not push you back to short-term. And where only some of the replacement shares fall inside the window, the disallowed loss is allocated across them.

The allocation rules are worth seeing once. Publication 550’s example: you bought 100 shares in September, then bought 50 more in December and 25 more in December, then sold the original 100 in January at a $1,000 loss. Because 75 replacement shares were bought inside the window, the loss on 75 shares ($750) is disallowed and the loss on the other 25 shares ($250) is deductible. The $750 is spread across the replacement shares in proportion:

SharesBought forDisallowed loss addedNew basis
50$2,750$500 (two-thirds of $750)$3,250
25$1,125$250 (one-third)$1,375

Two places the gain disappears, and one where the loss does

Property inherited from a decedent. The basis is generally the fair market value at the date of death, not what the deceased paid, so the gain that accumulated during their lifetime is not taxed to them and is not taxed to you either. It is the largest single difference in the treatment of investment assets, and it is why giving away your most appreciated holdings during your life is usually the wrong move: a gift carries over the donor’s basis and hands the embedded gain to the recipient, while an inheritance resets it.

Three qualifications keep this from being a universal escape hatch. First, the reset applies to the income tax on the gain; if the estate is large enough to owe federal estate tax, that is a separate tax on a different base. Second, some assets are excluded from the reset entirely: the statute does not apply to property that is a right to receive an item of income in respect of a decedent, the classic example being a traditional IRA, whose balance is ordinary income to the beneficiary rather than a stepped-up capital asset. Third, there is an exception inside the exception — appreciated property that you gave to the decedent within one year before death, and that comes back to you, keeps the decedent’s basis rather than getting a new one.

Your main home. Up to $250,000 of gain is excluded, or $500,000 on a joint return, if you owned the home for at least two of the five years before the sale and used it as your principal residence for at least two of those five. Both tests must be met inside the same five-year window. Above the exclusion, the remaining gain is taxed normally, and a loss on a home you lived in is not deductible.

Gifts with a built-in loss. When the fair market value at the time of the gift was below the donor’s basis, you end up with two bases: the donor’s basis for measuring a gain, and the value at the time of the gift for measuring a loss. Publication 551’s illustration: a gift of land worth $8,000 with a donor basis of $10,000. Sell it for $12,000 and you have a $2,000 gain, because the donor’s basis applies. Sell it for $7,000 and you have a $1,000 loss, because the value at the gift applies. Sell it anywhere between $8,000 and $10,000 and you have neither a gain nor a loss.

Rates higher than 20%

A few categories escape the 0/15/20 schedule and go higher:

CategoryMaximum rate
Collectibles — coins, art, and similar28%
Unrecaptured section 1250 gain on real property25%
Section 1202 qualified small business stock28%

And qualified dividends share the 0/15/20 rates, but only if the stock was held more than 60 days during the 121-day period beginning 60 days before the ex-dividend date. A dividend on stock you owned for five weeks is ordinary income, whatever the 1099-DIV box says. The form reports what the payer knows; the holding period is yours to get right.

Two things worth actually doing

Fill the 0% bracket on purpose. If your ordinary taxable income leaves room under the 0% ceiling, you can sell a position you have held more than one year, pay nothing on the part of the gain that fits, and buy the position back the same day. The wash-sale rule does not apply to gains, so the repurchase is unrestricted. You come out with a higher basis and a smaller future gain.

Three conditions decide whether it is worth doing. The position has to be long-term — a short-term gain is ordinary income and the 0% band does nothing for it. The gain itself consumes the band as you realize it, so the room you have is not the whole band. And the new shares start a fresh holding period: because there is no wash sale here, none of the holding-period carryover applies, so the repurchased position is short-term again until a year has passed. If you expect to sell it within the year, the trade has moved tax forward rather than away.

There is a fourth consideration, which is that income does not stay inside the income tax. The extra income flows into every other threshold that uses the same figure. Those include the premium tax credits on the health insurance marketplace, which are reconciled against actual income when you file, and the Medicare Part B and Part D income-related premium surcharges — which are set from the tax return you filed two years earlier, not the one you are about to file, so a gain taken this year changes a premium that arrives in the year after next.

Expect the estimated-tax question. A large gain realized late in the year usually arrives after withholding was set against a salary, and the tax on it may not be covered. The underpayment penalty is generally avoided if you owe less than $1,000 after withholding and credits, or if your payments reach the smaller of 90% of this year’s tax and 100% of the tax shown on last year’s return. The prior-year figure is 110%, not 100%, if your adjusted gross income for last year was more than $150,000 — more than $75,000 if you file separately. Form 2210 is where the penalty is computed, and Publication 505 chapter 2 is where the safe harbor is set out with a worked example. Both are worth reading before December, not after.

What this page does not cover

This is federal law only. State treatment varies, and it varies a lot — most states with an income tax tax capital gains as ordinary income, some give a preferential rate, and a handful have no income tax at all. The federal rules here also interact with the alternative minimum tax, the qualified business income deduction, and the netting order on Schedule D, none of which are modeled above. And the thresholds in this page are restated annually; the figures shown are for tax year 2026.

Frequently asked questions

Do I owe capital gains tax on a gain I have not sold yet?
No. The tax applies when you sell or otherwise dispose of the asset, not while you hold it. A position that has doubled on paper generates no tax until it is sold or exchanged. Nothing in this page changes that; it is a feature of current federal law, not a permanent rule of nature, and it is the reason proposals to tax unrealized gains attract so much attention.
Why is my whole gain taxed at 15% when part of it should have been at 0%?
Because the brackets are applied to your taxable income, and the gain sits on top of your ordinary income. If your ordinary taxable income has already filled the 0% band, there is no room left for the gain. You can see the arithmetic in the worked example above: the room is the top of the 0% band minus your ordinary taxable income, and for many households that room is smaller than they expect.
I sold at a loss and bought the same fund back three weeks later. Can I take the loss?
No, that is a wash sale. The loss is not deductible, but it is usually not lost either: you add it to the basis of the replacement shares, which lowers the gain, or deepens the loss, when you eventually sell those. Your holding period for the replacement shares also includes the holding period of the shares you sold, so the repurchase does not restart the clock for long-term treatment. The exception is a repurchase inside an IRA or Roth IRA, where there is no basis to adjust and the disallowed loss is never recovered.
Can I deduct the loss if I sell my car or my house for less than I paid?
No. Losses on personal-use property are not deductible. This is the asymmetry at the heart of the whole system: the gain on property you own for personal use is taxed when you realize it, but the loss is generally not allowed. Investment property is treated differently, and that difference is why the line between the two matters.
Is the 3.8% surtax part of my capital gains rate?
It is a separate tax, computed on a separate form, but it lands on the same gain. It applies to the lesser of your net investment income and the amount by which your modified adjusted gross income exceeds the threshold, so it phases in as your income rises rather than applying to all of your investment income at once. A 20% long-term gain can therefore cost 23.8%.

Sources

  1. Internal Revenue Service, Topic no. 409, Capital gains and losses
  2. Internal Revenue Service, Revenue Procedure 2025-32 (tax year 2026 inflation adjustments; the maximum zero rate amount and maximum 15 percent rate amount are set by section 1(h) as modified by section 1(j)(5)(B) and are listed at section 4.03) (irs.gov/pub/irs-drop/rp-25-32.pdf)
  3. 26 U.S.C. section 1(h)(1) (the rate structure itself, in which the 0 percent and 15 percent bands are measured against taxable income reduced by the adjusted net capital gain) (govinfo.gov, United States Code 2023 Edition, Title 26, Chapter 1, Subchapter A, Part I, Sec. 1)
  4. 26 U.S.C. sections 1091 (loss from wash sales of stock or securities), 1014 (basis of property acquired from a decedent, including subsection (c) for income in respect of a decedent and subsection (e) for appreciated property acquired by gift within one year of death) and 1411 (net investment income tax) (govinfo.gov, United States Code 2023 Edition, Title 26)
  5. Internal Revenue Service, Topic no. 559, Net investment income tax
  6. Internal Revenue Service, Topic no. 701, Sale of your home
  7. Internal Revenue Service, Publication 550, Investment income and expenses (wash sales and the basis adjustment rule with its IRA exception, capital loss carryover, qualified dividends)
  8. Internal Revenue Service, Publication 551, Basis of assets (property acquired from a decedent; property received as a gift)
  9. Internal Revenue Service, Publication 505, Tax withholding and estimated tax, and Form 2210, Underpayment of estimated tax by individuals, estates, and trusts, for the safe harbor described at the end of this page
  10. Social Security Administration — Premiums: Rules for Higher-Income Beneficiaries, which is the source for the two-year lookback: the 2026 income-related amounts are determined from the return filed in 2025 for tax year 2024 (ssa.gov/benefits/medicare/medicare-premiums.html)
  11. Centers for Medicare & Medicaid Services — 2026 Medicare Parts A & B Premiums and Deductibles, November 14, 2025, for the amount of each income-related Part B and Part D premium tier that a realized gain can raise (cms.gov/newsroom/fact-sheets/2026-medicare-parts-b-premiums-deductibles)
  12. HealthCare.gov — income and household information for marketplace savings, which are computed from the same modified adjusted gross income figure that a capital gain increases (healthcare.gov/income-and-household-information/income/)
#capital gains#holding period#wash sale#cost basis#capital losses