diff --git a/README.md b/README.md index 33bd036..71bd591 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,13 @@ monthly = calc.calculate("payment", P=200000, r=0.04/12, n=30*12) # Investment growth calc.define("cagr", "((FV/PV)^(1/n)) - 1") growth = calc.calculate("cagr", FV=1500, PV=1000, n=5) + +# advance compound interest +calc.define("compound", "p(1+r/n)^(nt)") + +for i in range(1,12): + amount = calc.calculate("compound", p=1000, r=0.05, n=12, t=i) + print(f"Investment vale: {amount:.2f} at year: {i}") ``` ### Education @@ -340,4 +347,4 @@ MIT License - feel free to use in your projects, educational materials, and rese **Made with ❤️ for the math community** -*RealMaths: Because mathematics should be about the math, not the syntax.* \ No newline at end of file +*RealMaths: Because mathematics should be about the math, not the syntax.*