Tax

Tax calculator

Capital Gains Tax Calculator

Estimate your federal capital gains tax on investments, real estate, or other assets. Calculate whether your gain qualifies as short-term or long-term, and your tax owed.

Updated 5 June 2026No sign-in requiredEstimate only
Estimates only — not financial, tax, or professional advice.

Enter Your Numbers

$

What you originally paid, including commissions and fees.

$
months

Months held. Long-term = 12+ months.

$

Your total taxable income including this gain — affects the long-term rate.

Estimated Tax Owed

$4,500.00

Federal capital gains tax on this transaction.

Capital Gain

$30,000.00

Sale price minus cost basis (purchase price + fees).

Applicable Tax Rate

15.0

Federal capital gains tax rate applied to this gain.

Net Gain After Tax

$25,500.00

Capital gain minus estimated tax.

Long-Term Gain? (1=Yes, 0=No)

1

1 = held 12+ months (favorable rates); 0 = short-term (taxed as income).

Total Return %

60.0

Capital gain as a percentage of purchase price.

Report an issue

Estimate only — not financial advice; lender terms, fees, and taxes vary. Read the full disclaimer ↓

Capital Gain: Net vs Tax

Add your numbers to see the visual breakdown.

Capital Gains Tax Breakdown

How your sale breaks down into gain, tax, and net proceeds, using the same 2026 federal rate logic as the calculator above.

ItemAmount
Sale price$80,000
Cost basis (purchase price)$50,000
Capital gain$30,000
Holding periodLong-term (12+ months)
Applicable tax rate15.0%
Estimated federal tax$4,500
Net gain after tax$25,500

How It Works

Capital gains tax applies when you sell an asset for more than you paid.

Capital Gain = Sale Price − Cost Basis | Long-term: 0/15/20% by income | Short-term: ordinary income rate
  • Short-term gains (held <12 months) are taxed as ordinary income — at your marginal income tax rate.
  • Long-term gains (held 12+ months) receive preferential rates: 0% (lower income), 15% (most taxpayers), 20% (high income).
  • 2026 long-term 0% threshold: $49,450 (Single), $98,900 (MFJ). 20% threshold: $545,500 (Single), $613,700 (MFJ).
  • This calculator estimates federal tax only — state capital gains tax (0–13.3%) is not included.

Worked Example

Sold stock for $80,000, bought for $50,000, held 18 months, single filer, $75,000 income.

Capital gain

$80,000 − $50,000 = $30,000

Holding period

18 months → long-term

Income + gain

$75,000 → 15% long-term rate (between $49,450 and $545,500)

Tax owed

$30,000 × 15% = $4,500

Net gain after tax

$30,000 − $4,500 = $25,500

The 18-month holding period qualifies for the 15% long-term rate ($4,500 tax). Had the same gain been short-term and taxed at this filer’s 22% ordinary rate, the tax would be $6,600 — so waiting past 12 months saves about $2,100.

How Capital Gains Tax Works — and How to Pay Less of It

The 12-month line that changes your rate

Capital gains tax hinges on one date: the day you bought the asset. Sell within 12 months and the profit is a short-term gain, taxed as ordinary income at rates up to 37%. Hold for 12 months and a day, and the same profit becomes a long-term gain, taxed at the gentler 0%, 15%, or 20% rates. Nothing else about the sale changes — only the calendar.

That single distinction is why the holding period is the most important input here. On a $30,000 gain, the gap between a 22% short-term rate and a 15% long-term rate is about $2,100; on large gains it runs to tens of thousands.

How your income picks the long-term rate

The long-term rate is not flat — it steps from 0% to 15% to 20% based on your total taxable income for the year, and the gain itself counts toward that income. For 2026 a single filer pays 0% on long-term gains while taxable income stays under $49,450, 15% up to $545,500, and 20% above that. The thresholds are higher for married-filing-jointly and head-of-household.

Because the gain stacks on top of your other income, a large sale can straddle two bands — part taxed at 15% and part at 20%. The calculator applies the rate for the income you enter, which is a close estimate for most situations.

Your cost basis is more than the sticker price

The taxable gain is the sale price minus your cost basis, and basis is usually larger than people remember. It includes what you paid plus buying and selling commissions; for reinvested dividends, every reinvestment adds to basis; and for property, capital improvements raise it too.

Getting basis right directly lowers the tax — each dollar of basis you can document is a dollar of gain you are not taxed on. Keep brokerage statements and improvement receipts so you do not overstate the profit and overpay.

