How capital gains tax works
A capital gain is the profit when you sell an asset for more than it cost you. The tax is charged on that profit, not on the sale price: sell for $300,000 something you bought for $100,000 and you have a $200,000 gain, whatever the headline number on the contract says. Your cost is your adjusted basis — broadly the purchase price, plus improvements and acquisition costs, less any depreciation you have claimed.
Two things then decide what you pay. The first is how long you held the asset. More than a year and the gain is long-term, eligible for preferential rates of 0%, 15% or 20%. A year or less and it is short-term, taxed as ordinary income at rates up to 37%. The second is how much other income you have, because long-term gains are not taxed in isolation.
Nothing is taxed until you sell. An investment that has quadrupled on paper generates no liability at all while you hold it, which is why the timing of a disposal is one of the few genuinely powerful levers an ordinary taxpayer has.
Your gain sits on top of your other income
This is the part most calculators hide, and it is the reason two people with identical gains can owe very different amounts. Long-term gains are stacked on top of your ordinary income. Your salary and other ordinary income fill the lower brackets first; the gain sits above it, and the rate it attracts depends on where that stack lands.
The consequence is that the 0%, 15% and 20% thresholds are measured against your total taxable income, not against the gain alone. A $40,000 gain can be taxed entirely at 0% for someone with little other income, entirely at 15% for someone earning a professional salary, and split across 15% and 20% for someone with a large income. The gain never changed; the stack underneath it did.
A gain can also straddle a boundary, with part taxed at one rate and the remainder at the next. That is not an edge case — it is the normal outcome for any sale large enough to push a taxpayer across a ceiling, and it is why a single "capital gains rate" is a fiction.
2026 federal capital gains rates by filing status
The long-term rate ladder has three steps, and each filing status has its own two breakpoints. These are the figures from Rev. Proc. 2025-32 § 4.03, stated as levels of taxable income — that is, after your standard or itemised deduction.
| Filing status | 0% while taxable income is at or below | 15% up to | 20% above |
|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 |
| Married filing jointly | $98,900 | $613,700 | $613,700 |
| Married filing separately | $49,450 | $306,850 | $306,850 |
| Head of household | $66,200 | $579,600 | $579,600 |
Note how much the joint figures are worth. A married couple can hold nearly $98,900 of taxable income and still pay nothing on a long-term gain. Note too that married filing separately gets exactly half the joint ceilings, which is one of several reasons that election rarely helps.
The standard deduction sits underneath all of this and is worth stating, because it is what separates the gross income you know from the taxable income these ceilings measure: $16,100 single, $32,200 joint, $24,150 head of household.
A gain taxed entirely at 0%
A single filer with $40,000 of gross income sells long-held shares for a $25,550 gain. After the standard deduction their taxable income lands exactly on the $49,450 zero-rate ceiling.
- Taxable income after deduction
- $49,450
- Taxable gain
- $25,550
- Tax owed without the sale
- $2,620
- Tax the sale added
- $0
- Total federal tax
- $2,620
- Effective rate on the gain
- 0%
The entire gain is taxed at 0%. Every dollar of tax below is on the ordinary income that was already there — the sale itself cost nothing. One more dollar of gain would have been taxed at 15%, which is what the next example shows.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 11 steps, each with its citation
- Net short-term capital gain or loss for the year$0
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$25,550
Assets held more than one year. Eligible for the 0/15/20% rates.
- Standard deduction-$16,100
Adjusted gross income of $65,550 less $16,100.
- Taxable income$49,450
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$1,240
$12,400 of taxable income between $0 and $12,400.
- Ordinary income taxed at 12%$1,380
$11,500 of taxable income between $12,400 and $23,900.
- Ordinary income stacked below the long-term gain$23,900
Long-term gain is taxed by reference to where it sits ON TOP of $23,900 of other taxable income, not from the bottom of the rate table.
- Long-term gain taxed at 0%$0
Taxable income stays at or below the $49,450 maximum zero-rate amount.
- Net investment income tax threshold$200,000
Modified AGI of $65,550 against the $200,000 threshold for a single filer. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax does not apply$0
Modified AGI is $134,450 below the threshold.
- Total tax$2,620
$2,620 on $65,550 of total income, an effective rate of 4%.
One dollar over the 0% ceiling
The identical taxpayer, with one extra dollar of gain. This is what a rate "boundary" actually means in practice.
- Taxable income after deduction
- $49,451
- Taxable gain
- $25,551
- Tax owed without the sale
- $2,620
- Tax the sale added
- $0.15
- Total federal tax
- $2,620.15
- Effective rate on the gain
- 0%
Crossing the ceiling does not reprice the whole gain — only the dollar above it is taxed at 15%, costing fifteen cents. Rate thresholds are marginal, not cliffs. The net investment income tax, further down this page, is the one place that intuition breaks.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 12 steps, each with its citation
- Net short-term capital gain or loss for the year$0
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$25,551
Assets held more than one year. Eligible for the 0/15/20% rates.
- Standard deduction-$16,100
Adjusted gross income of $65,551 less $16,100.
- Taxable income$49,451
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$1,240
$12,400 of taxable income between $0 and $12,400.
- Ordinary income taxed at 12%$1,380
$11,500 of taxable income between $12,400 and $23,900.
- Ordinary income stacked below the long-term gain$23,900
Long-term gain is taxed by reference to where it sits ON TOP of $23,900 of other taxable income, not from the bottom of the rate table.
- Long-term gain taxed at 0%$0
Taxable income stays at or below the $49,450 maximum zero-rate amount.
- Long-term gain taxed at 15%$0.15
Gain between the $49,450 zero-rate ceiling and the $545,500 15% ceiling.
- Net investment income tax threshold$200,000
Modified AGI of $65,551 against the $200,000 threshold for a single filer. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax does not apply$0
Modified AGI is $134,449 below the threshold.
- Total tax$2,620.15
$2,620.15 on $65,551 of total income, an effective rate of 4%.
A gain straddling the 15% and 20% bands
A single filer earning $100,000 sells an investment for a $500,000 long-term gain. The gain stacks over the $545,500 fifteen-percent ceiling and splits across two rates.
- Taxable income after deduction
- $583,900
- Taxable gain
- $500,000
- Tax owed without the sale
- $13,170
- Tax the sale added
- $92,120
- of which net investment income tax
- $15,200
- Total federal tax
- $105,290
- Effective rate on the gain
- 18.42%
Part of this gain is taxed at 15% and the rest at 20%, and the split depends entirely on the ordinary income underneath. The 3.8% net investment income tax applies on top of both.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 13 steps, each with its citation
- Net short-term capital gain or loss for the year$0
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$500,000
Assets held more than one year. Eligible for the 0/15/20% rates.
- Standard deduction-$16,100
Adjusted gross income of $600,000 less $16,100.
- Taxable income$583,900
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$1,240
$12,400 of taxable income between $0 and $12,400.
- Ordinary income taxed at 12%$4,560
$38,000 of taxable income between $12,400 and $50,400.
- Ordinary income taxed at 22%$7,370
$33,500 of taxable income between $50,400 and $83,900.
- Ordinary income stacked below the long-term gain$83,900
Long-term gain is taxed by reference to where it sits ON TOP of $83,900 of other taxable income, not from the bottom of the rate table.
- Long-term gain taxed at 15%$69,240
Gain between the $49,450 zero-rate ceiling and the $545,500 15% ceiling.
- Long-term gain taxed at 20%$7,680
Gain above the $545,500 maximum 15% rate amount.
- Net investment income tax threshold$200,000
Modified AGI of $600,000 against the $200,000 threshold for a single filer. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax at 3.8%$15,200
3.8% of $400,000, the lesser of net investment income ($500,000) and the amount by which modified AGI exceeds the threshold ($400,000). Here the binding figure is the excess of modified AGI over the threshold.
- Total tax$105,290
$105,290 on $600,000 of total income, an effective rate of 17.55%.
Short-term versus long-term
The holding-period line is the single largest lever in the whole system, and it is binary. Hold an asset for one year or less and the gain is short-term, added to your ordinary income and taxed at your marginal rate — up to 37% federally. Hold it for more than a year and the same gain becomes long-term, eligible for 0/15/20%.
The measurement is precise: the holding period begins the day after you acquire the asset and ends on the day you dispose of it. "More than one year" means exactly that, so a sale on the first anniversary is still short-term. Selling one day later can change the rate on the entire gain.
A short-term gain also behaves differently in the calculation. It has no rate band of its own — it simply raises your ordinary income, which means it can push your other income into a higher bracket and, separately, push your long-term gains further up their own ladder. That interaction is invisible in any tool that reports a single blended rate.
A short-term flip
A single filer earning $76,100 sells shares held eight months for a $40,000 gain. There is no preferential rate here at all.
- Taxable income after deduction
- $100,000
- Taxable gain
- $40,000
- Tax owed without the sale
- $7,912
- Tax the sale added
- $8,800
- Total federal tax
- $16,712
- Effective rate on the gain
- 22%
Notice there is no "capital gain" line in the working at all. The entire cost of this sale is ordinary income tax — the gain pushed the taxpayer up the bracket ladder. Held two more months, most of this would have been taxed at 15% instead.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 11 steps, each with its citation
- Net short-term capital gain or loss for the year$40,000
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$0
Assets held more than one year. Eligible for the 0/15/20% rates.
- Short-term gain added to ordinary income$40,000
Short-term capital gain has no preferential rate.
- Standard deduction-$16,100
Adjusted gross income of $116,100 less $16,100.
- Taxable income$100,000
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$1,240
$12,400 of taxable income between $0 and $12,400.
- Ordinary income taxed at 12%$4,560
$38,000 of taxable income between $12,400 and $50,400.
- Ordinary income taxed at 22%$10,912
$49,600 of taxable income between $50,400 and $100,000.
- Net investment income tax threshold$200,000
Modified AGI of $116,100 against the $200,000 threshold for a single filer. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax does not apply$0
Modified AGI is $83,900 below the threshold.
- Total tax$16,712
$16,712 on $116,100 of total income, an effective rate of 14.39%.
The 3.8% net investment income tax
Above certain income levels a further 3.8% applies to investment income, including capital gains. It is charged on the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds a threshold: $200,000 for single and head-of-household filers, $250,000 filing jointly, and $125,000 married filing separately.
The "lesser of" construction matters enormously and is almost always reported wrongly. Crossing the threshold by $100 does not subject your whole gain to 3.8% — it subjects $100 to it, costing $3.80. The tax phases in gradually as your income rises above the line, reaching its full extent only once the excess exceeds your investment income.
Two details are worth holding onto. First, the relevant measure is modified adjusted gross income, computed before your standard or itemised deduction — so you can owe this tax at an income level where your taxable income looks comfortably under the threshold. Second, these thresholds are written into the statute and are not adjusted for inflation. They have been unchanged since the tax took effect in 2013, so every year of wage growth pulls more households across them.
Crossing the NIIT threshold by $100
A single filer with $150,000 of gross income sells for a $50,100 gain, putting modified AGI $100 over the $200,000 threshold.
- Taxable income after deduction
- $184,000
- Taxable gain
- $50,100
- Tax owed without the sale
- $24,734
- Tax the sale added
- $7,518.80
- of which net investment income tax
- $3.80
- Total federal tax
- $32,252.80
- Effective rate on the gain
- 15.01%
The net investment income tax here is $3.80 — 3.8% of the $100 excess, not of the $50,100 gain. A tool that applies 3.8% to the whole gain at this income overstates the bill by nearly $1,900.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 13 steps, each with its citation
- Net short-term capital gain or loss for the year$0
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$50,100
Assets held more than one year. Eligible for the 0/15/20% rates.
- Standard deduction-$16,100
Adjusted gross income of $200,100 less $16,100.
- Taxable income$184,000
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$1,240
$12,400 of taxable income between $0 and $12,400.
- Ordinary income taxed at 12%$4,560
$38,000 of taxable income between $12,400 and $50,400.
- Ordinary income taxed at 22%$12,166
$55,300 of taxable income between $50,400 and $105,700.
- Ordinary income taxed at 24%$6,768
$28,200 of taxable income between $105,700 and $133,900.
- Ordinary income stacked below the long-term gain$133,900
Long-term gain is taxed by reference to where it sits ON TOP of $133,900 of other taxable income, not from the bottom of the rate table.
- Long-term gain taxed at 15%$7,515
Gain between the $49,450 zero-rate ceiling and the $545,500 15% ceiling.
- Net investment income tax threshold$200,000
Modified AGI of $200,100 against the $200,000 threshold for a single filer. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax at 3.8%$3.80
3.8% of $100, the lesser of net investment income ($50,100) and the amount by which modified AGI exceeds the threshold ($100). Here the binding figure is the excess of modified AGI over the threshold.
- Total tax$32,252.80
$32,252.80 on $200,100 of total income, an effective rate of 16.12%.
What "effective rate" should mean
This is where our answer diverges from most of the calculators you will find, and the difference is worth stating plainly because it is checkable.
We report the effective rate against the gain: the extra tax the sale caused, divided by the gain itself. That answers the question people actually have, which is "what did selling this cost me?"
The common alternative is to divide total tax by total income. That is not wrong arithmetic, but it answers a different question: it blends in the tax you would have owed on your salary anyway, and then labels the result as the cost of your sale.
How much the two diverge depends on the gain. For a long-term gain the gap is usually under a percentage point, because the gain is taxed at a preferential rate that is not far from the blended average. For a short-term gain the gap is large — the sale is taxed at your top marginal rate while the average is dragged down by all the income taxed in the brackets beneath it. The example below is the second case, and it is the one where a total-income effective rate misleads badly.
The same tax, stated two ways
A single filer earning $200,000 sells shares held under a year for a $150,000 gain. Both effective rates below describe the identical tax bill.
- Taxable income after deduction
- $333,900
- Taxable gain
- $150,000
- Tax owed without the sale
- $36,734
- Tax the sale added
- $54,600.25
- of which net investment income tax
- $5,700
- Total federal tax
- $91,334.25
- Effective rate on the gain
- 36.4%
- The same figure stated against total income
- 26.1%
Over ten percentage points separate the two figures, and only the first one answers "what did selling cost me?". The struck-through number silently includes the income tax on the $200,000 salary, which would have been owed whether or not the shares were ever sold. We show the first number.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 14 steps, each with its citation
- Net short-term capital gain or loss for the year$150,000
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$0
Assets held more than one year. Eligible for the 0/15/20% rates.
- Short-term gain added to ordinary income$150,000
Short-term capital gain has no preferential rate.
- Standard deduction-$16,100
Adjusted gross income of $350,000 less $16,100.
- Taxable income$333,900
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$1,240
$12,400 of taxable income between $0 and $12,400.
- Ordinary income taxed at 12%$4,560
$38,000 of taxable income between $12,400 and $50,400.
- Ordinary income taxed at 22%$12,166
$55,300 of taxable income between $50,400 and $105,700.
- Ordinary income taxed at 24%$23,058
$96,075 of taxable income between $105,700 and $201,775.
- Ordinary income taxed at 32%$17,424
$54,450 of taxable income between $201,775 and $256,225.
- Ordinary income taxed at 35%$27,186.25
$77,675 of taxable income between $256,225 and $333,900.
- Net investment income tax threshold$200,000
Modified AGI of $350,000 against the $200,000 threshold for a single filer. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax at 3.8%$5,700
3.8% of $150,000, the lesser of net investment income ($150,000) and the amount by which modified AGI exceeds the threshold ($150,000). Here the binding figure is net investment income.
- Total tax$91,334.25
$91,334.25 on $350,000 of total income, an effective rate of 26.1%.
Selling your home: the Section 121 exclusion
If you sell a home you have lived in, you can exclude up to $250,000 of gain, or $500,000 on a joint return. The tests are ownership and use: you must have owned the home for at least two of the five years before the sale, and lived in it as your main home for at least two of those same five years. The two periods do not have to coincide. You also must not have claimed the exclusion on another home within the previous two years.
These amounts are statutory and have never been indexed, which is increasingly the binding constraint. In high-cost markets a couple can exceed the $500,000 exclusion on an ordinary family home, and the excess is a straightforward long-term capital gain.
The partial exclusion is more generous than it looks
If you sell early because of a change in place of employment, a health reason, or an unforeseen circumstance, you may qualify for a reduced exclusion. The crucial detail — and the one most often implemented incorrectly — is that the proration applies to the maximum exclusion amount, not to your gain.
Someone who owned and occupied a home for twelve of the required twenty-four months gets half the maximum exclusion, which is $125,000 single. If their gain was $100,000, the whole of it is still excluded and they owe nothing. Prorating the gain instead — which is the intuitive but wrong reading — would tax half of it. The distinction is worth several thousand dollars to anyone who sold early with a modest gain.
Depreciation is never excluded
If the property was ever rented, depreciation claimed after 6 May 1997 cannot be excluded, however well you meet the ownership and use tests. It comes off the top and is taxed as unrecaptured Section 1250 gain at up to 25%.
A $600,000 gain on a main home
A married couple with $120,000 of income sells the home they have lived in for years for $900,000, against an adjusted basis of $300,000.
- Taxable income after deduction
- $187,800
- Taxable gain
- $100,000
- Tax owed without the sale
- $10,040
- Tax the sale added
- $13,335
- Total federal tax
- $23,375
- Effective rate on the gain
- 13.34%
The exclusion removes $500,000 of the $600,000 gain before any rate applies. Only the remaining $100,000 is taxable — and because it stacks on a modest income, much of it falls in the lower bands.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 16 steps, each with its citation
- Gain on sale of principal residence$600,000
$900,000 amount realized less $300,000 adjusted basis.
- Maximum Section 121 exclusion$500,000
Owned for 60 months and used as a principal residence for 60 months in the 5-year lookback, both at least 24. No exclusion claimed in the prior 2 years.
- Section 121 exclusion applied-$500,000
$500,000 of gain is excluded from income, the lesser of the $500,000 maximum exclusion and the $600,000 of excludable gain.
- Taxable long-term gain from the home sale$100,000
Taxed at the long-term capital gain rates.
- Net short-term capital gain or loss for the year$0
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$100,000
Assets held more than one year. Eligible for the 0/15/20% rates.
- Standard deduction-$32,200
Adjusted gross income of $220,000 less $32,200.
- Taxable income$187,800
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$2,480
$24,800 of taxable income between $0 and $24,800.
- Ordinary income taxed at 12%$7,560
$63,000 of taxable income between $24,800 and $87,800.
- Ordinary income stacked below the long-term gain$87,800
Long-term gain is taxed by reference to where it sits ON TOP of $87,800 of other taxable income, not from the bottom of the rate table.
- Long-term gain taxed at 0%$0
Taxable income stays at or below the $98,900 maximum zero-rate amount.
- Long-term gain taxed at 15%$13,335
Gain between the $98,900 zero-rate ceiling and the $613,700 15% ceiling.
- Net investment income tax threshold$250,000
Modified AGI of $220,000 against the $250,000 threshold for married filing jointly. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax does not apply$0
Modified AGI is $30,000 below the threshold.
- Total tax$23,375
$23,375 on $220,000 of total income, an effective rate of 10.63%.
Rental property: Section 1250 depreciation recapture
Selling a rental introduces a second rate. While you owned the property you claimed depreciation, reducing your taxable income each year and also reducing your basis. On sale, the part of your gain attributable to that depreciation does not get the 0/15/20% treatment. It is unrecaptured Section 1250 gain, taxed at up to 25%.
Two details decide how much this costs. The amount is the lesser of the depreciation you claimed and your total gain — so a property depreciated heavily but sold for a modest profit does not manufacture recapture out of nothing; the gain caps it, and the remaining depreciation is simply never recaptured.
And 25% is a maximum, not a flat rate. A taxpayer whose ordinary marginal rate is 22% pays 22% on this gain, not 25%. The cap only binds once your ordinary rate exceeds it. In the stack, this slice sits above your ordinary income but below your ordinary long-term gain, which pushes the rest of the gain further up its ladder.
Note also that depreciation is recaptured on the basis of what was allowed or allowable. If you were entitled to claim depreciation and did not, it is still recaptured on sale — failing to claim it does not avoid the tax.
A rental with $150,000 of depreciation claimed
A single filer earning $80,000 sells a rental for $700,000 against a $500,000 adjusted basis, having claimed $150,000 of depreciation over the years.
- Taxable income after deduction
- $263,900
- Taxable gain
- $200,000
- Tax owed without the sale
- $8,770
- Tax the sale added
- $45,825.25
- of which net investment income tax
- $3,040
- Total federal tax
- $54,595.25
- Effective rate on the gain
- 22.91%
Of the $200,000 gain, $150,000 is depreciation recapture and only $50,000 gets the ordinary long-term treatment. Watch the working: the recapture is taxed at the taxpayer's ordinary rates because those are below the 25% cap.
Caveats on this example (1)
- Net investment income was derived from capital gains and qualified dividends only. Interest, non-qualified dividends, rents, royalties and passive business income inside ordinaryIncome are also net investment income under IRC 1411(c) and are not counted here.
Show the working — 19 steps, each with its citation
- Gain on sale of depreciable real property$200,000
$700,000 amount realized less $500,000 adjusted basis, which is already net of depreciation taken.
- Depreciation allowed or allowable$150,000
Straight-line depreciation taken over the holding period. "Allowed or allowable" means depreciation the taxpayer could have claimed counts even if it was not claimed.
- Unrecaptured Section 1250 gain$150,000
The lesser of $150,000 of depreciation and $200,000 of total gain. Taxed at up to 25%.
- Remaining long-term gain above depreciation$50,000
Appreciation beyond the depreciation taken, eligible for the 0/15/20% rates.
- Net short-term capital gain or loss for the year$0
Assets held one year or less. Taxed at ordinary rates if a net gain.
- Net long-term capital gain or loss for the year$200,000
Assets held more than one year. Eligible for the 0/15/20% rates.
- Standard deduction-$16,100
Adjusted gross income of $280,000 less $16,100.
- Taxable income$263,900
The figure the rate tables and the capital gain ceilings are both measured against.
- Ordinary income taxed at 10%$1,240
$12,400 of taxable income between $0 and $12,400.
- Ordinary income taxed at 12%$4,560
$38,000 of taxable income between $12,400 and $50,400.
- Ordinary income taxed at 22%$2,970
$13,500 of taxable income between $50,400 and $63,900.
- Unrecaptured Section 1250 gain taxed at 22%$9,196
$41,800 at the 22% ordinary rate, which is below the 25% maximum.
- Unrecaptured Section 1250 gain taxed at 24%$23,058
$96,075 at the 24% ordinary rate, which is below the 25% maximum.
- Unrecaptured Section 1250 gain taxed at 25%$3,031.25
$12,125 at the 25% maximum rate.
- Ordinary income stacked below the long-term gain$213,900
Long-term gain is taxed by reference to where it sits ON TOP of $213,900 of other taxable income, not from the bottom of the rate table.
- Long-term gain taxed at 15%$7,500
Gain between the $49,450 zero-rate ceiling and the $545,500 15% ceiling.
- Net investment income tax threshold$200,000
Modified AGI of $280,000 against the $200,000 threshold for a single filer. This threshold is statutory and is not adjusted for inflation.
- Net investment income tax at 3.8%$3,040
3.8% of $80,000, the lesser of net investment income ($200,000) and the amount by which modified AGI exceeds the threshold ($80,000). Here the binding figure is the excess of modified AGI over the threshold.
- Total tax$54,595.25
$54,595.25 on $280,000 of total income, an effective rate of 19.5%.
Offsetting gains with losses
Losses net against gains, in a defined order. Short-term losses first offset short-term gains and long-term losses offset long-term gains; any remaining loss of one character then offsets the net gain of the other. If you finish the year with a net capital loss, you can deduct up to $3,000 against ordinary income — $1,500 if married filing separately.
Anything beyond that carries forward indefinitely, keeping its short-term or long-term character. There is no expiry and no carryback for individuals. The $3,000 figure is statutory and has been unchanged since 1978, so its real value has eroded by decades of inflation — a large loss can take a very long time to use up.
One trap worth naming: the wash sale rule disallows a loss if you buy a substantially identical security within thirty days before or after the sale. This calculator takes your net gain as given and does not detect wash sales.
State capital gains tax
Federal tax is only part of the bill. Most states tax capital gains as ordinary income with no preferential rate at all, which means a gain that is federally cheap can still be expensive where you live. A handful of states levy no income tax; one — Washington — levies no income tax but does tax long-term gains through a separate excise.
We currently compute 18 of 51 jurisdictions, and the calculator lists the rest as not yet available rather than omitting them, so a missing state can never be mistaken for a state with no tax. Detailed pages for the ten largest:
- California — Up to 13.3%Taxed as ordinary income, nine brackets, plus a 1% surcharge over $1m.
- Texas — No state taxNo individual income tax. Federal tax still applies in full.
- Florida — No state taxNo individual income tax. Federal tax still applies in full.
- New York — Up to 10.9% + city taxOrdinary income, nine brackets to 10.9%. NYC and Yonkers add their own.
- Washington — 7% / 9.9% exciseNo income tax, but a 7% / 9.9% excise on long-term gains. Real estate exempt.
- Illinois — Flat 4.95%Flat 4.95% on everything. No preferential rate, no exclusion.
- Pennsylvania — Flat 3.07%Flat 3.07%, no holding-period distinction, and unusual loss rules.
- Ohio — Flat 2.75%A single 2.75% rate from 2026, above an indexed floor.
- New Jersey — Up to 10.75%Ordinary income to 10.75%. Fixed thresholds, and no loss carryforward.
- Colorado — Flat 4.40%Flat 4.40%. The old capital gain subtraction appears to be gone.
Planning levers that actually work
Cross the one-year line. The largest single saving available to most people is simply waiting. Moving a sale from day 365 to day 366 can take the rate on the whole gain from 37% to 20% or lower.
Use a low-income year. Because the rate depends on total taxable income, a year with reduced earnings — a sabbatical, a career change, early retirement before pensions start — can put a substantial gain in the 0% band. This is the most under-used lever in the system.
Split a disposal across tax years. Selling half in December and half in January gives each portion its own stack, which can keep both under a ceiling that a single sale would cross. Useful federally; worth nothing in a flat-rate state.
Harvest losses deliberately. Realising losses to offset gains in the same year is straightforward and effective, subject to the wash sale rule.
Mind the NIIT threshold. Because the tax applies to the lesser of two figures, keeping modified AGI just below the threshold can remove it entirely — and because it is measured before deductions, the lever is income timing rather than deductions.
Check the state consequence before you move a sale. Deferring into next year to save federally is a poor trade if your state rate rises, or if you are moving to a higher-tax state in between.
Common mistakes
Treating the rate as a property of the gain. It is not. The same gain attracts different rates for different people, because it is stacked on different incomes.
Applying 3.8% to the whole gain on crossing the NIIT threshold. It applies to the lesser of net investment income and the excess over the threshold.
Prorating the gain for a partial home-sale exclusion. The proration applies to the maximum exclusion, not to the gain — and the difference usually favours the taxpayer.
Assuming depreciation recapture is always 25%. It is a maximum. Below the 25% bracket you pay your ordinary rate.
Forgetting the state. Most states give capital gains no preferential treatment, so someone paying 0% federally can still owe several thousand at home.
Reading an effective rate computed against total income. It answers a different question and understates what the sale cost you.
Frequently asked questions
What are the 2026 capital gains tax rates?
Long-term capital gains are taxed at 0%, 15% or 20%, depending on your total taxable income rather than on the size of the gain alone. For 2026 a single filer pays 0% while taxable income stays at or below $49,450, 15% up to $545,500, and 20% above that. Filing jointly the two ceilings are $98,900 and $613,700. Short-term gains get no preferential rate at all — they are taxed as ordinary income at up to 37%.
How is tax on a capital gain actually calculated?
Your long-term gain is stacked on top of your other taxable income, not taxed from the bottom of the rate table. Ordinary income fills the lower brackets first, and the gain sits above it — so the rate you pay on the gain depends on how much other income is underneath it. A gain can also straddle two rate bands, with part taxed at 15% and the remainder at 20%.
What is the difference between short-term and long-term capital gains?
Holding period. Assets held more than one year produce long-term gains, eligible for the 0/15/20% rates. Assets held one year or less produce short-term gains, which are taxed as ordinary income at your marginal rate. The difference is large: at the same income, a short-term gain can cost more than twice what the identical long-term gain would.
Do I have to pay the 3.8% net investment income tax as well?
Possibly. The net investment income tax applies at 3.8% on the LESSER of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). Because it is the lesser of the two, crossing the threshold by a small amount costs very little. These thresholds are written into the statute and are not adjusted for inflation, so more taxpayers cross them every year.
How much gain can I exclude when I sell my home?
Up to $250,000 of gain, or $500,000 on a joint return, if you owned the home and lived in it as your main home for at least two of the five years before the sale, and have not claimed the exclusion on another home in the previous two years. If you sold early because of a change in workplace, health, or an unforeseen event, you may qualify for a reduced exclusion — and importantly the proration applies to the maximum exclusion amount, not to your gain, which often means a modest gain is still fully excluded.
Why do I owe 25% on the sale of a rental property?
That is unrecaptured Section 1250 gain. The part of your gain attributable to the depreciation you claimed does not get the 0/15/20% rates; it is taxed at up to 25%. Two details matter: the amount is capped at your total gain, so heavy depreciation on a property sold for a modest profit does not manufacture recapture out of nothing; and 25% is a maximum, not a flat rate, so a taxpayer in the 22% bracket pays 22% on it.
Which states do not tax capital gains?
Alaska, Florida, Nevada, South Dakota, Texas and Wyoming levy no individual income tax at all, so capital gains are untaxed at state level. New Hampshire and Tennessee have repealed their narrow interest-and-dividends taxes. Washington is a special case: it has no income tax, but it does levy a separate excise tax on long-term capital gains. Federal tax still applies in every one of these states.
Can I offset capital gains with capital losses?
Yes. Losses net against gains of the same character first, then across characters. If you end the year with a net capital loss, you can deduct up to $3,000 of it against ordinary income ($1,500 if married filing separately), and carry the remainder forward indefinitely with its short-term or long-term character preserved. There is no carryback for individuals, and no expiry on the carryforward.
Is capital gains tax calculated on the profit or the sale price?
On the profit. Your gain is the amount realised on the sale, net of selling costs, less your adjusted basis — broadly what you paid plus improvements, less any depreciation claimed. Selling an asset for $300,000 that you bought for $100,000 produces a $200,000 gain, and the tax is computed on that $200,000, not on the $300,000.
What is the effective tax rate on a capital gain?
It depends entirely on what you divide by, and this is where published figures diverge. We state the rate against the gain itself: the extra tax the sale caused, divided by the gain. Dividing the same tax by your total income instead produces a much smaller and much more flattering number that tells you nothing about what the sale cost you. Both figures are shown side by side in one worked example on the home page.
Sources
Inflation-adjusted figures for tax year 2026 come from Rev. Proc. 2025-32 (I.R.B. 2025-45). The 2026 adjusted items are in Section 4 of that document — the widely repeated "§ 3.03" citation for the capital gains table is the previous year's numbering and is wrong for 2026.
Statutory figures that are not indexed — the net investment income tax under IRC 1411, the capital loss limitation under IRC 1211(b), the 25% and 28% maximum rates under IRC 1(h), and the Section 121 exclusion amounts — are cited to the Internal Revenue Code. Method for the home-sale exclusion follows IRS Publication 523; depreciation recapture follows Publication 544; netting and carryforward follow Publication 550. State rules are cited to each state's own tax code.
Every figure and its authority is listed on the methodology page, including an explicit list of what this calculator does not model. Every worked example above was generated by the calculator's own engine when this page was built, so the prose here cannot drift away from the tool.