prince raj

prince raj

  • NA
  • 88
  • 42.7k

How To calculate Interest where period is in day

Jul 16 2014 1:11 AM
void calc(double Principal, double AnnualRate, int NumberOfPeriods, int CompoundType)
{
double RatePerPeriod;
AnnualRate = AnnualRate / 100;
// CompoundType Meanse Frequant
// if Frequenc monthly - CompoundType = 12
// if Frequenc Quarterly - CompoundType = 4
// if Frequenc Half Yearly - CompoundType = 2
// if Frequenc Yearly - CompoundType = 1
double i = AnnualRate / CompoundType;
int n = CompoundType * NumberOfPeriods;
RatePerPeriod = AnnualRate / NumberOfPeriods;
returnamount = Principal * Math.Pow(1 + i, n);
Earnedamount = returnamount - Principal;
// MessageBox.Show(returnamount.ToString());
}


It Complete count interest but, it require NumberOfPeriods is in years,
How can i calculate by day.

Answers (8)