Initial Stock Price: Users input the stock's price when they purchased it.
Final Stock Price: Users input the stock's price at the time of selling or at the end of the investment period.
Number of Shares: Users input the number of shares they own.
Total Dividends Received: Users input the total amount of dividends they received during the investment period.
Input Fields:
Initial Stock Price: The price of the stock at the time of purchase.
Final Stock Price: The price of the stock at the time of sale or at the end of the period being measured.
Number of Shares: The total number of shares owned.
Total Dividends Received: The sum of all dividends received during the investment period.
Calculation Logic:
Capital Gains: The difference between the final stock price and the initial stock price, multiplied by the number of shares owned.
Total Return: The sum of capital gains and total dividends received.
Percentage Return: The total return divided by the initial investment, multiplied by 100 to get a percentage.