Skip to main content
Best Web Developer — web design, development and digital growth agency

Calculators

Capital Gains Tax Calculator

Estimate capital gains tax on a sale, applying short-term or long-term rates by holding period, with the net investment income tax option.

  • Runs in your browser
  • Nothing uploaded

The tool

Enter your numbers below. Results update as you type, and nothing leaves your browser.

Everything you enter stays on your own machine. Nothing is sent to us or to anyone else, which you can confirm in your browser network tab.

What people use it for

  • Deciding when to sell an investment
  • Estimating tax on a property or share sale
  • Year-end tax-loss harvesting
  • Comparing holding periods

About this tool

What the Capital Gains Tax Calculator does

A capital gain is the sale price minus your cost basis and selling costs. In the US, assets held for more than a year qualify for lower long-term rates, while short-term gains are taxed as ordinary income. This calculator applies the right rate for your holding period.

Formula

  • Gain = sale price − cost basis − costs
  • Long-term if held more than 12 months (US rule)
  • Tax = gain × applicable rate (+ 3.8% NIIT if it applies)

Worked example

Using the starting values in the calculator above:

Input Value
Purchase price (cost basis) $20,000
Sale price $35,000
Buying and selling costs $500
Months held 18
Short-term rate (ordinary income) 24%
Long-term rate 15%
Add 3.8% net investment income tax No
Result Value
Estimated tax $2,175
Capital gain $14,500
Gain type Long-term
Rate applied 15.0%
Gain after tax $12,325
Tax difference under the other type $1,305

How to read the result

If a sale is close to the one-year mark, the difference column shows what waiting would save or cost.

Losses can offset gains, and in the US up to 3,000 dollars of net capital losses a year can offset ordinary income.

Estimates only, not tax advice. Rates and thresholds change; confirm current figures with your tax authority or adviser.

Related calculators

Browse every calculator in Tax and Accounting Calculators, or talk to us about finance workflow automation.

Questions

Questions about this tool

The things clients actually want to know — costs, timelines, ownership and what happens after launch.

In the US, gains on assets held one year or less are short-term and taxed as ordinary income; longer holdings get lower long-term rates.

In the US, 0%, 15% or 20% depending on taxable income, plus the 3.8% net investment income tax for higher earners.

Holding longer, offsetting with losses, using tax-advantaged accounts and timing sales across tax years can all help.

Free strategy session

Let’s build something worth finding.

Tell us where you want the business to be in twelve months. We will come back with a costed plan, a realistic timeline, and the numbers we expect to move — no obligation, no jargon.

  • 30-minute call, no pitch deck
  • Fixed-price proposal in 48 hours
  • You own everything we build

Talk to a developer

Not a sales team

Response time
Within 1 business hour
Where we work
UK, USA & the Gulf
Contracts
No lock-in, monthly rolling
Working since
2023
infobestwebdeveloper.org

Free strategy session

Let’s build something worth finding.

Tell us where you want the business to be in twelve months. We will come back with a costed plan, a realistic timeline, and the numbers we expect to move — no obligation, no jargon.

  • 30-minute call, no pitch deck
  • Fixed-price proposal in 48 hours
  • You own everything we build

Talk to a developer

Not a sales team

Response time
Within 1 business hour
Where we work
UK, USA & the Gulf
Contracts
No lock-in, monthly rolling
Working since
2023
infobestwebdeveloper.org
Free consultation

show prices in USD?