Gains Estimator

Capital Gains Tax Calculator

Estimate short-term and long-term federal capital gains tax on stocks, crypto, real estate, and other asset sales for 2025.

Advertisement

Try next

💰

Income Tax Calculator

Estimate your federal tax bill

💵

Tax Refund Calculator

Will you get a refund?

🛒

Sales Tax Calculator

State & local sales tax

Enter Your Investment Information

$
$
$
Understanding Your Results

How to Read Your Capital Gains Tax Estimate

Capital gains tax trips up investors — not because the rates are complex, but because they interact with your ordinary income in ways that aren't obvious. Whether you sold stock, crypto, real estate, or a business, here's how to understand what you owe and when.

Why Capital Gains Tax Confuses People

Most investors know there's a difference between short-term and long-term rates, but fewer realize that your capital gains rate depends on your total taxable income — not just the gain itself. You might have a $50,000 long-term gain taxed at 0% if your other income is low enough, or at 15% or 20% depending on where the gain lands on the income scale. That's what this calculator is solving for.

How to Interpret Your Capital Gains Estimate — Step by Step

  1. Identify short-term vs. long-term gains. Assets held for one year or less are short-term — taxed at your ordinary income rate (up to 37%). Assets held longer than one year qualify for preferential long-term rates (0%, 15%, or 20%). The holding period is measured from the day after purchase to the day of sale.
  2. Understand how your ordinary income affects your rate. Long-term capital gains are stacked on top of your ordinary income for purposes of determining your rate. If your ordinary taxable income is $50,000 (married filing jointly) and you have a $30,000 long-term gain, the first portion of that gain may fall in the 0% bracket — this calculator handles that stacking calculation.
  3. Check for Net Investment Income Tax (NIIT). If your modified AGI exceeds $200,000 (single) or $250,000 (married), an additional 3.8% NIIT applies to the lesser of your net investment income or the amount over those thresholds. This is on top of the regular capital gains rate.
  4. Account for losses. Capital losses offset gains dollar-for-dollar. If you have losses from other sales this year, they reduce your taxable gain — enter your net gain (gains minus losses) for the most accurate estimate.

3 Common Mistakes When Using This Calculator

1
Forgetting the cost basis. Your taxable gain is the sale price minus your cost basis — what you originally paid, plus adjustments (commissions, improvements for real estate, reinvested dividends for mutual funds). Using the wrong cost basis overstates or understates your gain.
2
Assuming crypto is treated differently. The IRS treats cryptocurrency as property, not currency. Every sale, exchange, or use of crypto to purchase goods is a taxable event subject to capital gains rules — the same rates apply.
3
Missing the home sale exclusion. If you sold a primary residence, you may exclude up to $250,000 of gain ($500,000 married filing jointly) if you lived in it for at least 2 of the last 5 years. Enter the net taxable gain after exclusion, not the full gain.

What to Do Next

How It Works

How Capital Gains Tax Is Calculated

The IRS taxes capital gains differently depending on how long you held the asset. Here is how this calculator works through the math.

1

Determine Your Holding Period

Assets held more than one year qualify for long-term rates (0%, 15%, or 20%). Assets held one year or less are short-term and taxed as ordinary income at your regular bracket rate — up to 37%.

2

Calculate the Net Capital Gain

Subtract your cost basis (what you originally paid, including commissions) from your sale proceeds. The difference is your capital gain. Losses from other sales reduce this figure.

3

Stack Gains on Top of Ordinary Income

Long-term capital gains are added on top of your ordinary taxable income to determine which rate applies. If your ordinary income is low, part of your gain may fall in the 0% bracket — this calculator handles that stacking.

4

Check for Net Investment Income Tax (NIIT)

If your modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly), an additional 3.8% NIIT applies to the lesser of your net investment income or the excess above those thresholds.

