Interest Calculations for Loan Accounts
Mifos supports the following types of interest calculation; flat interest rate, declining balance, declining balance interest with equal principal installments, and declining balance with interest recalculation. Flat and declining balance types both result in Equal Monthly Installments (EMI). Declining balance interest with equal principal installments allow MFIs to calculate interest using equal principal installments, and simple declining balance formula to calculate the interest.
P = principal amount (initial amount)
r = annual rate of interest (as a decimal) Assumption: Number of decimals used for calculation will be the same as that specified by HO.
A = amount of money accumulated including interest
n = number of times the interest is compounded per years
Periodic intervals: daily, monthly, quarterly, semiannually, or annually (This can be number of days and number of weeks too.)
EMI Definition: EMI (Equated Monthly Installment) is the amount payable to the lending institution every month, till the loan is paid back in full. It consists of a portion of the interest as well as the principal.
Declining Balance Interest (EMI of Principal and Interest)
Declining Balance Definition: Interest is computed at periodic intervals on the amount of the original principal that has not yet been repaid. Since the borrower only pays interest on that amount of original principal that has not yet been repaid, interest paid is smaller every period. However, to make sure that the borrower sets EMI, the formula is:
EMI formula:
EMI = i*P / [1 (1+i)^n]
Where,
P = Loan amount
r = Rate of interest per year
n = Term of the loan in periods
l = Length of a period (fraction of a year, i.e., 1/12 = 1 month, 14/360 = biweekly.)
i = Interest rate per period (r*l)
Examples:
P=1000, r = 5/100, l = 6/12 n = 2, i = 0.025
EMI = 0.025 * 1000 / [1(1+0.025)^2]
EMI = $518.83
The way to apply payments is as follows:
Calculate interest in the principal due: If balance = $1000, and i = 0.025, interest is $25
Calculate the amount to principal which is the monthly payment minus the interest due: $518.83  $25 = $493.83
Calculate the principal remaining, which is the previous principal remaining minus the amount applied to principal: $1000  $493.83 = $506.17 (remaining balance)
Once next payment is received, repeat steps 1 to 3.
Note: Due to rounding of computed values, it could potentially be off by a maximum of N number of pennies after the full term of the loan. It will never be short if we round up, rather, principal could end up with a few more pennies.
Declining Balance Interest – Interest in Periodic Payments; Principal at the End (or Earlier)
Declining Balance Definition: Interest is computed at periodic intervals on the amount of original principal that have not yet been repaid. Since the borrower only pays interest on that amount of original principal that has not yet been repaid, interest paid is smaller every period.
For this interest type, the client only needs to pay per period the interest and the complete principal at the end of the loan cycle. Thus, per period the client pays the same interest amount, unless he or she pays part of the principal ahead. If so, the future periodic payments are less the interest amount.
Note:
Early payments of principal/interest will not be handled in version 1.0.
If loan is disbursed in between two meetings, interest installments are not EMIs.
Formula:
For one period interest calculation: interest = P * (r/n)
Where,
P = loan amount Use the Principal Remaining (which at one point is equal to the initial amount).
r = rate of interest (annual/100)
n = term of the loan
Examples:
P=1000, r = 3% monthly, n = 4
Interest = 1000 *(3/100) = 30
Monthly payments of 30
If client pays 300 of principal, then next payment will be of:
Interest = 700 *(3/100) = 21
Flat Interest
Definition: Flat interest refers to charging interest on the full original loan amount, rather than on the declining balance. For example, with group based loans, a common "interest rate" is "3% per month, flat, for four months". This means that a $100 principal amount lent is multiplied by 3%, and then by 4 months to come up with $12 in interest. Thus, $112 would be repaid over four months in equal installments.
This is the most common calculation used in Grameen Style MFIs (most MFIs). Also there is no incentive for repaying early, since customer still has to pay the total interest as was calculated at the start of the loan.
The use of "flat" interest rates is usually explained as facilitating understanding by poorly educated and illiterate clients. "Flat" interest is easier to calculate than “declining balance” interest. However, "flat" interest also disguises the "effective" interest rate (APR, or internal rate of return) to the loan. Based on how often the principal is collected (weekly, monthly or at the end of the term), and assuming there are no additional fees, the above loan has an APR of between 39% and 71%.
Formula: Interest = P * r/100 * n
P = loan amount Initial amount
r = rate of interest
n = term of the loan
Examples:
P=100, r = 3/100 per month, n = 4
Interest = 100 *(3/100) * 4 = 12
Monthly payments of 112 / 4 = 28
Note: The above formula holds for loans disbursed in between two meetings also.
Declining balance interest calculation with equal principal installment
This feature allows MFIs to calculate interest using equal principal installments, and simple declining balance formula to calculate the interest. This means that the borrower pays equal installments of principal for the duration of the loan, and the interest is calculated on principal that has not been paid for the loan period.
Formula Interest = (PPp) * r * n
Where,
P = loan amount
Pp= Principal paid
r = rate of interest
n = term of loan
The following example illustrates this:
Principal = 15,000
Int. Rate = 25 %
No of payments = 25
Payment schedule (Every 2 weeks) = 14 days
Principal = 15,000/25 = 600
Payment Schedule 

