What is ‘Compound interest’?
Compound interest is the addition of interest to the principal sum of a loan or deposit, or in other words, interest on interest. It is the result of reinvesting interest, rather than paying it out, so that interest in the next period is then earned on the principal sum plus previously-accumulated interest. Compound interest is standard in finance and economics.
Compound interest may be contrasted with simple interest, where interest is not added to the principal, so there is no compounding.
Compound Interest formula:
Formula to calculate compound interest annually is given by:
Compound Interest = P(1 + R/100)r
P is principle amount
R is the rate and
T is the time span
Input principle amount. Store it in some variable say principle. Input time in some variable say time. Input rate in some variable say rate. Calculate compound interest using formula, Compound Interest = principle * (1 + rate / 100) time). Finally, print the resultant value of CI.
Input : Principle (amount): 1200 Time: 2 Rate: 5.4 Output : Compound Interest = 1333.099243
Compound interest is 16288.9
This article is contributed by Anurag Rawat. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Program to find the rate percentage from compound interest of consecutive years
- Compound Interest
- Program to find simple interest
- Simple Interest
- Times required by Simple interest for the Principal to become Y times itself
- Program to find value of 1^k + 2^k + 3^k + ... + n^k
- Program to find sum of 1 + x/2! + x^2/3! +...+x^n/(n+1)!
- Program to find HCF iteratively
- Program to find the Depreciation of Value
- Program to find the sum of the series 1 + x + x^2+ x^3+ .. + x^n
- Program to find LCM of 2 numbers without using GCD
- Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!
- Program to find greater value between a^n and b^n
- Program to find LCM of two numbers
- Program to Find the value of cos(nΘ)
- Program to find the sum of a Series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n)
- Program to find the value of sin(nΘ)
- Program to find sum of series 1*2*3 + 2*3*4+ 3*4*5 + . . . + n*(n+1)*(n+2)
- Program to find the value of tan(nΘ)
- Program to find GCD or HCF of two numbers