UseCalcPro
Home
MathFinanceHealthConstructionAutoPetsGardenCraftsFood & BrewingTools
Blog
  1. Home
  2. Finance

Capital Gains Tax Calculator

Calculate taxes on investment profits

Total Tax

$3,000

Effective Rate

20.0%

Net Profit

$12,000

Long-term

15% bracket

$
$
$
%
$

Offset gains with realized investment losses. Excess losses deductible up to $3,000/year.

Total Tax

$3,000

Effective Rate

20.0%

Net Profit

$12,000

Holding Period

Long-term

Tax Breakdown

Capital Gain$15,000
Federal Tax (15%)$2,250
NIIT (3.8%)$0
State Tax$750
Total Tax$3,000

Frequently Asked Questions

Q

What are long-term vs short-term capital gains?

Long-term gains are from assets held over 12 months, taxed at 0%, 15%, or 20%. Short-term gains (held 12 months or less) are taxed as ordinary income at your marginal tax rate, which can be up to 37%.

  • Holding 366+ days qualifies for long-term rates (0%, 15%, or 20%)
  • Short-term gains add to ordinary income – could push you into a higher bracket
  • Difference can be huge: 37% short-term vs 15% long-term on the same $50K gain saves $11,000
  • The holding period starts the day after purchase and includes the sale date
Income Range (Single)Short-Term RateLong-Term Rate
Up to $47,02510–12%0%
$47,026–$100,52522%15%
$100,526–$191,95024%15%
$191,951–$518,90032–35%15%
Over $518,90037%20%
Q

What are the 2024 long-term capital gains rates?

0% rate: Single filers up to $47,025, married up to $94,050. 15% rate: Single $47,026-$518,900, married $94,051-$583,750. 20% rate: Above these thresholds.

  • A married couple with $80K total income pays 0% on long-term gains
  • Most middle-income filers fall in the 15% bracket
  • The 20% rate only kicks in above $518,900 (single) or $583,750 (married)
  • These thresholds are based on taxable income (after deductions), not gross income
Q

What is the Net Investment Income Tax (NIIT)?

The NIIT is an additional 3.8% tax on investment income (including capital gains) for individuals with modified AGI over $200,000 (single) or $250,000 (married). This is on top of regular capital gains tax.

  • Applies to: capital gains, dividends, rental income, interest, and royalties
  • Single filer with $250K AGI and $50K gain: NIIT = min($50K, $250K–$200K) × 3.8% = $1,900
  • NIIT thresholds are NOT adjusted for inflation – more filers hit it each year
  • Can raise your effective long-term rate from 15% to 18.8% (or 20% to 23.8%)
Q

How can I reduce capital gains tax?

Strategies include: Hold investments over 12 months, harvest tax losses, use tax-advantaged accounts (401k, IRA), consider qualified opportunity zones, donate appreciated assets, and time sales in lower-income years.

  • Hold 12+ months to drop from up to 37% to 0–20% tax rate
  • Tax-loss harvesting: offset gains with losses (up to $3,000 net loss deduction/year)
  • Roth IRA/401(k) gains grow tax-free – $0 capital gains on qualified withdrawals
  • Donate appreciated stock: deduct fair market value without paying gains tax
  • Time sales in low-income years (retirement, sabbatical) to hit 0% bracket
Q

Are crypto gains taxed the same as stocks?

Yes, the IRS treats cryptocurrency as property. Short-term crypto gains are taxed as ordinary income; long-term gains get preferential rates. Every trade, including crypto-to-crypto, is a taxable event.

  • Every swap (BTC to ETH, crypto to stablecoin) triggers a taxable event
  • Mining/staking income is taxed as ordinary income at fair market value when received
  • NFT sales follow the same capital gains rules as other digital assets
  • Use crypto tax software to track cost basis across exchanges ($50–$200/year)
Q

Is there a capital gains exclusion for home sales?

Yes, if you lived in your home 2 of the last 5 years, you can exclude up to $250,000 of gain (single) or $500,000 (married) from taxes. Any gain above this is taxed at capital gains rates.

  • Must live in the home 2 of the last 5 years (does not have to be consecutive)
  • Single: exclude up to $250,000 of gain; married filing jointly: up to $500,000
  • Can use this exclusion once every 2 years
  • Home improvements (new roof, kitchen remodel) add to your cost basis, reducing taxable gain
  • Inherited homes get a "stepped-up" basis to fair market value at time of death

Example Calculations

