logo for matrixlab-examples.com
[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines


Home
Welcome Matrixmania Blog
-> Sitemap / Search <-
-> Books <-
Forums and Help
Contact
Basics Quick Matlab Guide
Matlab Tutorial
Matlab Examples
Matlab Flow Control
Boolean Logic
Plots and GUI Matlab 2D Plots
Matlab 3D Plots
Matlab GUI
Applications Calculus
Linear Algebra
Matlab Cookbook I
Matlab Cookbook II
Electrical Calculations
Probability and Stats
Finance Apps
Other Relevant Links
Notes on Computing
Online Calculators
Fun!
Your own Website?
Terms/Policies
Scilab
leftimage for matrixlab-examples.com

Effective Interest Rate on Investments - Calculation

 


This code calculates the effective interest rate for a known initial investment which amounts to a known future value in a specified period of time. This rate expresses the actual rate of interest earned annually on the investment.


The effective interest rate is calculated by the following formula:

 effective interest rate formula

where:
T = future value
P = initial investment
Y = years
 

You may calculate the effective interest rate on amounts you have already invested and accrued interest. Or you may calculate the effective interest rate necessary to enable a principal to reach a hypotetical value in a specified amount of time. For example, if you invest $5000 in a bank and wish $6800 after six years, you will predict the effective interest rate the bank must pay in order to achieve this. 

The effective rate may also be used to calculate the effective percent of depreciation of an investment. A negative rate shows actual depreciation. 

This is our simple Matlab code to calculate the formula above: 

function eir = effective_interest_rate(p, t, y)
eir = ((t/p)^(1/y)-1)*100;

 

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

clc; clear; format bank

p = input('Enter initial investment: ');
t = input(
'Enter total value after y years: ');
y = input(
'Enter number of years: '); 

eir = effective_interest_rate(p, t, y) 

 

Example 1:


Jane deposits $945 in a bank. Four and a half years later her account has $1309.79. What actual percent of her initial investment did the bank pay annually? 

Enter initial investment: 945
Enter total value after y years: 1309.79
Enter number of years: 4.5 

The result is:

eir = 7.52
 

Example 2:


 
Richie bought a car in 1990 for $7534.84 and sold it in 1993 for $3555.00. What was its effective rate of depreciation? 

Enter initial investment: 7534.84
Enter total value after y years: 3555
Enter number of years: 3 

The result is: 

eir = -22.15


 From 'Effective Interest Rate' to home
 From 'Effective Interest Rate' to 'Finance Formulas'

Top

Interest calculator online


Calculate annuity

Calculate future value

Bank widthdrawal

Initial investments

Nominal interest rate




footer for effective interest rate page