Savings Goal Calculator Formula

Understand the math behind the savings goal calculator. Each variable explained with a worked example.

Formulas Used

Monthly Deposit Needed

monthly_deposit = monthly_rate > 0 ? remaining / ((pow(1 + monthly_rate, months) - 1) / monthly_rate) : (goal_amount - current_savings) / months

Total You Will Deposit

total_deposits = monthly_rate > 0 ? remaining / ((pow(1 + monthly_rate, months) - 1) / monthly_rate) * months : (goal_amount - current_savings)

Interest Earned

interest_earned = goal_amount - current_savings - (monthly_rate > 0 ? remaining / ((pow(1 + monthly_rate, months) - 1) / monthly_rate) * months : (goal_amount - current_savings))

Variables

VariableDescriptionDefault
goal_amountSavings Goal(USD)10000
current_savingsCurrent Savings(USD)2000
monthsMonths to Goal(months)24
annual_returnAnnual Return (savings account)(%)4
monthly_rateDerived value= annual_return / 12 / 100calculated
remainingDerived value= goal_amount - current_savings * pow(1 + monthly_rate, months)calculated

How It Works

How to Plan Monthly Savings

This calculator accounts for compound interest on your existing balance and future deposits to determine how much to save each month.

Formula

Monthly Deposit = (Goal - Current x (1+r)^n) / [((1+r)^n - 1) / r]

Where r is the monthly interest rate and n is the number of months.

Worked Example

Save $10,000 in 24 months, starting with $2,000 at 4% annual return.

goal_amount = 10000current_savings = 2000months = 24annual_return = 4
  1. 01Monthly rate = 4% / 12 = 0.3333% (0.003333)
  2. 02Current savings will grow to: $2,000 x (1.003333)^24 = $2,165.57
  3. 03Remaining needed: $10,000 - $2,165.57 = $7,834.43
  4. 04Monthly deposit = $7,834.43 / [((1.003333)^24 - 1) / 0.003333] = $314.40
  5. 05Total deposited = $314.40 x 24 = $7,545.66
  6. 06Interest earned = $10,000 - $2,000 - $7,545.66 = $454.34

Ready to run the numbers?

Open Savings Goal Calculator