1Long-Term Stock Sale: $15,000 Gain (Single, $75K Income)

Inputs

Purchase Price$10,000
Sale Price$25,000
Holding Period18 months
Other Annual Income$75,000
State Tax Rate5%
Filing StatusSingle

Result

Net Profit After Tax$11,750
Capital Gain$15,000
Federal Tax (15%)$2,250
NIIT (3.8%)$0
State Tax (5%)$750
Total Tax$3,000
Effective Rate20.0%

Gain = $25,000 - $10,000 = $15,000. Held 18 months (long-term). Total income = $75,000 + $15,000 = $90,000. Since $90,000 is between $47,025 and $518,900, the long-term rate is 15%. Federal tax = $15,000 x 15% = $2,250. NIIT = $0 (under $200K threshold). State tax = $15,000 x 5% = $750. Total tax = $3,000. Net profit = $12,000.

2Short-Term Crypto Sale: $20,000 Gain (Single, $50K Income)

Inputs

Purchase Price$5,000
Sale Price$25,000
Holding Period6 months
Other Annual Income$50,000
State Tax Rate0%
Filing StatusSingle

Result

Net Profit After Tax$15,601
Capital Gain$20,000
Federal Tax$4,399
NIIT (3.8%)$0
State Tax (0%)$0
Total Tax$4,399
Effective Rate22.0%

Gain = $25,000 - $5,000 = $20,000. Held 6 months (short-term, taxed as ordinary income). Other income of $50,000 fills brackets up to the 22% bracket. The $20,000 gain is taxed in the remaining brackets: the first portion in the 22% bracket (up to $100,525), yielding a blended federal tax of $4,399. No NIIT (under $200K). No state tax. Net profit = $15,601.

Formulas Used

Capital Gain

Capital Gain = Sale Price - Purchase Price

The profit from selling an asset, which is the basis for tax calculation.

Where:

Sale Price= The price at which you sold the asset
Purchase Price= The original cost basis of the asset

Long-Term Capital Gains Tax

Federal Tax = Gain x LT Rate (0%, 15%, or 20% based on total income)

Assets held over 12 months qualify for preferential long-term rates based on total income (other income + gain).

Where:

LT Rate= 0% up to $47,025 (single) / $94,050 (married); 15% up to $518,900 / $583,750; 20% above
Total Income= Other annual income plus the capital gain

Net Investment Income Tax (NIIT)

NIIT = Min(Gain, Total Income - Threshold) x 3.8%

An additional 3.8% tax on investment income when total income exceeds the threshold.

Where:

Threshold= $200,000 for single filers; $250,000 for married filing jointly
3.8%= Net Investment Income Tax rate

Total Tax & Net Profit

Total Tax = Federal Tax + NIIT + State Tax; Net Profit = Gain - Total Tax

Combines all tax components to determine your after-tax profit.

Where:

State Tax= Gain x State capital gains tax rate
Net Profit= Capital gain minus all taxes paid

Related Calculators

Investment Calculator

Project returns

Compound Interest

Calculate growth

Estate Tax Calculator

Enter your estate value, debts, and filing status to see federal estate tax owed after the $13.61M exemption. Shows net amount passed to heirs after deductions.

Income Tax Calculator

Enter your income and deductions to see your federal and state tax breakdown. Shows marginal vs effective rate and after-tax income for 2024 brackets.

Property Tax Calculator

Enter your home value and state to estimate annual and monthly property taxes. Compares effective rates across all 50 states with assessment adjustments.

Muscle Gain Rate Calculator

Estimate your natural muscle gain potential by training experience, age, and gender. Uses Alan Aragon and Lyle McDonald models for realistic projections.

Related Resources

Savings Goal Calculator: How Much to Save Each Month

Read our guide

How to Calculate Tips: Complete Guide for US Restaurants

Read our guide

Down Payment Guide: How Much You Need and How to Save It

Read our guide

Mortgage Calculator

Calculate monthly mortgage payments

Compound Interest Calculator

See the power of compound growth

Budget Calculator

Plan your monthly budget

More Tax Calculators

Plan your taxes

View All

Last Updated: Mar 13, 2026

This calculator is provided for informational and educational purposes only. Results are estimates and should not be considered professional financial, medical, legal, or other advice. Always consult a qualified professional before making important decisions. UseCalcPro is not responsible for any actions taken based on calculator results.

UseCalcPro
FinanceHealthMath

© 2026 UseCalcPro