🇬🇧 English 🇷🇴 Română 🇪🇸 Español soon 🇫🇷 Français soon 🇩🇪 Deutsch soon
e
Back

Stock market basics · updated October 21, 2026

What is a capital gain and how is it calculated

A capital gain is the money you make when you sell an investment for more than you paid for it. Until you sell, the gain exists only on paper; it becomes real, and taxable, when you sell.

A capital gain formula

Gain=(Sale price − Purchase price) × Number of shares − Fees
Fees
What you paid the broker when you bought and when you sold.

Worked example

You buy 50 shares at $40 and sell them at $52. You pay $10 in fees in total.

$600(52 − 40) × 50
$10fees
$590capital gain

Tax on the gain comes out of the $590, under the rules of your country and your broker.

Worth knowing

Tax rules differ a lot by country, and sometimes depend on how long you held the stock or whether your broker is local or foreign. Check the rules for the year you sell in.

When a capital gain can fool you

Losses count too: in many countries, realized losses can be set against gains. The exchange rate: on a stock priced in another currency, your gain in your own currency also depends on how that currency moved.

Related terms

Learn it in the Academy

Questions about a capital gain

Do you pay tax if you do not sell?

No. A capital gain is taxed when you sell. While you hold the stock, the gain is unrealized.

What is a capital loss?

The opposite: you sell for less than you paid. The loss is only real after you sell.

These explanations are for information only. They are not a recommendation to buy or sell.

Back to the glossary