Open In App

IPmt() Function in MS Access

IPmt() Function in MS Access is used to return a double specifying the interest payment for a given period of an annuity based on periodic, fixed payments and a fixed interest rate. 

Syntax : 



IPmt (rate, per, nper, pv [, fv ] [, type ])

Parameter : This method accepts six parameters in the syntax, as mentioned above and described below :  

Returns : It returns in double specifying the interest payment. 



Note : The rate and nper arguments must be calculated using payment periods expressed in the same units. For example, if rate is calculated using months, nper must also be calculated using months. 

Example-1 : 
Interest paid in 10 per of Rs. 100000 when annual rate is 8 % and TermInYears is 5. 

SELECT IPMT(0.08/12, 10, 5*12, -100000, 0, 0) AS Interest_Paid ;

Output : 

Interest_Paid
582.796530417576

Example-2 : 
Interest payment calculation for every account-id in a table of Accounts. 

Table – Accounts 

AccountId LoanAmount AnnualRate TermInYears
11001 100000 0.10 5
11002 120000 0.10 6
11003 150000 0.10 4
11004 900000 0.10 6
SELECT IPMT([AnnualRate]/12, 10, [TermInYears]*12, -[LoanAmount], 0, 0) AS INTPaid 
FROM Accounts;

Output : 

INTPaid
733.18850390563
905.149502978079
1051.90923080389
6788.62127233559

 

Article Tags :
SQL