CalcMaven

Capital Gains Tax Calculator

Estimate taxes on investment gains for both short-term and long-term capital gains.

Inputs

$
$
$

Results

Estimated Capital Gains Tax
$2,250
Capital Gain
$15,000
Effective Tax Rate
15.00%
Net Proceeds
$22,750
NIIT (3.8%)
$0
Net Investment Income Tax

Disclaimer: This calculator provides estimates for informational purposes only. Results are not financial advice. Consult a qualified financial advisor for decisions about your specific situation. Actual rates, terms, and conditions may vary by lender and individual circumstances.

How Does the Capital Gains Tax Calculator Work?

Capital gains tax applies to the profit from selling an asset for more than its purchase price. The tax rate depends on how long you held the asset before selling. Short-term capital gains (assets held less than one year) are taxed as ordinary income at your regular tax bracket rate. Long-term capital gains (held over one year) benefit from preferential rates of 0%, 15%, or 20%, depending on your total taxable income and filing status. Additionally, high-income earners may owe a 3.8% Net Investment Income Tax (NIIT) on capital gains when their modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). This calculator estimates your tax based on the purchase price, sale price, holding period, and your regular income.

Formula: Capital Gain = Sale Price - Purchase Price; Tax = Gain × Applicable Rate

How to Use This Calculator

Enter the original purchase price (cost basis) and the sale price of your asset. Select whether you held the asset for less than one year (short-term) or more than one year (long-term). Enter your annual income from other sources to determine which bracket applies. Select your filing status. The calculator estimates total capital gains tax including any NIIT, your effective rate on the gain, and net proceeds after tax.

Example Calculation

Lisa bought stock for $15,000, sold it for $40,000 after holding it for 2 years, and earns $90,000 in other income. She files as single.

  1. 1Purchase price = $15,000
  2. 2Sale price = $40,000
  3. 3Capital gain = $40,000 - $15,000 = $25,000
  4. 4Holding period = 2 years (long-term)
  5. 5Other income = $90,000 → total income = $115,000
  6. 6Long-term rate at this income: 15%
  7. 7Capital gains tax = $25,000 × 15% = $3,750
  8. 8NIIT: Not applicable (income below $200,000)
Result: Lisa owes approximately $3,750 in capital gains tax, yielding net proceeds of $36,250 on the sale.

Understanding Your Results

Short-term gains are generally taxed much higher than long-term gains. If you are close to the one-year mark, waiting to sell can save significant money. The NIIT applies only to the lesser of your net investment income or the excess over the threshold. Your net proceeds represent the sale price minus estimated taxes, giving you the actual cash you can expect from the transaction.

Key Capital Gains Tax Factors

Holding Period

Long-term rates (0-20%) apply to assets held over 1 year. Short-term gains are taxed at ordinary income rates (10-37%).

Cost Basis

Includes purchase price plus fees, commissions, and improvements. A higher basis means lower taxable gain.

Tax-Loss Harvesting

Capital losses can offset gains dollar-for-dollar, plus up to $3,000 of ordinary income per year.

NIIT (3.8%)

An additional surtax on investment income for single filers earning over $200,000 or married couples over $250,000.

Tips & Best Practices

  • Hold investments for at least one year and one day to qualify for long-term capital gains rates.
  • Use tax-loss harvesting to offset gains — sell losing positions to reduce your taxable gain.
  • Consider the timing of sales: spreading gains across tax years can keep you in a lower bracket.
  • Remember that the primary home exclusion lets you exclude up to $250,000 ($500,000 married) in gains from selling your primary residence if you lived there 2 of the last 5 years.
  • Donating appreciated securities to charity lets you avoid capital gains tax entirely while claiming a charitable deduction.

Frequently Asked Questions

What is the 0% capital gains tax rate?
For 2024, single filers with total taxable income under $47,025 (or $94,050 married filing jointly) pay 0% on long-term capital gains. This means if your total income including the gain falls below this threshold, you pay no federal tax on the long-term gain. This is especially beneficial for retirees or those in gap years with lower income.
How are cryptocurrency gains taxed?
Cryptocurrency is treated as property by the IRS, so it follows the same capital gains rules. Selling, trading, or spending crypto triggers a taxable event. Short-term gains (held under 1 year) are taxed at ordinary rates, while long-term gains benefit from preferential rates. Track your cost basis carefully for every transaction.
Can capital losses offset my regular income?
Yes, but there are limits. Capital losses first offset capital gains dollar-for-dollar. Any remaining net loss can offset up to $3,000 per year of ordinary income. Losses beyond $3,000 carry forward to future tax years indefinitely.
Are inherited assets taxed differently?
Inherited assets receive a "stepped-up" cost basis to their fair market value on the date of the deceased person's death. This means if you inherit stock worth $50,000 that was originally purchased for $10,000, your cost basis is $50,000. If you sell for $52,000, you only owe tax on a $2,000 gain.
Do I owe capital gains tax when selling my home?
You can exclude up to $250,000 in gains ($500,000 for married filing jointly) from selling your primary residence if you owned and lived in the home for at least 2 of the last 5 years. Gains above the exclusion amount are taxed as capital gains. Investment properties do not qualify for this exclusion.
By CalcMaven Editorial TeamLast Updated: February 2026

Related Calculators

Free Capital Gains Tax Calculator — 2024 Rates | CalcMaven