# Compounding Interest Calculation

$A = P(1+r/n)^{nt}$

Where:

- A = Accrued amount (principal + interest)
- P = Principal amount
- r = Annual nominal interest rate as a decimal
- R = Annual nominal interest rate as a percent
- r = R/100
- n = number of compounding periods per unit of time
- t = time in decimal years; e.g., 6 months is calculated as 0.5 years. Divide your partial year number of months by 12 to get the decimal years.
- I = Interest amount
- ln = natural logarithm, used in formulas below

Note that rate r and time t should be in the same time units such as months or years. Time conversions that are based on day count of 365 days/year have 30.4167 days/month and 91.2501 days/quarter. 360 days/year have 30 days/month and 90 days/quarter.

$P = A/(1+r/n)^{nt}$

$P = I/((1+r/n)^{nt}-1)$

$r=n((A/P)^{1/nt}-1)$

$R=r*100$

$t=ln(A/P)/n(ln(1+r/n))$

*then also*

$t=(ln(A)-ln(P))/n(ln(1+r/n))$

Last modified 7mo ago