Formula Reference
// Step 1 - Net Capital Gain Net Gain = Sale Proceeds - Cost Basis // Step 2 - Rate Determination (Long-Term, 2025 Single) 0% on gains where total income stays below $48,350 15% on gains where total income is $48,350 – $533,400 20% on gains where total income exceeds $533,400 // Step 3 - NIIT (if AGI exceeds threshold) NIIT = Net Investment Income x 3.8% // Short-Term Gains: taxed at ordinary income rates (10%–37%)

Worked Example: Selling Stock After 14 Months

You bought $10,000 of stock and sold it 14 months later for $16,000. Your long-term capital gain is $6,000. Your other taxable income (salary minus deduction) is $60,000.

Total income including the gain: $60,000 + $6,000 = $66,000 — which falls in the 15% long-term bracket for a single filer in 2025 (above the $48,350 threshold).

Estimated capital gains tax: $6,000 × 15% = $900. No NIIT applies because your AGI is well below $200,000.

FAQ

Frequently Asked Questions

Short-term gains apply to assets held one year or less and are taxed as ordinary income at your regular bracket rate, up to 37%. Long-term gains apply to assets held more than one year and are taxed at preferential rates of 0%, 15%, or 20% depending on your total income. The difference can be substantial — holding an asset just one day past the one-year mark can cut your tax rate significantly.
Yes. Capital losses offset gains dollar-for-dollar. If your net losses exceed your gains for the year, you can deduct up to $3,000 against ordinary income. Losses beyond that carry forward indefinitely to offset future gains or income. Enter your net gain (gains minus losses) in this calculator for the most accurate estimate.
The IRS treats cryptocurrency as property, not currency. Every sale, exchange, or use of crypto to purchase goods is a taxable event. Short-term and long-term capital gains rules apply exactly the same as with stocks — held more than one year qualifies for preferential long-term rates.
The NIIT is an additional 3.8% tax on net investment income for taxpayers whose modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). It applies on top of regular capital gains rates, bringing the effective maximum to 18.8% or 23.8% for high earners.
Yes. If you sell your primary residence and lived in it for at least 2 of the last 5 years, you may exclude up to $250,000 of gain from federal capital gains tax ($500,000 for married filing jointly). Enter only the taxable gain after the exclusion in this calculator — not the full profit from the sale.
No. This calculator estimates federal capital gains tax only. Most states tax capital gains as ordinary income at the state income tax rate. A few states — like Florida and Texas — have no income tax at all. Use our state income tax pages to estimate your state-level liability.

How to Reduce Your Capital Gains Tax

Several legal strategies can reduce or defer capital gains tax. Understanding them before you sell can save thousands of dollars.

Tax-Loss Harvesting

Capital losses offset gains dollar-for-dollar. If you have investments sitting at a loss, selling them in the same year as a gain can reduce or eliminate your taxable gain. Net losses up to $3,000 per year can also offset ordinary income. Losses beyond that carry forward to future years indefinitely. The wash-sale rule applies: you cannot repurchase a substantially identical security within 30 days before or after the sale.

The 0% Long-Term Capital Gains Rate

Long-term gains are taxed at 0% if your total taxable income (including the gain) stays below $48,350 for single filers or $96,700 for married filing jointly in 2025. In a low-income year -- retirement, sabbatical, or career transition -- it may be worth deliberately realizing gains at the 0% rate before income rises.

Hold for Long-Term Treatment

Assets held for more than one year qualify for long-term rates. The holding period begins the day after purchase and must exceed one full year -- selling on the one-year anniversary date is still short-term. The difference in tax between short-term and long-term rates can be substantial, particularly for high earners in the 22%+ brackets.

Donate Appreciated Stock

If you plan to donate to charity, donating appreciated shares directly -- rather than selling and donating cash -- eliminates the capital gains entirely. You get a charitable deduction for the full fair market value, the charity receives the full value, and no one pays capital gains tax on the appreciation.

Disclaimer: This calculator provides estimates for educational purposes only using 2025 federal capital gains tax rates. It does not account for state taxes, wash-sale rules, depreciation recapture, installment sales, or all individual tax situations. It is not tax, legal, or financial advice. Consult a qualified tax professional before making investment or tax decisions.