Capital Gain Calculator

Calculate total capital gain and return percent for an investment.

CalcHub

Capital Gain Calculator

Full page
Live

Preview

50

Mirrors whichever field is focused below.

Add to workspace

Run up to six calculators on one board. You can try without an account—your board stays on this device until you sign in to save it.

Add to workspace

No account needed—build a local board (one workspace on this device). Sign in later to save it to your account.

Open My workspace →

The Capital Gain Calculator estimates the profit realized when an asset is sold above its purchase price. It uses your buy price, sell price, and quantity to compute both the total capital gain and the gain percentage relative to the amount invested. This makes it useful for quickly checking the outcome of a trade, investment, or sale before factoring in taxes, commissions, or other costs.

Because it works from the realized exit price, the calculator is best suited for straightforward gain analysis on a single position or a simple lot. If you are comparing performance across assets, the percentage return can help you standardize results across different investment sizes, while the absolute gain shows the actual dollar amount earned.

How This Calculator Works

The calculator compares the selling price per unit to the buying price per unit. If the sell price is higher, the difference is multiplied by the number of units sold to find the capital gain. It then divides that gain by the total amount invested to express performance as a percentage.

If the sell price equals the buy price, the gain is zero. If the sell price is lower, the result is a capital loss rather than a gain. The calculator does not automatically include brokerage fees, taxes, spreads, or slippage unless those are built into the input prices.

Formula

Capital Gain = (Sell Price per Unit − Buy Price per Unit) × Units

Invested Amount = Buy Price per Unit × Units

Gain (%) = (Capital Gain ÷ Invested Amount) × 100

Variables

VariableMeaning
Buy Price per UnitPrice paid for one unit of the asset
Sell Price per UnitPrice received for one unit when sold
UnitsNumber of shares, coins, or other units sold
Capital GainTotal profit before taxes and fees
Invested AmountTotal purchase cost for the position
Gain (%)Return relative to the invested amount

Example Calculation

  1. Enter the buy price: 50.
  2. Enter the sell price: 72.
  3. Enter the quantity: 100.
  4. Compute the gain per unit: 72 − 50 = 22.
  5. Multiply by units: 22 × 100 = 2,200 capital gain.
  6. Compute invested amount: 50 × 100 = 5,000.
  7. Compute gain percentage: (2,200 ÷ 5,000) × 100 = 44%.

Where This Calculator Is Commonly Used

  • Stock trading and share sales
  • Cryptocurrency position exits
  • Real estate resale analysis
  • Simple portfolio performance checks
  • Tax planning workflows that begin with gross gain

How to Interpret the Results

A positive capital gain means the asset sold for more than it cost to buy. The larger the gain percentage, the stronger the return relative to the original capital deployed. A zero result indicates break-even, while a negative result indicates a loss.

For decision-making, the gain amount answers how much money was made or lost, while the gain percentage answers how efficient the investment was. When comparing different opportunities, the percentage is often more useful because it normalizes performance across different purchase sizes.

Remember that this is a gross return calculation. If you need net profit after fees, taxes, or financing costs, those should be accounted for separately.

Frequently Asked Questions

What is capital gain in this calculator?

Capital gain is the profit created when the selling price per unit is higher than the buying price per unit. The calculator multiplies that per-unit difference by the number of units sold to estimate total gain. It is a gross figure and does not automatically subtract taxes, commissions, or other transaction costs.

How is gain percentage calculated?

Gain percentage is calculated by dividing the capital gain by the total invested amount, then multiplying by 100. This shows the return relative to what was originally paid. It is useful for comparing investments of different sizes because it expresses performance on a standardized percentage basis.

Does this calculator include fees and taxes?

No, not by default. The calculator uses the buy price, sell price, and quantity to determine gross gain. If you want a closer estimate of net profit, you should manually include brokerage fees, taxes, and other costs in your own analysis or adjust the input prices accordingly.

What happens if I sell below my buy price?

If the sell price is lower than the buy price, the calculation produces a negative result. That means you incurred a capital loss rather than a gain. The percentage return will also be negative, which indicates the investment declined in value relative to the amount invested.

Can I use this for multiple purchase lots?

You can, but only if you first consolidate the position into a single average buy price or otherwise compute the result lot by lot. For portfolios with multiple entry prices, a single-snapshot calculator may not fully reflect tax rules or cost-basis methods such as FIFO or average cost.

Why do gain amount and gain percentage tell different stories?

The gain amount shows the absolute money earned, while the gain percentage shows return efficiency. A larger gain in dollars is not always a better result if it required much more capital. Using both metrics together gives a more complete view of investment performance.

FAQ

  • What is capital gain in this calculator?

    Capital gain is the profit created when the selling price per unit is higher than the buying price per unit. The calculator multiplies that per-unit difference by the number of units sold to estimate total gain. It is a gross figure and does not automatically subtract taxes, commissions, or other transaction costs.

  • How is gain percentage calculated?

    Gain percentage is calculated by dividing the capital gain by the total invested amount, then multiplying by 100. This shows the return relative to what was originally paid. It is useful for comparing investments of different sizes because it expresses performance on a standardized percentage basis.

  • Does this calculator include fees and taxes?

    No, not by default. The calculator uses the buy price, sell price, and quantity to determine gross gain. If you want a closer estimate of net profit, you should manually include brokerage fees, taxes, and other costs in your own analysis or adjust the input prices accordingly.

  • What happens if I sell below my buy price?

    If the sell price is lower than the buy price, the calculation produces a negative result. That means you incurred a capital loss rather than a gain. The percentage return will also be negative, which indicates the investment declined in value relative to the amount invested.

  • Can I use this for multiple purchase lots?

    You can, but only if you first consolidate the position into a single average buy price or otherwise compute the result lot by lot. For portfolios with multiple entry prices, a single-snapshot calculator may not fully reflect tax rules or cost-basis methods such as FIFO or average cost.

  • Why do gain amount and gain percentage tell different stories?

    The gain amount shows the absolute money earned, while the gain percentage shows return efficiency. A larger gain in dollars is not always a better result if it required much more capital. Using both metrics together gives a more complete view of investment performance.