Capital Gains Tax Calculator

Calculate capital gains tax on stocks, real estate, or other investments.

Safe conversion with no data sent to server

Last updated: March 2026

Investment Details

Capital Gain

$4,900

Long-Term (15% rate)

Tax Amount

$735

NIIT (3.8%)

$0

Total Tax

$735

Net Profit

$4,165

Effective Tax Rate: 15%

Disclaimer: This calculator provides estimates for educational purposes only. It does not constitute financial or tax advice. Consult a qualified professional.

What is Capital Gains Tax?

Capital gains tax is the tax you owe on the profit earned when you sell a capital asset — such as stocks, bonds, mutual funds, real estate, or cryptocurrency — for more than you paid for it. The amount you originally paid is called your cost basis, and the profit above that basis is your capital gain. If the asset declined in value, the resulting capital loss can often offset other gains.

The US tax code treats capital gains differently depending on how long you held the asset. Short-term capital gains apply to assets held for one year or less and are taxed at the same ordinary income tax rates as wages — up to 37% in 2025. Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20%, depending on your total taxable income and filing status.

High-income investors may also owe an additional 3.8% Net Investment Income Tax (NIIT) on long-term gains once income exceeds $200,000 (single) or $250,000 (married filing jointly). This calculator accounts for NIIT to give you a complete picture of your total tax liability on investment sales.

How to Use This Capital Gains Tax Calculator

  1. Enter the original purchase price (cost basis) of your investment.
  2. Enter the sale price you received or plan to receive.
  3. Add any selling costs such as broker commissions or transaction fees.
  4. Enter the holding period in months — this determines short-term vs. long-term treatment.
  5. Select your filing status and enter your other taxable income so the calculator can place your gain in the correct rate tier.
  6. Review the capital gain or loss, tax amount, NIIT surcharge, and net profit after all taxes.

Tax Planning Strategies

  • Hold assets for more than one year: The single most impactful move is converting a short-term gain (taxed as ordinary income) into a long-term gain by waiting past the 12-month mark before selling.
  • Tax-loss harvesting: Selling losing positions before year-end offsets capital gains dollar for dollar, reducing your overall tax bill. Up to $3,000 of net losses can also offset ordinary income annually.
  • Use tax-advantaged accounts: Holding growth assets in Roth IRAs or 401(k)s defers or eliminates capital gains taxes entirely on appreciation within those accounts.
  • Consider the 0% long-term rate: If your total income is below approximately $48,350 (single) or $96,700 (married) in 2025, your long-term capital gains may be taxed at 0%.
  • Opportunity Zone investments: Reinvesting capital gains into Qualified Opportunity Zone funds can defer and potentially reduce taxable gains.
  • Gift appreciated assets: Donating appreciated stock to charity avoids capital gains tax and provides a deduction for the full fair market value.

FAQ

What is the difference between short-term and long-term capital gains?

Short-term gains (assets held 12 months or less) are taxed at your ordinary income tax rate, which can be as high as 37%. Long-term gains (held more than 12 months) are taxed at 0%, 15%, or 20% depending on your income. Waiting just past the one-year mark can dramatically reduce your tax bill.

What is the Net Investment Income Tax (NIIT)?

The NIIT is an additional 3.8% surtax on investment income — including capital gains — for taxpayers whose modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). This calculator adds NIIT to your total tax estimate when applicable.

Can capital losses offset ordinary income?

Capital losses first offset capital gains. If net losses exceed gains, up to $3,000 per year can offset ordinary income such as wages. Any remaining losses carry forward to future tax years indefinitely.

Is this calculator a substitute for professional tax advice?

No. This tool provides educational estimates only. Capital gains calculations can involve complex factors including depreciation recapture on real estate, wash sale rules, and state-specific taxes. Consult a qualified tax professional or CPA before executing significant investment transactions.

⚠️

Financial Disclaimer

This calculator is for informational and educational purposes only. Results are estimates and do not constitute financial advice. Actual figures depend on your specific circumstances, lender terms, and market conditions. Consult a qualified financial advisor before making financial decisions. See full disclaimer.