Capital Gains Tax Calculator

Estimate federal tax on investment and property gains.

Details

$
$
Holding period

Capital gains tax

$2,250

15% effective rate on a $15,000 gain

Capital gain

$15,000

Federal tax

$2,250

Net after tax

$12,750

Effective rate

15%

Tax year 2026 · federal only · estimate.

This estimates the tax on an investment gain, using either the long-term capital gains rates or ordinary income rates depending on how long you held the asset.

It shows the gain, the rate that applies and the tax due, so you can see what the holding period is worth.

How capital gains tax works

A capital gain is the profit when you sell something for more than you paid. Tax is only due when you sell; an investment that has risen but not been sold is not taxed.

How much you pay depends almost entirely on one thing: how long you held it. Hold for more than one year and the gain is long-term, taxed at 0%, 15% or 20% depending on your income. Hold for a year or less and it is short-term, taxed as ordinary income at your normal rate.

The gap is large enough to be worth planning around. On a $50,000 gain, the difference between the 15% long-term rate and a 24% ordinary rate is $4,500, decided by the sale date alone.

A $50,000 gain, one day either side of a year
Held 366 dayslong-term, 15% = $7,500
vs
Held 365 daysshort-term, 24% = $12,000

The holding period must be more than one year, so the day you cross matters. A single day of patience is worth $4,500 on this gain.

What to enter

Purchase price (cost basis)
What you paid, plus commissions and fees. Reinvested dividends add to basis too, and forgetting them means overpaying tax.
Sale price
What you received, after selling costs.
Holding period
More than one year is long-term. A year or less is short-term. This is the input that changes the rate.
Taxable income and filing status
Long-term rates are 0%, 15% or 20% depending on where your income falls. Short-term gains simply use your marginal rate.

Short-term against long-term

Short-term (a year or less)
Taxed as ordinary income, at whatever your marginal rate is. No preferential treatment at all.
Long-term (more than a year)
Taxed at 0%, 15% or 20%. Most taxpayers land at 15%, and lower incomes genuinely pay nothing.
Net investment income tax
An extra 3.8% on investment income above a threshold, which can take the top effective rate to 23.8%.
Primary residence
A separate exclusion applies: up to $250,000 of gain for a single filer and $500,000 for a couple filing jointly, subject to ownership and use tests.

What this assumes

Rate brackets are indexed annually. The 0/15/20% rates are long-standing, but the income thresholds move each year.

State tax is not included. Many states tax capital gains as ordinary income, which can add substantially.

How to calculate tax on a capital gain

Work out the gain, establish the holding period, then apply the right rate.

gain = sale price − cost basis; tax = gain × applicable rate
cost basis
Purchase price plus commissions, fees and reinvested dividends
applicable rate
0/15/20% long-term, or your ordinary rate short-term
  1. Establish your cost basis. Not just the purchase price. Add commissions, fees and any reinvested dividends, all of which reduce the taxable gain.

  2. Check the holding period. Count from the day after purchase to the sale date. It must be more than one year to qualify as long-term.

  3. Apply the rate. Long-term gains use the 0/15/20% schedule based on your income. Short-term gains use your marginal income tax rate.

  4. Offset any losses. Capital losses offset capital gains dollar for dollar, and up to $3,000 of excess loss can offset ordinary income each year.

See a worked example: what one extra day of holding is worth
Bought
$100,000 of stock
Sold
$150,000, so a $50,000 gain
Marginal rate
24%

Held more than a year: $50,000 × 15% = $7,500.

Held a year or less: $50,000 × 24% = $12,000.

The difference is $4,500, and it turns on the sale date alone.

If the net investment income tax applies, add 3.8% of the gain ($1,900), taking the long-term figure to $9,400.

$7,500 long-term, $12,000 short-term

Frequently asked questions

How long do I have to hold something for the lower rate?

More than one year. Exactly one year is not enough; the holding period must exceed twelve months.

Count from the day after you acquired it. If you bought on 15 March, selling on 15 March the next year is short-term and selling on 16 March is long-term.

What are the long-term capital gains rates?

0%, 15% or 20%, depending on your taxable income and filing status. Most taxpayers pay 15%.

The 0% band is real and often missed. Someone with modest taxable income can realise gains and owe nothing federally, which makes low-income years worth planning around.

Do I pay tax on gains I haven't sold?

No. Gains are only taxed when realised, meaning when you sell. An investment that has doubled on paper creates no tax bill while you hold it.

This is why holding is tax-efficient in itself: deferring the sale defers the tax, and the untaxed amount keeps compounding in the meantime.

Can capital losses reduce my tax?

Yes. Losses offset gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 against ordinary income each year and carry the rest forward indefinitely.

Watch the wash-sale rule: buying the same or a substantially identical security within 30 days before or after the sale disallows the loss.

Do I owe capital gains tax on my home?

Often not. A primary residence gets an exclusion of up to $250,000 of gain for a single filer and $500,000 for a married couple filing jointly.

You generally need to have owned and lived in it for at least two of the previous five years. Investment properties get no exclusion at all.

What is the net investment income tax?

An additional 3.8% on investment income for taxpayers above an income threshold, applied on top of the normal capital gains rate.

It takes a 15% rate to 18.8% and a 20% rate to 23.8%. It is easy to miss when estimating tax on a large sale.

Problems people actually run into

Selling just before the one-year mark

Investors sell on good news without checking the purchase date, and convert a 15% rate into a 24% one for the sake of a few days.

On a $50,000 gain that is $4,500. Check the holding period before any sale that is close to a year old; it is the cheapest tax planning available.

Understating cost basis

Basis is not just what you paid. Commissions, fees and every reinvested dividend add to it, and reinvested dividends accumulate quietly over years.

Understating basis means overstating the gain and paying tax you do not owe. Brokers report basis for most holdings now, but older positions and transferred accounts are frequently wrong.

Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.

Sources

Last updated: September 4, 2026