Savings Calculator Formula
Understand the math behind the savings calculator. Each variable explained with a worked example.
Formulas Used
Future Value
future_value = initial_deposit * pow(1 + monthly_rate, num_months) + monthly_contribution * (pow(1 + monthly_rate, num_months) - 1) / monthly_rateTotal Contributions
total_contributions = initial_deposit + monthly_contribution * num_monthsInterest Earned
total_interest_earned = future_value - total_contributionsVariables
| Variable | Description | Default |
|---|---|---|
initial_deposit | Initial Deposit(USD) | 5000 |
monthly_contribution | Monthly Contribution(USD) | 200 |
annual_rate | Annual Interest Rate(%) | 4.5 |
years | Time Period(years) | 10 |
monthly_rate | Derived value= annual_rate / 12 / 100 | calculated |
num_months | Derived value= years * 12 | calculated |
How It Works
How Savings Growth Is Calculated
This calculator uses the compound interest formula with regular contributions:
FV = P(1+r)^n + PMT × [(1+r)^n - 1] / r
Where P = initial deposit, PMT = monthly contribution, r = monthly rate, n = total months.
Worked Example
$5,000 initial deposit with $200/month at 4.5% APY for 10 years.
initial_deposit = 5000monthly_contribution = 200annual_rate = 4.5years = 10
- 01Monthly rate = 4.5% / 12 = 0.375%
- 02Months = 10 × 12 = 120
- 03Initial deposit grows to: $5,000 × 1.00375^120 = $7,834
- 04Contributions grow to: $200 × (1.00375^120 - 1) / 0.00375 = $30,038
- 05Future value = $7,834 + $30,038 = $37,872
- 06Total contributed = $5,000 + $24,000 = $29,000
- 07Interest earned = $37,872 - $29,000 = $8,872
Ready to run the numbers?
Open Savings Calculator