Compound Interest in LaTeX (A = P(1 + r/n)^{nt})
- LaTeX command
A = P(1 + r/n)^{nt}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Compound interest formula: the amount A after t years when principal P earns rate r compounded n times a year.
Here P is principal, r the annual nominal rate, n the compounding periods per year, and t the number of years; monthly compounding uses n = 12. As n grows, the amount approaches the continuous formula Pe^{rt}. The exponent must be braced, ^{nt}, otherwise only n is raised. The inline slash r/n keeps the line compact; in display equations, \left(1 + \frac{r}{n}\right)^{nt} is more common and the \left( \right) pair grows the parentheses to fit the fraction. Do not write \frac inside unscaled parentheses, which leaves them visibly too short.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Compound Interest: $A = P(1 + r/n)^{nt}$
\[ A = P(1 + r/n)^{nt} = 1000(1 + 0.05/12)^{120} \]
\end{document}Related symbols
- Continuous Compounding
A = Pe^{rt} - Present Value
\frac{C}{(1+r)^t} - Greater Than
> - Summation
\sum_{t=1}^{n} - Less Than
< - ROI
\text{ROI}
Frequently asked questions
- How do I write Compound Interest in LaTeX?
- Type A = P(1 + r/n)^{nt} in math mode, for example $A = P(1 + r/n)^{nt} = 1000(1 + 0.05/12)^{120}$. It works in plain LaTeX without loading any package.
- Which package do I need for A = P(1 + r/n)^{nt}?
- None. A = P(1 + r/n)^{nt} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use A = P(1 + r/n)^{nt} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $A = P(1 + r/n)^{nt}$ in running text.
Editor LaTeX AI Terbaik, Alternatif Overleaf
Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI
- Jana diagram TikZ yang cantik menggunakan AI
- Muat naik imej dan tukar ke LaTeX dengan lancar
- Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan