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

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