JavaScript Financial Calculations
by
Prof. Richard B. Goldstein
Providence College

is today's date
Enter Your Name Here
Enter Your Class Here

Compound Interest

Amount: A = P*(1 + r)n
Eff. Rate: ER = (1 + r)n - 1
where P = principal, r = interest per period, n = no. of periods
Principal ($)
Annual Rate of Interest (%)
No. of periods per year
Years

Amount ($)
Effective Annual Rate (%)

Mortgage Payments

Monthly Payment: R = P * r / (1 - (1 + r)-n)
Debt Balance after K payments: D = P * (1 + r)k - R * ((1 + r)k - 1)/r)
where P = principal, r = interest rate per period, n = no. of periods, k = no. of payments
Principal ($)
Annual Rate of Interest (%)
Years
K = No. of Payments

Monthly Payment ($)
Debt after K payments ($)

Accelerating Mortgage Payments

Suppose one decides to pay more than the monthly payment shown
above. How many months will it take until the mortgage is paid off?

n = ln[x/(x - Pr)] / ln (1 + r)

Principal ($)
Annual Rate of Interest (%)
Monthly Payment ($)

No. of Payments

Future Value of an Annuity

Future Value: FV = R * ((1 + i)n - 1)/i)
where P = annual payment, r = rate of interest, k= no. of periods per year.
R = P/k, i = r/k and n = no. of payments
Annual Payment ($)
Annual Rate of Interest (%)
Number of Periods per Year
Number of Years

Future Value of Annuity ($)

How Much Does One Need to Save for Retirement?

Future Value: FV = pS(ert - egt)/(r - g)
where p = proportion saved, S = salary, r = rate of interest, g = growth rate of salary
and t = number of years until retirement.

Final Salary = Segt

Percent one needs to save = q[1 - e(g - r)L]/[e(r - g)t - 1]
where L = years of life expectancy and q = proportion of final salary needed
Current Salary ($)
Annual Rate of Interest (%)
Growth Rate of Salary or payments (%)
Number of Years until Retirement
Percent of Salary Saved (%)
Life Expectancy (years in retirement)
Proportion of Final Salary Needed in Retirement

Future Value of Annuity ($)
Future Salary at Retirement ($)
Percent of Salary that needs to be Saved

Thank you for trying these calculations.

Return to: Prof. Richard B. Goldstein