top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Compound Interest Calculator

  • Compound interest (or compounding interest) is interest calculated on the initial principal, which also includes all of the accumulated interest from previous periods on a deposit or loan.

  • Compound interest is calculated by multiplying the initial principal amount by one plus the annual interest rate raised to the number of compound periods minus one.

  • Interest can be compounded on any given frequency schedule, from continuous to daily to annually.


When calculating compound interest, the number of compounding periods makes a significant difference.



Compound interest is calculated by multiplying the initial principal amount by one plus the annual interest rate raised to the number of compound periods minus one. The total initial amount of the loan is then subtracted from the resulting value.

Compound interest = [P (1 + i)n] – P

= P [(1 + i)n – 1]


Where:

P = principal

i = nominal annual interest rate in percentage terms

n = number of compounding periods


Importing needed Python packages


import pandas as pd
import numpy as np

The Calculation Function


def Compound_Interest_Calculator(p_principle,i_interest_rate,
t_period):
  # Calculates compound interest
  FV = np.round(p_principle * (pow((1 + i_interest_rate / 100),\n
                                   t_period)), decimals=2)
  compound_interest = FV - p_principle
  print("For a Principle of {0} $ \nThe Futur Value is = {1} $\nand The Compound Interest is = {2} $"\n
        .format(p_principle, FV, compound_interest))


The Investment Calculation


investment =Compound_Interest_Calculator(10000, 20, 20)


Output


For a Principle of 10000 $  
The Futur Value is = 383376.0 $ 
and The Compound Interest is = 373376.0 $








 
 
 

Comments


COURSES, PROGRAMS & CERTIFICATIONS

 

Advanced Business Analytics Specialization

Applied Data Science with Python (University of Michigan)

Data Analyst Professional Certificate (IBM)

Data Science Professional Certificate (IBM)

Data Science Specialization (John Hopkins University)

Data Science with Python Certification Training 

Data Scientist Career Path

Data Scientist Nano Degree Program

Data Scientist Program

Deep Learning Specialization

Machine Learning Course (Andrew Ng @ Stanford)

Machine Learning, Data Science and Deep Learning

Machine Learning Specialization (University of Washington)

Master Python for Data Science

Mathematics for Machine Learning (Imperial College London)

Programming with Python

Python for Everybody Specialization (University of Michigan)

Python Machine Learning Certification Training

Reinforcement Learning Specialization (University of Alberta)

Join our mailing list

Data Insight participates in affiliate programs and may sometimes get a commission through purchases made through our links without any additional cost to our visitors.

bottom of page