Write a C program to calculate EMI or EMI Calculator

By | 03.12.2016

C program to calculate EMI or EMI Calculator

Write a C program to calculate EMI or EMI Calculator.This program is take Principal, Rate and Time to calculate EMI to produce the desired output .

What is EMI (Equated Monthly Installment) ?

  • Equated Monthly Installment – EMI for short – is the amount payable every month to the bank or any other financial institution until the loan amount is fully paid off.
  • It consists of the interest on loan as well as part of the principal amount to be repaid. The sum of principal amount and interest is divided by the tenure, i.e., number of months, in which the loan has to be repaid. This amount has to be paid monthly.
  • The interest component of the EMI would be larger during the initial months and gradually reduce with each payment. The exact percentage allocated towards payment of the principal depends on the interest rate.
  • Even though your monthly EMI payment won’t change, the proportion of principal and interest components will change with time. With each successive payment, you’ll pay more towards the principal and less in interest.

Formula to calculate EMI : :

EMI Formula


  • E is EMI
  • P is Principal Loan Amount
  • r is rate of interest calculated on monthly basis.
  • n is loan term / tenure / duration in number of months

Below is the source code of the C program to calculate EMI or EMI Calculator  which is successfully compiled and run on the windows system.The Output of the program is shown below.


#include <stdio.h>
#include <math.h>
int main() 
    float principal, rate, time, emi;
    printf("Enter principal: ");
    printf("Enter rate: ");
    printf("Enter time in year: ");
    rate=rate/(12*100); /*one month interest*/
    time=time*12; /*one month period*/
    emi= (principal*rate*pow(1+rate,time))/(pow(1+rate,time)-1);
    printf("Monthly EMI is= %f\n",emi);
    return 0;

Output : :

Enter principal: 380000
Enter rate: 13.69
Enter time in year: 4
Monthly EMI is= 10325.068359
0 0 votes
Article Rating
Category: Advance Programs C Programming Tags:

About Tunde A

My name is Tunde Ajetomobi, a Tech Enthusiast and Growth Hacker. I enjoy creating helpful content that solves problem across different topics. Codezclub is my way of helping young aspiring programmers and students to hone their skills and find solutions on fundamental programming languages.

Notify of

Inline Feedbacks
View all comments