Modoo
English

Capital Gains Tax Calculator for 2026 and 2027

Find the federal tax on a sale of stock, crypto or a home for 2026 or 2027: short-term vs long-term, the 0%, 15% and 20% rates, the 3.8% NIIT and losses.

How long you owned it
Start counting the day after you bought it; the day you sell counts. Inherited property is always long-term.
Other gains, dividends and deductions

$3,750 federal tax on your $25,000 gain

Held more than 1 year, so it is a long-term gain. All of it is taxed at 15%. That is 15% of the gain.

Tax on this sale
$3,750
Gain
$25,000
Rate on the gain
15%
Tax-free room
$0

Sold within 1 year, the same gain would be short-term and cost $5,500, $1,750 more.

Taxable income with the sale: $93,900. For 2026, single filers pay 0% on long-term gains up to $49,450 of taxable income and 15% up to $545,500.

How it is figured for 2026

Sale price$60,000
Cost basis$35,000
Gain$25,000
Schedule D line 7 · net short-term$0
Line 15 · net long-term$25,000
Line 16 · combined$25,000
Other income$85,000
Adjusted gross income$110,000
Standard deduction−$16,100
Taxable income$93,900
Gains and dividends at 15%$25,000
Income tax (Form 1040 line 16)$13,626
Net investment income tax (Form 8960)$0
Total with the sale$13,626
Total without it$9,876
Tax on this sale$3,750

2026 long-term rates, single

RateTaxable income
0%Up to $49,450
15%Over $49,450 to $545,500
20%Over $545,500

Short-term gains are taxed at the ordinary rates, 10% to 37%. The 3.8% net investment income tax adds on above modified AGI of $200,000.

2026 long-term capital gains tax rates

Long-term gains, on things you owned for more than 1 year, are taxed at 0%, 15% or 20%. Which rate applies depends on your taxable income for the year, the gain included. These are the 2026 limits from Rev. Proc. 2025-32, for the return you file in 2027.

Filing status, 20260% up to15% up to20% over
Single$49,450$545,500$545,500
Married filing jointly, surviving spouse$98,900$613,700$613,700
Married filing separately$49,450$306,850$306,850
Head of household$66,200$579,600$579,600

2027 long-term capital gains tax rates

For sales in 2027 the limits rise with inflation, under Rev. Proc. 2026-35, released November 5, 2026.

Filing status, 20270% up to15% up to20% over
Single$51,050$563,200$563,200
Married filing jointly, surviving spouse$102,100$633,600$633,600
Married filing separately$51,050$316,800$316,800
Head of household$68,350$598,400$598,400

Your other income decides the rate

Your gain sits on top of your other taxable income. The part of it that still fits under the 0% limit pays nothing, the next part pays 15% and anything over the 15% limit pays 20%. That is why the same gain can be taxed very differently from one person to another.

Take a single filer with $85,000 of other income who sells shares bought for $35,000 at $60,000. After the $16,100 standard deduction, taxable income is $93,900, well past the $49,450 limit, so the whole $25,000 gain is taxed at 15%: $3,750. With $30,000 of other income instead, taxable income comes to $38,900 and the gain pays $0, with room for $10,550 more at 0%.

Short-term vs long-term

A gain or loss on something held more than 1 year is long-term; held 1 year or less, it is short-term (26 U.S.C. 1222). To count, start on the day after you bought it, and count the day you sell. The IRS example in Pub. 550: bought January 31, 2024, and sold January 29, 2025, is short-term; sold February 6, 2025, it is long-term. For stocks, use the trade dates. Property you inherited is long-term however briefly you held it.

Short-term gains get no special rate. They are taxed like wages, at the ordinary brackets of 10% to 37%. In the example above, the same $25,000 gain sold within a year would cost $5,500, at the 22% bracket, instead of $3,750.

The 3.8% net investment income tax

On top of the income tax, a 3.8% tax applies to the smaller of your net investment income or your modified AGI over $200,000 single or head of household, $250,000 married filing jointly or surviving spouse, or $125,000 married filing separately (26 U.S.C. 1411). These thresholds are not adjusted for inflation. Capital gains, interest, dividends and rents count as investment income; wages do not.

A single filer with $180,000 of other income and a $50,000 long-term gain has modified AGI of $230,000. The 3.8% tax applies to the $30,000 over $200,000, adding $1,140 to the $7,500 of income tax at 15%: $8,640 on the gain. You figure it on Form 8960.

Capital losses and the $3,000 limit

Losses first cancel out gains. Short-term results are netted with each other and long-term with each other, and then the two totals are combined on Schedule D, line 16. If the combined result is a loss, up to $3,000 of it ($1,500 married filing separately) comes off your other income for the year (26 U.S.C. 1211(b)). The rest carries over to next year, keeping its short-term or long-term character, and can be carried forward until it is used up (26 U.S.C. 1212(b)).

Selling shares at a $10,000 loss with no other gains, a single filer with $85,000 of other income deducts $3,000, saving $660 at the 22% bracket, and carries $7,000 over to 2027. Buying the same or a substantially identical stock within 30 days before or after a loss sale makes it a wash sale, and the loss can’t be deducted then (Pub. 550).

Selling your home

If you owned your main home and lived in it for at least 2 of the 5 years before the sale, you can exclude up to $250,000 of the gain, or $500,000 on a joint return when both spouses lived there and either one owned it (26 U.S.C. 121). Only the gain above that is taxed, as a long-term gain. You generally can’t use the exclusion if you used it for another home in the 2 years before the sale.

A single filer who sells for $650,000 a home bought for $300,000 has a $350,000 gain. $250,000 is excluded, and the other $100,000 is taxed at 15%: $15,000 with $85,000 of other income. A loss on a home you lived in is a personal loss and can’t be deducted (IRS Topic 409). Pub. 523 has the complete rules and worksheets.

What this calculator leaves out

  • Collectibles such as coins and art, and the taxable part of section 1202 small business stock, are taxed at up to 28%; the unrecaptured section 1250 gain from depreciation on rental or business real estate at up to 25%. This tool taxes all long-term gains at 0%, 15% and 20%.
  • State and local income taxes, which differ from state to state.
  • The alternative minimum tax, credits, wash sale adjustments and partial home exclusions.
  • The basis of property you received as a gift or inheritance, which has its own rules (Pub. 551).

Paying the tax

With a taxable gain you may need to make estimated tax payments (Pub. 505). Report each sale on Form 8949 and total them on Schedule D, unless your broker reported the basis and you can put the totals straight on Schedule D.

