[?] Subscribe To This Site

XML RSS





leftimage for poohprod.ru

Calculate Annuity - or Future Value of Regular Deposits

In this article we create a script to calculate annuity or to find out the future value of a regular deposit.

You must provide the amount of each deposit, the number of deposits per year, the number of years and the nominal interest rate.

Assuming that interest is compounded with each deposit, the calculation is based on the following formula:

formula to calculate value after some years

where:
T = total value after Y years (future value)
R = amount of regular deposits
N = number of deposits per year
Y = number of years
i = nominal interest rate

This presentation shows you what we want to accomplish with an example. Below the presentation, I give you the full code to implement in Matlab.


This is a suggested Matlab function or script to calculate the future-value formula above. You have four inputs and one output:

function t = annuity(r, it, n, y)
it = it/(n*100);
t = r * ((1 + it)^(n * y) - 1)/it;

We can create another script to test and run the above m-file:

clc; clear; format bank

r = input('Enter amount of regular deposits: ');
it = input(
'Enter nominal interest rate: ');
n = input(
'Enter number of deposits per year: ');
y = input(
'Enter number of years: ');

future_value = annuity(r, it, n, y)

Example 1:


$50 is transferred each month from Monique’s checking account to a Math Learning Club savings account with 5% interest. How much will Monique receive at the end of the year?

We run our test code and get:

Enter amount of regular deposits: 50
Enter nominal interest rate: 5
Enter number of deposits per year: 12
Enter number of years: 1

Our result is:

future_value = 613.94


Example 2
:


Little George makes annuity payments of $175. The interest is 5.5%. What amount will George have accumulated in 15 years?

Again, we run our ‘Calculate Annuity’ code, and get:

Enter amount of regular deposits: 175
Enter nominal interest rate: 5.5
Enter number of deposits per year: 1
Enter number of years: 15

The result is:

future_value = 3921.5

From 'Calculate Annuity' to home

From 'Calculate Annuity' to 'Finance Formulas'


Online Calculator

Calculate future value

Bank widthdrawals

Initial investments

Nominal interest rate

Compound Interest


Top



footer for calculate annuity page










































































Related pages


nominal interest calculation worksheethow do you calculate square feet from inchesmatlab fplotascii character code converterloglog matlabmatrix card trickgui handlessphere function matlabhow do you graph piecewise functionsdegree of freedom calculator for t testmatlab quadl5 band resistance calculatorhanoi gamesolve matrix equation matlabcalculating bmi manuallyfibonaci series programgraph piecewise functions calculator onlinehow to determine salvage value of a car4 band resistor codecontinuous compounding calculatormaclaurin series formulamatlab sum matrixanimation in matlabfourier series in matlab coderc circuit time constant equationmatlab programming with applications for engineersbasic programs in matlabhex to decimal algorithmfor loop function matlabmatlab binrange of piecewise functionsmatlab function randbinary to decimal conversion examplecircuitbuilding do it yourself for dummiesintegral calcmatlab solve quadratic equationscrap value and salvage valuewhat is heaviside functionnonlinear curve fitting matlabchol matlabhow to do dot product in matlabsum to infinity of gpcurve fitting tool matlabsimpsons rule exampleplot gaussian matlabfactorial calcmatlab curvefittingnarcissistic numbersmatlab tutorial basicsusing matlab to solve matricescapacitor rc time constantpower factor improvement capacitor calculationalgorithm for pascal triangle in cfinding roots using bisection methodconvert binary to octaloctal to binary conversionpascal triangle in c using arrayexponential regression dataread a text file in matlabascii codes tablehexadecimal to binary conversion methodcapacitor rc time constantascii code of alphabetsmatlab interpolationpascal for loopcharging capacitor circuitmatlab gui menuif statements matlabmatlab subplot exampleoctal to hexadecimal conversion methodhow to calculate scrap valuebisection method in numerical analysisdivision of two polynomials