%

Formula

A = ( P / r ) * [ 1 - (1+r)-n

Where,
A = Loan Amount
P = Payment Amount
r = Rate of Interest (compounded)
N = Number of Payments

Rate of Interest Compounded is,
If Monthly,
r = i / 1200 and N = n * 12

If Quarterly,
r = i / 400 and N = n * 4

If Half yearly,
r = i / 200 and N = n * 2

If Yearly,
r = i / 100 and N = n