Popular: Paycheck · Mortgage · Income tax · Retirement · Auto loan

Capital Gains Tax Calculator 2026

Estimate the tax bill before you sell, so you can plan what to do with the cash left from your investment gain.

Your numbers

After deductions.

Nothing you enter is sent or stored.

Result

…

Verify before you act: review these results with a CPA, enrolled agent or tax attorney before making any decision based on them.

What is capital gains tax?

Capital gains tax is tax on the profit you make when you sell an investment. This capital gains calculator estimates tax on stocks, crypto or property using your sale price, cost basis, selling costs, holding period, other taxable income and state tax rate.

Your gain is your sale price minus your cost basis and selling costs. Cost basis is generally what you paid for the investment, adjusted where applicable. A sale price is not the same as a gain: you owe tax on the gain, not automatically on the full amount you receive from the sale. Short-term gains are taxed as ordinary income. A gain on an investment held more than a year may qualify for long-term capital gains rates.

Why capital gains tax matters

The tax can change how much cash you have after selling. Estimating it before you sell can help you decide whether to sell now, wait, use proceeds to pay down debt, buy another investment or set aside money for retirement. It can also help you compare the sale proceeds with what you need for a major purchase.

For 2026, long-term gains stack on your other taxable income. The federal long-term rates are 0% up to $49,450 for single filers and $98,900 for joint filers; 15% up to $545,500 for single filers and $613,700 for joint filers; and 20% above those ceilings. These are marginal thresholds, so different portions of a gain can fall into different rate bands. The calculator also estimates the 3.8% net investment income tax when applicable. State tax can add to the total.

How to use this capital gains tax calculator

  1. Choose your filing status. The federal thresholds described here are for single and joint filers.
  2. Enter the sale price and cost basis. Use your tax records to check what you paid and any applicable basis adjustments.
  3. Enter selling costs, such as costs directly tied to the sale. These reduce the gain in the calculator.
  4. Select whether you held the investment more than a year. This affects whether the estimate uses long-term rates or treats the gain as ordinary income.
  5. Enter your other taxable income. This helps estimate where a long-term gain falls in the federal rate bands.
  6. Enter the state tax rate on gains that applies to you. State rules differ, so check the rate and treatment for your situation rather than relying on a guess.

Capital gains tax calculator example

Worked example

Suppose you file single, sell for $50,000, have a $30,000 cost basis and no selling costs, held the investment more than a year, have $70,000 in other taxable income, and enter a 0% state tax rate. The gain is $20,000. The estimated federal capital gains tax is $3,000, the net investment income tax is $0, state tax is $0, and total tax is $3,000. The effective rate on the gain is 15.0%, leaving $17,000 after the estimated tax.

How to read your capital gains tax estimate

The estimated tax on the gain is the total of federal capital gains tax, net investment income tax and state tax. Review the gain calculation first. If the basis or selling costs are wrong, the tax estimate will be wrong too.

The effective rate on the gain compares estimated total tax with the gain itself. It is not your tax rate on all income. The federal line estimates tax under the selected holding period and income assumptions. The state line depends on the rate you entered, so it may not capture every state-specific rule or tax treatment.

How to reduce or plan for capital gains tax

  1. 01

    Check the sale date

    If you have not sold yet, compare the tax estimate for selling now with the result if you hold the investment more than a year. Long-term treatment may reduce the rate, but waiting also means keeping the investment risk. Consider your full financial plan before changing your timing.

  2. 02

    Review losses and charitable gifts

    Consider whether investment losses can offset gains, or whether giving appreciated shares to charity fits your plans. Keep clear transaction records and ask a tax professional how the rules apply to you.

  3. 03

    Confirm your basis and costs

    Check purchase confirmations, account statements and sale records. For crypto, reconcile transactions across the accounts you used. A complete record can help prevent an overstated gain.

  4. 04

    Set aside the estimated tax

    Before using sale proceeds for a purchase, debt payment or retirement spending, reserve an amount for the estimated tax. Consider confirming payment timing and the final amount with a qualified tax professional.

Common capital gains tax calculator mistakes

  • Entering the sale price as the gain

    The gain is the sale price minus basis and selling costs. Entering the full proceeds as profit can overstate the estimate.

  • Using gross income instead of taxable income

    The calculator asks for other taxable income because long-term gains stack on taxable income. If you are estimating that figure, account for deductions and other relevant tax details.

  • Choosing the wrong holding period

    A short-term gain is taxed as ordinary income in this estimate. Check the dates you acquired and sold the asset before selecting the holding period.

  • Assuming the estimate covers every tax rule

    A home sale exclusion, loss carryovers, unusual basis adjustments or state-specific treatment can change your result. The calculator is an estimate, not a tax return.

The capital gains tax formula

Gain = sale price - basis - selling costs. Long-term gains stack on your other taxable income: 0% up to $49,450 single ($98,900 joint), 15% up to $545,500 ($613,700 joint), 20% above. Short-term gains are ordinary income.

The 3.8% net investment income tax applies above $200,000 single or $250,000 joint.

Key terms

Cost basis
The amount used to determine your investment gain or loss, generally based on what you paid and any applicable adjustments.
Long-term capital gain
A gain on an investment held more than a year. The calculator estimates federal tax using the long-term rate thresholds.
Net investment income tax
An additional 3.8% tax that may apply to investment income when income is above the applicable threshold.
Effective rate on the gain
Estimated total tax divided by the capital gain. It describes the tax burden on the gain, not your overall income tax rate.

Capital gains tax questions

How do I avoid capital gains tax?

Hold over a year, harvest losses, give appreciated shares to charity, or use the home sale exclusion where it applies.

How are short-term capital gains taxed?

Short-term gains are treated as ordinary income in this estimate. Your other taxable income and filing status help determine the applicable federal tax.

Does this calculator include the net investment income tax?

Yes. It estimates the 3.8% net investment income tax when income is above $200,000 for single filers or $250,000 for joint filers. Your actual tax can depend on details beyond the calculator inputs.

Does the calculator include state capital gains tax?

It includes the state tax rate you enter. State tax rules vary, so verify the rate and treatment that apply to your investment and filing situation.

Can I use this for crypto or property?

You can use it for a gain from crypto or property by entering the relevant sale price, basis and selling costs. Special rules, including a home sale exclusion where it applies, may affect the final tax.

Sources

Before you act on this result. Cordwell calculators and guides are educational estimates, not legal, tax, investment, lending or other professional advice. They rely on the numbers you enter and on simplified rules, and they can't see your full situation. Before you file, sign, borrow, invest, hire, change your withholding or form a business based on anything here, meet with a CPA, enrolled agent or tax attorney who can review your specific facts and confirm the numbers. Rules change, and official agency guidance always controls.

How we write and check these pages.

Related calculators