LawCalculators.com 2026 STATUTORY EDITION
Tax & IRS New By the LawCalculators.com Editorial Team · Published Nov 28, 2026 · 10 min read

Capital Gains Tax Calculator Guide: How to Calculate Capital Gains Tax in 2026

How a capital gains tax calculator works in 2026: long-term and short-term rates, the 3.8% NIIT, state tax and worked examples you can check yourself.

Quick answer: Capital gains tax is your sale price minus your cost basis, taxed at 0%, 15% or 20% if you held the asset more than one year, or at your ordinary rate (10% to 37%) if you held it one year or less. A 3.8% surtax can apply on top for higher incomes. For a Single filer with an $85,000 long-term gain and $45,000 of other income, the capital gains tax calculator estimates $12,083 of federal tax in 2026: $4,450 of the gain falls in the 0% band and the rest is taxed at 15%.

Open Capital Gains Tax Calculator →

Selling a stock, a rental property or a piece of land usually feels like a win until the tax question shows up. How much of the profit do you actually keep? A capital gains tax calculator answers that before you sell, when you can still change the timing, offset the gain with losses or decide that holding a few more weeks is worth it. This guide explains how the tax works in 2026, shows the exact rate thresholds, and walks through examples you can verify by hand.

What a capital gains tax calculator does

A capital gains tax calculator takes your profit, your other income and how long you owned the asset, then estimates the federal tax, the 3.8% Net Investment Income Tax (NIIT) and your state tax. Some people search for it as a calculator capital gains tax tool or a tax on capital gains calculator, but the job is the same: profit in, estimated tax out.

Our capital gains tax calculator uses the 2026 long-term rate breakpoints from IRS Rev. Proc. 2025-32 and the NIIT rules in IRC Section 1411, and it includes a state estimate for all 50 states and D.C. You enter four things: your filing status, your net realized capital gain, your other taxable income (after deductions) and whether the holding period was long-term or short-term.

How is capital gains tax calculated?

If you want to know how to calculate capital gains tax without software, follow these five steps. The same logic sits behind any tool for calculating capital gains tax.

  1. Find your cost basis. This is usually what you paid, plus purchase fees and the cost of improvements for real estate. For inherited assets the basis is generally the market value at the date of death, and for gifts it generally carries over from the giver.
  2. Calculate the gain. Subtract the adjusted basis (and selling costs) from the sale price.
  3. Check the holding period. More than one year is long-term. One year or less is short-term.
  4. Net your gains and losses. Losses on other sales offset gains. If losses are larger, up to $3,000 can reduce other income each year and the rest carries forward.
  5. Apply the rate, then add NIIT and state tax. Long-term gains use the 0%, 15% or 20% tiers. Short-term gains are taxed as ordinary income.

Long term capital gains tax calculator: 2026 rates

A long term capital gains tax calculator uses three federal rates. The rate depends on your total taxable income, including the gain, and your filing status. Here are the 2026 breakpoints.

RateSingleMarried Filing JointlyHead of HouseholdMarried Filing Separately
0%Up to $49,450Up to $98,900Up to $66,200Up to $49,450
15%$49,451 to $545,500$98,901 to $613,700$66,201 to $579,600$49,451 to $306,850
20%Over $545,500Over $613,700Over $579,600Over $306,850

These breakpoints apply to taxable income, which is income after deductions. A Single filer who takes the 2026 standard deduction of $16,100 can therefore have up to about $65,550 of total income, gain included, and still pay 0% on the gain. Long-term gains are stacked on top of your ordinary income, so only the portion of the gain that falls above a breakpoint is taxed at the higher rate.

Example: how the stacking works

A Single filer has $40,000 of taxable income before the gain and a $20,000 long-term gain. The first $9,450 of the gain fits under the $49,450 zero-rate line and is taxed at 0%. The remaining $10,550 is taxed at 15%, which is $1,582.50 of federal tax on a $20,000 gain, an effective rate of about 7.9%.

Short term capital gains tax calculator: ordinary income rates

A short term capital gains tax calculator works differently because there is no preferential rate. Gains on assets held one year or less are added to your wages and other income and taxed at your marginal bracket, which ranges from 10% to 37% in 2026. For many working households that means 22% or 24%. Our calculator stacks a short-term gain on top of your other taxable income and applies the actual 2026 brackets.

The gap can be large. On a $10,000 gain, a 15% long-term rate costs $1,500 in federal tax, while a 22% short-term rate costs $2,200. If you are close to the one-year mark, checking the exact purchase date before you sell can save real money.

Stock capital gains tax calculator: what to enter

A stock capital gains tax calculator needs your sale proceeds and your adjusted cost basis. Subtract one from the other and enter the net gain. A few details matter:

For stock sales where you want to enter proceeds and basis separately, use the stock tax calculator. For qualified dividends, which share the same 0%, 15% and 20% rates, try the dividend tax calculator, and for digital assets use the crypto tax calculator.

The 3.8% Net Investment Income Tax

Higher earners can owe an extra 3.8% on investment income. The tax applies to the lesser of your net investment income or the amount your modified adjusted gross income (MAGI) exceeds the threshold for your filing status.

Filing statusMAGI threshold
Single / Head of Household$200,000
Married Filing Jointly$250,000
Married Filing Separately$125,000

These thresholds are set by statute and are not indexed for inflation, so more taxpayers cross them each year.

Worked examples from the calculator

These three examples use the inputs and logic of our capital gains tax calculator. The first two use California as the state, which is the calculator's default.

