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.

Separating proceeds, basis and taxable gain

Purchase price, sale price and quantity determine the gain before tax. Tax is applied at the user-entered rate only when that gain is positive, and net gain subtracts the calculated tax.

The result is a simplified estimate using one tax rate. It does not apply country-specific allowances, holding periods, loss offsets, transaction fees or different tax lots.

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.

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.

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

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.

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.

Educational content only. This guide is not financial advice.