Installment 
Principal 
Interest 
Total 
1 
600 
(15,000 – 0)*0.25*14/365 = 143.83 
743.83 
2 
600 
(15000600)*.25*14/365 = 140 
740 
3 
600 
(15,000 – 1200)*.25*14/365 = 132.32 
732.32 
Repeat 



The following additional logic is needed in the Loan Repayment and Interest Calculation:

Calculate the Principal per Installment
 PPI = Total Principal/ No of Payments
 Interest Per Period = (PPp) * r * n Where, P = loan amount Pp= Principal paid r = rate of interest n = term of loan
Declining balance calculation with interest recalculation
Declining Balance  Interest Recalculation gives user a new possibility in configuring and managing cash flow on loan accounts. The main role of Interest Recalculation is to control early and late payments of each installment. When loan repayment is on time, then Interest Recalculation works in the same way as normal Declining Balance interest rate type. Interest Recalculation can be mostly useful in cases such as: early payment with less than installment amount, due date payment with excess amount or late payment with equal installment amount.
In case when client pays late, an excess interest is charged from him on the principal he is late on, and for the number of days he is late in making the payment. This excess interest gets added to the next installment and will be shown along with the installment’s interest.
In case the client pays early, only the interest due till payment date is recovered from the payment applied. The remaining amount is allocated towards the principal payment and is reflected against the next installment’s principal.
Interest due till date is recovered first because the installment date for the installment in case of early payment is yet to occur. The installment will not be marked as completely paid in case of early payment. For the date of early payment to the installment date, interest will be calculated on the overall unpaid principal for thoes number of days.
In each cases it is necessary to count daily rate of interest:
id = (r/100)*(1/365)
where :
id  rate of interest per day
r  rate of interest per year
Loan amount in example is 1000$ and it is taken for 4 terms, rate of interest is 25% per year. Using id formula we see that rate of interest is 0.000684915 per day. Disbursal date is 25VIII2010
Example
Payment is early and more than required.
Installment 
Due Date 
Principal 
interest 
Total 
days 
o/s p 
1 
23IX10 
260,92 
19,08 
280,00 
29 
739,08 
2 
25X10 
228,99 
15,56 
244,55 
32 
510,09 
3 
25XI10 
252,22 
10,40 
262,62 
31 
257,87 
4 
25XII10 
257,87 
5,09 
262,96 
30 
 
TOTAL 
1000 
50,14 
1 050,14 
According to disbursal date, we see that Client repays first installment earlier than one month. Also Client repays more money than required. Interest formula for Interest Recalculation is the same in every case:
Interest = (os/p)*days*id
where:
os/p  amount left to repay
days  number of days since last repayment
id  interest rate per day
Generally, Principal is a difference between early amount left to repay and actual amount left to repay, but when payment is greater/lesser than it was specified during the loan creation, it becomes a difference between amount paid and interest. As it is shown in the table above, second principal is:
739.08$  510.09$ = 228.99$
For more details please refer to Declining Balance  Interest Recalculation FS.