This tool calculates dollar cost averaging investing related data.
Choose the item to be calculated:
FV Sum
Monthly investments:
dollar(s)
Time:
year(s)
Annually rate of return:
%
Future value of all monthly investments:
dollar(s)
Time:
year(s)
Annually rate of return:
%
Future value of all monthly investments:
dollar(s)
.
.
The following Chart shows the power of compouding effect.
Only the rate of return can not be factured out, so I used approximation which has the following JS code.
//time is in month and rate is in monthly rate. function getrate(monthlyamount,futurevalue,time){ var rate = 0.01; var change = 0.01; var estimaed; var diff; do { estimaed = (monthlyamount*(Math.pow((1 + rate),time)-1)/rate); diff = estimaed-futurvalue; if(diff>0){ change /= 2; rate -= change; estimaed = ((monthlyamount*(Math.pow((1 + rate),time)-1)/rate); diff = estimaed-dendamountd; }else if(diff<0){ ratea += change; estimaed = (monthlyamount*(Math.pow((1 + rate),time)-1)/rate); diff = estimaed-dendamountd; }else{ reutun rate } }while (Math.abs(diff) > 0.01); eutun rate }
Comments
Post a Comment