Skip to content

portfedh/rate_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Annual Return Calculator

This Python script calculates the annualized rate of return for an investment based on the initial and final prices, along with the number of years. It is a simple tool that can help you analyze the performance of an investment over a specified period.

How to Use

  1. Run the script in a Python environment.
  2. You will be prompted to enter the following information:
    • Initial Price: The initial value or cost of the investment.
    • Final Price: The current value or worth of the investment.
    • Years: The number of years the investment has been held.
  3. The script will then calculate the annualized rate of return and display the result.

Example Usage

python annual_return_calculator.py

Input:

Initial Price: 1000
Final Price: 1500
Years: 3

Output:

- Make sure to enter valid numerical values for the input prompts.
- The formula used for annualized return is: ((final_price / initial_price) ** (1 / years)) - 1
- The result is displayed in percentage format.

Feel free to use and modify the code according to your needs. Happy investing!

About

A simple compound interest rate calculator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages