How can I estimate taxable gain and tax from a share sale?

A capital-gains estimate starts with sale proceeds, subtracts cost basis and applicable costs, then applies the entered tax rate to a positive gain. It is an arithmetic estimate rather than a jurisdiction-specific tax filing calculation.

Applying a rate only after the gain is known

Gain = (Sale price − Purchase price) × SharesTax = Gain × (Tax rate ÷ 100), only if Gain > 0Net gain = Gain − Tax

A mechanical share-sale estimate

The default scenario compares purchase cost with sale value and uses the configured rate on the resulting gain. Supporting outputs keep gross proceeds, gain and estimated tax separate.

Illustrative inputs; currency amounts below use USD. Rates and prices are assumptions, not live quotes.

Purchase price
$2.65
Sale price
$12.21
Shares
100
Capital gains tax rate
15%

Step-by-step calculation

  1. Gain = (12.21 − 2.65) × 100 = 956.
  2. Apply the entered illustrative rate only to a positive gain: 956 × 15 ÷ 100 = 143.4 tax.
  3. Net gain = 956 − 143.4 = 812.6. This does not choose your legal rate, allowances or tax basis.

Intermediate figures are rounded for reading. Results use the full calculation precision.

Gain after tax$812.60
Gain before tax$956.00
Tax owed$143.40
Cash after sale and tax$1,077.60

Cash proceeds are not taxable profit

Taxable gain is not the same as cash received from the sale. The estimate should be read alongside cost basis because an incorrect basis flows directly into the tax result.

Jurisdiction rules outside a flat-rate estimate

Holding-period rules, allowances, loss offsets, wash-sale rules and progressive tax bands differ by country. A single entered rate cannot represent all of them.

  • All monetary inputs use the same currency.
  • The entered tax rate applies directly to the positive gain defined by the formula.
  • Allowances, prior losses, currency effects and local filing rules are excluded.

Calculations related to capital gains tax

The following tools examine neighbouring parts of the same calculation without changing the inputs or assumptions used above.

References

Sources and conventions

  • IRS: US capital gains and losses

    US-specific background illustrates why holding period and tax basis matter. The calculator is global and does not apply US rules or select a tax rate.

Quick answers

Frequently asked questions

Does the calculator charge tax when the sale makes a loss?

No. The formula applies tax only when the calculated gain is greater than zero.

Which capital gains tax rate does it use?

It uses only the percentage entered by the user and does not select a rate based on country or income.

Are brokerage fees included in the taxable gain?

No. Gain is calculated from purchase price, sale price and quantity only.

Calculation method and limitations · Report an error

Educational content only. This guide is not financial advice.