How this stock return calculator works
A stock return calculator measures total return on a share holding: price change plus dividends, minus commission. The headline is total return as a percent of cost basis. Details show profit or loss, cost basis, sale proceeds, and total dividends. Past returns do not predict future performance.
Choose a currency (formatting only), then fill purchase price (0 or more), sale price (0 or more), and a share count greater than 0. Empty purchase, empty sale, empty shares, or typed 0 shares is no result. Empty dividend per share is treated as 0 — you do not have to type it. Commission and years held are used only while Holding details is open. For yield from the current dividend alone, use the dividend yield calculator.
How to use the stock return calculator
- Choose a currency and enter purchase price per share, sale price per share, and number of shares.
- Optionally enter total dividends received per share during the holding. Leaving that field empty counts as 0.
- Read total return, profit or loss, cost basis, sale proceeds, and total dividends. Typed 0 on purchase or sale is valid; shares must be greater than 0.
- Open Holding details only for total commission or an annualized return. Annualized return appears only while that section is open and years held is greater than 0. Closing Holding details treats commission as 0 and hides annualized even if values stay typed.
Holding details, and closing it
Years held and total commission (combined buy and sell fees) are used only while Holding details is open. Commission adds to cost basis and therefore reduces profit. Annualized return compounds the total return over years held: (1 + profit ÷ cost basis)^(1 ÷ years) − 1, and only when years held is greater than 0. Closing the section treats commission as 0 and drops the annualized row even if those fields stay filled.
Stock return formulas
Profit is sale proceeds plus dividends minus cost basis. Cost basis is purchase price × shares, plus commission while Holding details is open. Total return percent is profit ÷ cost basis × 100 when cost basis is greater than 0; otherwise it is 0%. Annualized return uses the power formula below.
Worked examples
Example: buy USD 100, sell USD 150, 100 shares, no dividend
With Holding details closed, commission is 0 and empty dividend is 0. Cost basis is USD 10,000.00. Sale proceeds are USD 15,000.00. Profit is USD 5,000.00. Total return is 50.00%.
Example: the same trade plus USD 2.00 dividend per share
Total dividends are 2 × 100 = USD 200.00. Profit becomes USD 5,200.00. Total return is 5,200 ÷ 10,000 × 100 = 52.00%.
Example: the 52.00% result held for 5 years
Open Holding details and enter 5 years held. Annualized return is (1.52)^(1/5) − 1, which displays as 8.73%. Close Holding details and the annualized row disappears even if 5 stays typed. Total return stays 52.00%.
Things to keep in mind
This is an estimate, not investment or tax advice. Empty dividend is 0; empty shares is no result. If cost basis is 0 (for example purchase 0 and commission 0), total return is reported as 0.00% even when sale proceeds are positive. Amounts are shown as an ISO currency code, then the number (USD 5,000.00). Switching currency only changes formatting.
Stock return calculator FAQ
Do I have to enter a dividend?
No. Empty dividend per share is treated as 0. That is different from the dividend yield calculator, where an empty dividend is no result.
Why won’t 0 shares work?
Number of shares must be greater than 0. Empty or typed 0 shares is no result. Purchase price and sale price may be typed 0.
What if cost basis is 0?
Total return is shown as 0.00%. Cost basis is purchase × shares, plus commission only while Holding details is open.
What happens if I close Holding details?
Commission is treated as 0 and annualized return hides, even if those fields stay filled. Total return still uses purchase, sale, shares, and dividend.
When is annualized return shown?
Only while Holding details is open and years held is greater than 0. Empty years held hides annualized even with the section open.
Does this stock return calculator store my numbers?
Completed results can be saved in this browser’s local history so you can reopen them later. They stay on your device and are not sent to our servers or to analytics.