What this estimate leaves out — in both directions

Some gains are taxed less than shown. A primary home qualifies for an exclusion of up to $250,000 of gain (single) or $500,000 (married filing jointly) if you lived there two of the last five years; inherited assets get a step-up in basis to their value at death; and assets sold inside retirement accounts are not taxed as capital gains at all.

Other situations cost more. A 3.8% Net Investment Income Tax applies above $200,000 / $250,000 of modified income, real estate carries depreciation recapture taxed up to 25%, and most states tax capital gains on top of the federal bill — from nothing to over 13%.

Levers that lower the bill

The cleanest lever is time: where it fits your plan, crossing the one-year mark drops a gain to the long-term rate. The second is offsetting — selling losing positions to cancel gains dollar for dollar, with up to $3,000 of net loss usable against ordinary income each year and the rest carried forward. Mind the wash-sale rule, which disallows the loss if you rebuy the same security within 30 days.

Two more are easy to miss: if your income lands in the 0% long-term band you can realize gains tax-free up to the threshold, and holding appreciating assets inside tax-advantaged accounts defers or removes the tax entirely.

Treat this as a planning estimate

This tool uses 2026 federal rates and assumes the gain is your last dollars of income. It does not file your return or model state tax, the NIIT, depreciation recapture, the home-sale exclusion, or a basis step-up, and the capital-gains thresholds are adjusted each year.

Use it to gauge the order of magnitude and to compare selling now versus later — then confirm the current figures with the IRS and a tax professional before acting on a large sale.

Assumptions & Best Uses

  • Uses 2026 federal tax brackets and capital gains thresholds. Tax rules change annually — verify current figures with the IRS (irs.gov).
  • Assumes the capital gain is the LAST dollars of income (added on top of other income).
  • Does not include state capital gains tax, net investment income tax (3.8% NIIT), or depreciation recapture.

Limitations

  • The 3.8% Net Investment Income Tax applies to taxpayers with modified AGI above $200,000 (single) / $250,000 (MFJ) and is not included.
  • Real estate may have additional depreciation recapture tax at 25% on previously deducted depreciation.
  • Wash-sale rules, tax-loss harvesting, and step-up in basis at death are not modeled.

Frequently Asked Questions

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

Short-term gains (asset held under 12 months) are taxed as ordinary income at rates up to 37%. Long-term gains (held 12+ months) receive preferential rates of 0%, 15%, or 20% depending on income. Waiting one extra day to cross the 12-month threshold can save thousands in taxes on large gains.

What is capital gains tax on home sales?

Your primary residence gets a special exclusion: $250,000 of capital gains is excluded for single filers; $500,000 for married filing jointly — if you lived there 2 of the last 5 years. Gain above the exclusion is taxed at long-term capital gains rates. Investment properties don’t qualify for the exclusion.

What is tax-loss harvesting?

Tax-loss harvesting involves selling investments at a loss to offset capital gains. Losses offset gains dollar-for-dollar. If losses exceed gains, up to $3,000 of net capital losses can offset ordinary income per year; remaining losses carry forward to future years. The wash-sale rule disallows the loss if you rebuy the same security within 30 days.

Do I owe capital gains tax on inherited assets?

Inherited assets receive a "step-up in basis" to the fair market value at the date of inheritance. This means if you sell immediately, the taxable gain is effectively zero. This is one of the most significant capital gains tax benefits in the US tax code.

Does this calculator include state taxes or the 3.8% NIIT?

No. It estimates federal capital gains tax only. Many states tax capital gains as well (from 0% up to over 13%), and a 3.8% Net Investment Income Tax can apply at higher incomes. Real estate may also face depreciation recapture. Your total tax can therefore be higher than the figure shown here.

How does my income change the long-term rate?

Long-term gains are taxed at 0%, 15%, or 20% depending on your total taxable income, including the gain itself. Lower incomes can fall in the 0% band, most taxpayers land at 15%, and high incomes reach 20%. Because the gain stacks on top of your other income, a large gain can push part of it into a higher bracket.

Sources & References

Figures on this page are checked against primary, authoritative sources. Links open in a new tab.

Related Calculators

Tax disclaimer

Tax rules vary by country, state, tax year, filing status, income type, deductions, and exemptions. This calculator is educational and uses the values you enter. Always verify final tax treatment with official sources or a qualified tax professional.

Built and maintained by Calculator Matters, an independent calculator project. Method checked against published formulas and primary sources · Last reviewed 5 June 2026 · How we calculate · Found an error? corrections@calculatormatters.com