Skip to content

resole79/finance_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Financial Calculator

Program that allows the user to access two different financial calculators: an investment calculator and a home loan repayment calculator for a small financial company

Prerequisites

You will need the following software to run the financial calculator:

Installation

To get started with the financial calculators, follow these steps:

  1. Clone the repository:
git clone https://github.com/resole79/finance_calculator.git
  1. Run the finance_calculator.py file:
python3 finance_calculator.py

Usage

How program present

User selects ‘investment’

Ask the user to input:

  • The amount of money that they are depositing.
  • The interest rate (as a percentage).
  • The number of years they plan on investing.
  • Then ask the user to input if they want “simple” or “compound” interest


User selects “simple”


User selects “compound”

Interest formula:

The total amount when **simple interest** is applied is calculated as follows: *𝐴 = 𝑃(1 + 𝑟 × 𝑡)*

The total amount when **compound interest** is applied is calculated asfollows: *𝐴 = 𝑃(1 + 𝑟)^𝑡*

In the formula above:
- ‘r’ is the interest entered above divided by 100, e.g. if 8% is entered, then r is 0.08.
- ‘P’ is the amount that the user deposits.
- ‘t’ is the number of years that the money is being invested.
- ‘A’ is the total amount once the interest has been applied.

User selects ‘bond’

Ask the user to input:

  • The present value of the house.
  • The interest rate.
  • The number of months they plan to take to repay the bond.


User selects “bond”

Bond repayment formula:

The amount that a person will have to be repaid on a home loan each
month is calculated as follows: *𝑟𝑒𝑝𝑎𝑦𝑚𝑒𝑛𝑡 = (i * P)/(1 - (1 + i)^(-n))*

In the formula above:
- ‘P’ is the present value of the house.
- ‘i’ is the monthly interest rate, calculated by dividing the annual interest rate by 12.
- ‘n’ is the number of months over which the bond will be repaid.

Credit

Author : Emilio Reforgiato (resole79)

Releases

No releases published

Packages

No packages published

Languages