Capital Gains Tax Calculator

Estimate how much tax you’ll owe when you sell stocks, funds, crypto or property for more than you paid.

Last reviewed · Free, no sign-up · Runs entirely in your browser

What you sold
Purchase price plus buying fees. For a home, add the cost of improvements.
Commissions, agent fees, closing costs.
You
Salary and other income, before the standard deduction.
Most states tax gains as regular income; some have no income tax.
Total tax on the sale
–
Your gain
–
Effective tax rate
–
You keep (after tax)
–

Uses 2026 federal brackets, capital gains thresholds and the standard deduction.

Explain it like I’m 5

Say you buy a rare trading card for $10. A year later, someone pays you $25 for it. You made $15 more than you paid. That extra $15 is called a capital gain.

The government asks for a small slice of that extra money. That slice is capital gains tax. You only pay it on the extra part (the $15), never on the $10 you started with — and only when you actually sell.

Here’s the important trick: if you keep the card for more than one year before selling, the slice is usually much smaller (0%, 15% or 20%). Sell sooner, and it’s taxed like money from a job, which is often more. If you sell for less than you paid, there’s no tax — and the loss can even lower your taxes.

Words you’ll see, in plain English

Capital gain
The profit when you sell something for more than you paid. Buy for $100, sell for $150: a $50 capital gain.
Cost basis
What you paid for something you invested in, including fees. It’s the starting line for working out your profit.
Short-term vs. long-term
Held for one year or less = short-term (taxed like your paycheck). Held for more than a year = long-term (usually taxed less).
Capital loss
When you sell something for less than you paid. Losses can lower the tax you owe on gains.
Tax bracket (marginal rate)
Income is taxed in layers. Each layer has its own rate, and your bracket is the rate on your top layer — not on all your money.
Standard deduction
A chunk of income the government lets you earn tax-free each year before income tax starts.
Net investment income tax (NIIT)
An extra 3.8% tax on investment profits for people with higher incomes (over $200,000 single or $250,000 married filing jointly).
Filing status
Which group you file taxes as — single, married filing jointly, married filing separately or head of household. It changes your tax brackets.

More money words explained simply in our glossary.

How to use the capital gains tax calculator

  1. What you paid (cost basis): the purchase price plus any fees to buy. For property, add the cost of improvements like a new roof or kitchen.
  2. What you sold it for and any selling costs (broker commissions, real-estate agent fees, closing costs).
  3. How long you owned it. More than one year = long-term (lower tax). One year or less = short-term.
  4. Your filing status and other income. Capital gains are taxed on top of your other income, so your salary affects the rate.
  5. Tick “main home” if you’re selling the home you lived in for at least 2 of the last 5 years.

2026 long-term capital gains tax brackets

RateSingleMarried filing jointlyHead of household
0%Up to $49,450Up to $98,900Up to $66,200
15%$49,450 – $545,500$98,900 – $613,700$66,200 – $579,600
20%Over $545,500Over $613,700Over $579,600

These amounts are taxable income (after deductions), including the gain itself. Short-term gains have no special brackets — they’re added to your income and taxed at your regular rates of 10% to 37%.

The math, step by step

Example: a single filer earning $65,000 sells shares for $25,000 that they bought for $10,000.

  1. Find the gain: $25,000 − $10,000 = $15,000.
  2. Find where your other income ends: $65,000 − $16,100 standard deduction = $48,900 of taxable income.
  3. Stack the gain on top. The 0% bracket ends at $49,450, so the first $550 of the gain is taxed at 0%, and the remaining $14,450 at 15%.
  4. Add it up: $14,450 × 15% = $2,167.50 of federal tax — an effective rate of 14.4% on the gain.
  5. Compare short-term: if the same shares were sold within a year, the gain would be taxed like wages: $3,150.00. Waiting past one year saves $982.50.

Ways to legally lower capital gains tax

What this calculator doesn’t cover

Collectibles (taxed up to 28%), depreciation recapture on rental property, qualified small business stock, itemized deductions, credits and the alternative minimum tax are not modeled. Crypto is treated like stock. For large or complex sales, talk to a tax professional.

Frequently asked questions

How much is capital gains tax?

For assets held more than a year, the US federal long-term capital gains rates are 0%, 15% or 20%, depending on your taxable income. For 2026, single filers pay 0% on gains that fall below $49,450 of taxable income and 20% above $545,500; for married couples filing jointly the thresholds are $98,900 and $613,700. Assets held a year or less are taxed at ordinary income rates (10%–37%).

How do I calculate capital gains?

Take the sale price, subtract selling costs (commissions, agent fees), and subtract your cost basis (what you paid plus buying costs and, for property, improvements). What’s left is your capital gain — or, if negative, a capital loss.

How do I avoid capital gains tax?

Common legal ways to reduce it: hold investments for more than a year to get long-term rates; sell in a year when your income is low (you may land in the 0% bracket); offset gains with losses (tax-loss harvesting); invest through tax-advantaged accounts like IRAs and 401(k)s; and, for your main home, use the home-sale exclusion.

Do I pay capital gains tax when I sell my house?

If it was your main home and you owned and lived in it for at least 2 of the last 5 years, you can usually exclude up to $250,000 of gain ($500,000 for married couples filing jointly). Only the gain above that is taxed. Tick “It was my main home” in the calculator to apply it.

What is the net investment income tax?

An extra 3.8% federal tax on investment income, including capital gains, for people whose modified AGI is above $200,000 (single or head of household) or $250,000 (married filing jointly). It applies only to the part of your income above the threshold. The calculator includes it.

Do I pay state tax on capital gains?

Most states tax capital gains as regular income, with no special lower rate. A few states have no income tax at all. Enter your state’s rate in the calculator.

Embed this calculator on your site

Free to use on blogs and websites. Copy this code into your page's HTML:

These results are estimates for education only, based on the assumptions you enter. They are not financial, investment or tax advice. Real returns, rates and taxes vary. See our methodology anddisclaimer.

More calculators