Skip to main content

Dollar Cost Averaging Investing Data Calculation

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)
.

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

Popular posts from this blog

Which is better? BND or AGG?

The US 10-year treasury yield has reached at 2007-2008 years level, which is about 16 years ago. From a technical point of view, it is a buy. Then there are 2 bond ETFs that I am interested in. There are BND and AGG. They are very similar in nature. US 10 year Treasury Bond, chart, prices - FT.com Expense Ratio BND: 0.03% AGG: 0.03% The same. Turnover Rate BND: 40.00% AGG: 104.0% BNG seems better. Historical Performance Comparison Investment duration: 5 years with no tax on dividends BND wins a little with winning rate of 57.5%, but AGG wins 0.012% in return. Investment duration: 5 years with 30% tax on dividends AGG wins a little with winning rate of 65% and a 0.079% difference on average. Investment duration: 10 years with no tax on dividends AGG wins a little with winning rate of 67% and a 0.024% difference on average. Investment duration: 10 years with 30%  tax on dividends AGG wins a little with winning rate of 99% and a 0.095% difference on average. C...