KAlgebra/Credit payment

From KDE Wiki Sandbox
Revision as of 16:09, 20 December 2010 by Ralica (talk | contribs)

This is tutorial how to calculate the compound interest with KAlgebra

350px-Compound_interest.svg.png
350px-Compound_interest.svg.png
Let's first recall what the compound interest is:

Compound interest arises when interest is added to the principal, so that from that moment on, the interest that has been added also itself earns interest. This addition of interest to the principal is called compounding. A bank account, for example, may have its interest compounded every year: in this case, an account with $1000 initial principal and 20% interest per year would have a balance of $1200 at the end of the first year, $1440 at the end of the second year, and so on.


Formula for calculating compound interest:

Where,

A = final amount

P = principal amount (initial investment)

r = annual nominal interest rate (as a decimal)

n = number of times the interest is compounded per year(12 times)

t = number of years

Write all these functions in Console Mode

1.This Function calculates the monthly interest rate by given yearly interest rate.

monthlyInterestRate:= yearlyInterestRate-> yearlyInterestRate/1200

2.This function calculates the monthly payment

  • mir=monthlyInterestRate
monthlyPayment:=(sum, mir, months)->(sum*(1+mir)^months*mir)/((1+mir)^months-1)

3.This Function calculates the whole amount you have to return to the bank

amount:=(monthlyPayment,months)->monthlyPayment*months