# EMI Calculator (C program to calculate EMI)

EMI Calculator: This program will read total loan amount (principal), rate and time in years and prints the per month EMI of that loan amount.

The formula used in this program is:
(P*R*(1+R)T)/(((1+R)T)-1)

Here,

• P is loan amount.
• R is interest rate per month - we will read in yearly and convert in monthly in program.
• T is loan time period in year - we will read in yearly and convert in monthly in program.

## EMI Calculator program in C

```/*EMI Calculator (C program to calculate EMI).*/

#include <stdio.h>
#include <math.h>

int main()
{
float principal, rate, time, emi;

printf("Enter principal: ");
scanf("%f", &principal);

printf("Enter rate: ");
scanf("%f", &rate);

printf("Enter time in year: ");
scanf("%f", &time);

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: 20000
Enter rate: 10
Enter time in year: 2
Monthly EMI is= 922.899536
```

Top MCQs

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates