Calculate compound interest

Compound interest calculated by this formula "A = P(1 + r / n ) ^ nt". Where

A   =   Final amount
P   =   Principal balance
r   =   Interest rate
n   =   number of times interest applied per time period
t   =   number of time periods elapsed

For example.

Principal :  1500.0
Time :  3.0
Rate :  7.3
Compound Interest :  1853.0640255

Principal :  170.4
Time :  7.0
Rate :  3.4
Compound Interest :  215.334373801618



Comment

Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.

New Comment







© 2022, kalkicode.com, All rights reserved