C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » C solved programs » Advance C programs

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 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: ");

	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;


    Enter principal: 20000
    Enter rate: 10
    Enter time in year: 2
    Monthly EMI is= 922.899536

You may also be interested in...

C/C++ Tips and Tricks...

Was this page helpful? YES NO

Are you a blogger? Join our Blogging forum.

Comments and Discussions