How this tool counts

  • It figures your whole federal return twice, with the sale and without it, and shows the difference as the tax on the sale.
  • 2026 uses the tax rate tables, capital gains limits and standard deduction in Rev. Proc. 2025-32; 2027 uses Rev. Proc. 2026-35.
  • Income tax follows the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions. Under $100,000 of taxable income it uses the Tax Table, each row worked at its middle: that gives the same tax as all 2,059 rows of the 2026 Tax Table in the draft instructions created November 24, 2026. The 2027 table is not out yet, so 2027 rows are worked the same way.
  • It includes the enhanced deduction for seniors for 2025 through 2028: $6,000 each for those 65 or older, less 6% of modified AGI over $75,000 ($150,000 joint), so a gain can shrink it.
  • Losses follow Schedule D lines 16 and 21 and the Capital Loss Carryover Worksheet in its instructions.
  • Amounts you enter are rounded to whole dollars first, and the tax is shown to the dollar.

  • IRS Rev. Proc. 2025-32, 2026 inflation adjusted items · https://www.irs.gov/pub/irs-drop/rp-25-32.pdf — Section 4.01 Tables 1 to 4: the 2026 tax rate tables. Section 4.03: maximum zero rate amount $98,900 married filing jointly and surviving spouse, $49,450 married filing separately, $66,200 head of household, $49,450 all other individuals; maximum 15 percent rate amount $613,700, $306,850, $579,600 and $545,500. Section 4.14: standard deduction $32,200 / $24,150 / $16,100, additional amount for the aged or blind $1,650 ($2,050 unmarried).
  • IRS Rev. Proc. 2026-35, 2027 inflation adjusted items (IR-2026-133, November 5, 2026) · https://www.irs.gov/pub/irs-drop/rp-26-35.pdf — Section 3.01 Tables 1 to 4: the 2027 tax rate tables. Section 3.03: maximum zero rate amount $102,100 married filing jointly and surviving spouse, $51,050 married filing separately, $68,350 head of household, $51,050 all other individuals; maximum 15 percent rate amount $633,600, $316,800, $598,400 and $563,200. Section 3.15: standard deduction $33,200 / $24,925 / $16,600, additional amount for the aged or blind $1,700 ($2,100 unmarried).
  • 26 U.S.C. 1222, 1211 and 1212 (United States Code, 2024 edition) · https://www.govinfo.gov/link/uscode/26/1222?link-type=html — 1222: long-term means held for more than 1 year, short-term for not more than 1 year. 1211(b): capital losses are allowed to the extent of gains plus the lower of $3,000 ($1,500 for a married individual filing a separate return) or the excess of losses over gains. 1212(b): the rest of a net capital loss carries to the next year as short-term or long-term loss.
  • 26 U.S.C. 1411, Net investment income tax (United States Code, 2024 edition) · https://www.govinfo.gov/link/uscode/26/1411?link-type=html — (a)(1): 3.8 percent of the lesser of net investment income or modified adjusted gross income over the threshold amount. (b): $250,000 on a joint return or for a surviving spouse, one half of that for married filing separately, $200,000 in any other case. (c)(1): net investment income includes interest, dividends, rents and net gain from the disposition of property.
  • 26 U.S.C. 121, Exclusion of gain from sale of principal residence (United States Code, 2024 edition) · https://www.govinfo.gov/link/uscode/26/121?link-type=html — (a): gain is excluded if the property was owned and used as the principal residence for periods aggregating 2 years or more during the 5 years ending on the date of the sale. (b)(1): up to $250,000. (b)(2)(A): $500,000 on a joint return if either spouse meets the ownership test, both meet the use test and neither is barred by the 2-year rule.
  • IRS Schedule D (Form 1040) 2025 and its instructions · https://www.irs.gov/pub/irs-pdf/i1040sd.pdf — Line 16 combines net short-term (line 7) and net long-term (line 15); if line 16 is a loss, line 21 is the smaller of the loss or $3,000 ($1,500 married filing separately). The Capital Loss Carryover Worksheet, lines 1 to 13.
  • IRS Instructions for Form 1040 (2026), draft created November 24, 2026 · https://www.irs.gov/pub/irs-dft/i1040gi--dft.pdf — Qualified Dividends and Capital Gain Tax Worksheet, lines 1 to 25 (line 3: the smaller of Schedule D line 15 or 16, zero if either is a loss). The 2026 Tax Table, used under $100,000 of taxable income: every row of it matches this tool.
  • IRS Instructions for Form 8960, Net Investment Income Tax · https://www.irs.gov/pub/irs-pdf/i8960.pdf — Line 5a: net gain or loss from the disposition of property, from Form 1040 line 7a, so an allowed capital loss lowers investment income.
  • IRS Publication 550, Investment Income and Expenses · https://www.irs.gov/publications/p550 — Holding period: begin counting on the date after the day you acquired the property; the day you disposed of it is part of the holding period. Inherited property is treated as long-term. Wash sales: a loss is not deductible if you buy substantially identical stock or securities within 30 days before or after the sale.
  • IRS Topic no. 409, Capital gains and losses, and Topic no. 701, Sale of your home · https://www.irs.gov/taxtopics/tc409 — Collectibles and the taxable part of section 1202 stock are taxed at a maximum 28% rate and unrecaptured section 1250 gain at a maximum 25% rate. Losses from the sale of personal-use property, such as your home or car, aren't tax deductible. Topic 701: the $250,000/$500,000 home sale exclusion and its ownership and use tests.

Estimates for planning only, not tax advice. Based on federal rules for the tax year shown; state and local taxes, credits, other deductions and your own situation can change the result. Check IRS guidance or ask a tax professional before you file.

Everything is calculated in your browser. Nothing you enter is sent or stored. Ads on this page use cookies — see Privacy.