ScenarioFederal rateNIITState taxTotal estimate
$85,000 long-term gain, $45,000 other income (CA)0% and 15% ($12,083)$0$7,642$19,725
$85,000 short-term gain, $45,000 other income (CA)12% to 24% ($18,646)$0$7,642$26,288
$300,000 long-term gain, $150,000 other income (federal only)15% ($45,000)$10,112Varies$55,112 federal

The first two rows show the cost of selling too early: the same $85,000 gain costs $6,563 more in federal tax when it is short-term. In the third row, the calculator estimates MAGI by adding the $16,100 standard deduction back to $450,000 of taxable income, which gives $466,100. That is $266,100 over the $200,000 NIIT threshold, so 3.8% applies to $266,100 of the gain, which is $10,112.

What the calculator simplifies

No online estimate replaces a tax return, so it helps to know the assumptions. Our calculator asks for your other taxable income after deductions, stacks the gain on top and applies the 2026 breakpoints for Single, Married Filing Jointly or Head of Household. It does not net your losses for you, and it estimates MAGI for the NIIT by adding back the standard deduction. Special rates also exist outside the calculator: collectibles can be taxed up to 28%, and unrecaptured gain on depreciated real estate up to 25%.

Capital gains tax on real estate and home sales

Property follows the same basic rules, with one big exception. If you owned and used a home as your main residence for at least two of the five years before the sale, you can exclude up to $250,000 of gain, or $500,000 for most married couples filing jointly (IRC Section 121). Gain above the exclusion is taxed like any other long-term gain. Investment and rental property do not get the exclusion, and depreciation you claimed can be taxed at up to 25%. For rental owners, the rental income tax calculator covers the income side.

How your state changes the result

Federal tax is the same everywhere. State tax is what varies. Most states with an income tax tax capital gains as ordinary income, a few offer partial exclusions, and states without an income tax, such as Texas and Florida, do not tax the gain as income. Washington is a notable exception with a separate excise tax on certain large long-term gains. California, for example, has no lower rate for long-term gains, which is why the calculator shows $7,642 of state tax on an $85,000 gain.

How to use the capital gains tax calculator

  1. Open the capital gains tax calculator and choose your state.
  2. Enter your net realized capital gain (proceeds minus cost basis).
  3. Choose your filing status and enter your other taxable income for the year, after deductions.
  4. Select Long-Term (more than one year) or Short-Term (one year or less).
  5. Read the federal rate, NIIT and state tax in the breakdown.

Run it twice to compare selling now against waiting past the one-year mark, or selling this year against next year when your income may be lower.

Practical ways to lower your capital gains tax

For large sales, a licensed tax professional can review your full situation, including state rules and any special rates.

Open Capital Gains Tax Calculator → ← Back to All Blog Posts

Informational estimate: This article and the linked calculator provide general estimates for education only. They are not legal, tax or accounting advice. Figures reflect Tax Year 2026 federal data (IRS Rev. Proc. 2025-32) as used in our calculator; confirm your exact tax with a qualified tax professional or the IRS.

Frequently Asked Questions

Subtract your cost basis (what you paid plus eligible costs) from the sale price to find your gain. Check whether you held the asset for more than one year. Long-term gains are taxed at 0%, 15% or 20% depending on your taxable income and filing status, while short-term gains are taxed at ordinary income rates of 10% to 37%. Add the 3.8% Net Investment Income Tax if your income is above the threshold, then add any state tax.
Your gain is the sale proceeds minus your adjusted cost basis. If you owned the shares for more than one year, the gain is long-term and uses the 0%, 15% or 20% rates. If you held them for one year or less, the gain is added to your ordinary income. Capital losses from other sales can offset the gain first.
For 2026 the rates are 0%, 15% and 20%. For Single filers, 0% applies up to $49,450 of taxable income, 15% up to $545,500 and 20% above that. For Married Filing Jointly the breakpoints are $98,900 and $613,700, and for Head of Household they are $66,200 and $579,600.
There is no separate short-term rate. Gains on assets held one year or less are taxed as ordinary income at your marginal rate, which ranges from 10% to 37% in 2026. Our calculator applies the actual 2026 brackets to a short-term gain stacked on your other income.
Under IRC Section 1411, the 3.8% tax applies to the lesser of your net investment income or the amount your modified adjusted gross income exceeds $200,000 (Single or Head of Household), $250,000 (Married Filing Jointly) or $125,000 (Married Filing Separately). These thresholds are not adjusted for inflation.
Yes. Capital losses first offset capital gains of the same year. If losses exceed gains, you can deduct up to $3,000 ($1,500 if Married Filing Separately) against other income and carry the rest forward to future years. The wash sale rule can disallow a loss if you buy the same or a substantially identical security within 30 days before or after the sale.
Often not on the whole gain. If you owned and lived in the home for at least two of the five years before the sale, you can exclude up to $250,000 of gain ($500,000 for most married couples filing jointly) under IRC Section 121. Gain above the exclusion, and gain on rental or investment property, can be taxable.
Most states with an income tax treat capital gains as ordinary income, so the state rate depends on where you live. States with no income tax, such as Texas and Florida, do not tax gains as income, although Washington has a separate excise tax on certain large long-term gains. Our calculator includes a state estimate for all 50 states and D.C.
Yes, the LawCalculators.com capital gains tax calculator is free. It gives a planning estimate using 2026 federal rate breakpoints, the 3.8% NIIT and a state tax model. It does not model every deduction or special rate, so confirm your final figure with tax software or a qualified tax professional.