The formula
It accrues month by month: balance × (1 + i) + contribution, until the goal is reached
Where it comes from
With interest involved there is no simple division: each month the balance grows two ways, from what you put in and from what the accumulated pot earns, and the second gains weight over the years. Over a long term, interest ends up contributing more than you do, and that crossover is the interesting part. At zero interest the calculation really is a division, which is why the answer is so different.
How to work it out by hand
- Note the goal, what you already have and what you can set aside each month
- Each month, multiply the balance by (1 + monthly interest)
- Add the contribution
- Repeat until the goal is reached and count the months
What is worth knowing
The goal is in today's money, and in thirty years a million will not buy what it buys now: to reason in current purchasing power, use the real return, nominal minus inflation, and you will see the term stretch considerably. And what moves the answer most is not the rate but the contribution: doubling it cuts the term far more than gaining two points of return.