Savings Goal Time Calculator
Time to savings target calculator
This is a simple Shinyapp calculator visualising how many years are needed to get to a given savings goal, as a function of the yearly savings rate and the rate of return. The calculation is in nominal terms, so not adjusting for inflation. The formula assumes that all savings from income are continuously reinvested, along with all returns generated. In this case, the formula for wealth in year n is:
$$ \text{target} = \frac{y}{r} \left((1 + r)^n - 1\right) $$
Where:
- y: amount saved per year
- r: annual return rate
- n: number of years
Given a fixed target, the number of years required to reach it is:
$$ n = \log_{1 + r} \left( \frac{\text{target}}{y / r} + 1 \right) $$
This (n) is the value shown in the Shinyapp calculator/heatmap, as a function of:
- the target amount (adjustable)
- y: amount saved per year
- r: annual return rate
Code base and data sources
R code for graphs
Written on July 28, 2025
[
data-visualisation
finance
money
savings
]