For the purpose of 401k retirement planning, suppose:

  1. An individual has 20 working years left.
  2. Upon retiring, the individual wants to withdraw $60k per year (in today's dollars) from a nest egg for 30 years.

Assuming the 3% rule, a $2 million nest egg would last for 30 years? But that's $2 million in today's dollars. How do I estimate what the monthly contribution should be to build this nest egg over 20 years?

Do you reduce the predicted annual rate of return by inflation or do you increase the minimum size of the nest egg?

I've seen multiple articles and blogs that say the average return of the stock market is 10% over 30 years (citation needed). I assume this doesn't include inflation?

  • 1
    Have you tried plugging the numbers into a spreadsheet and just playing with the starting number? This is a fairly straightforward way to get your answer as you already have all the variables worked out.
    – Lawrence
    Oct 23, 2018 at 5:39
  • 1
    Did none of the articles and/or blogs you read show math for the extremely easily researched 30 year stock marker average return? What do you mean includes inflation? 3% inflation means $1 today is worth $0.97 in a year. IF the stock market raises 10% that means your $1 became $1.10, but the effect of inflation means your $1.10 is actually worth $1.067 of last year's stuff. If you ask me, and I've written answers to this effect, inflation is the boogyman, it happens and is felt broadly over long periods of time and it's not really worth the mental bandwidth to prepare for to this extent.
    – quid
    Oct 26, 2018 at 7:41

4 Answers 4


You can use formulas presented here: https://money.stackexchange.com/a/94307/11768

First calculating the size of the pension fund required.

p = ((1 + i)^o (1 + m)^-n ((1 + i)^n - (1 + m)^n) w)/(i - m)  (formula 2)


n is the number of payments to be received
o is the number of the period at the end of which the first payment is received
w is the payment amount
m is the pension fund's periodic rate of return
i is the periodic inflation rate

With the following criteria

  • time now is start of year 1
  • final payment into pension pot at the end of year 20
  • first retirement payment received at end of year 21
  • final retirement payment received at end of year 50, totaling 30 payments

For example, with fund interest at 3% pa and inflation at 2% pa.

n = 30
o = 21
w = 60000
m = 0.03
i = 0.02

p = ((1 + i)^o (1 + m)^-n ((1 + i)^n - (1 + m)^n) w)/(i - m) = 2307538

Upon final payment into the fund, at the end of year 20, the fund should total $2307538 to support 30 subsequent payments of $60000 at today's value.

The first payment received, at the end of year 21, will be $90940, and the final payment, at the end of year 50, will be $161495.

w (1 + i)^21 =  90940
w (1 + i)^50 = 161495

Calculating monthly payments into the fund

Formula 4 is designed to expect an immediate first payment, i.e. at the start of period 1, and thereafter for q further periods, with the payments increasing to offset inflation.

d = ((i - m) p)/((1 + i)^(1 + q) - (1 + m)^(1 + q))           (formula 4)


d is the initial payment amount
m is the pension fund's periodic rate of return
i is the periodic inflation rate
q is the number of payment periods

The period is now monthly so converting interest and inflation.

m = (1 + 0.03)^(1/12) - 1 = 0.00246627
i = (1 + 0.02)^(1/12) - 1 = 0.00165158
q = 20*12 = 240

d = ((i - m) p)/((1 + i)^(1 + q) - (1 + m)^(1 + q)) = 5835.30

The first payment at the start of month 1 should be $5835.30.

There are 241 payments in this scheme.

The payments increase like so

end of month 1:     d (1 + i)     = 5844.94
end of month 2:     d (1 + i)^2   = 5854.59
end of month 3:     d (1 + i)^3   = 5864.26
. . .
end of month 240:   d (1 + i)^240 = 8670.95

Alternatively, for 241 equal payments (also starting immediately) a simpler formula can be used

g = (m p)/((1 + m)^(1 + q) - 1) = 7021.04
  • For '2% pa', what is pa? Oct 23, 2018 at 16:11
  • 'pa' is per annum. 2% per annum (per year) is equivalent to 2% effective annual interest, or 2% nominal interest compounded annually. ref. link Oct 23, 2018 at 17:53
  • How does formula 4 change if the starting value of the nest egg isn't zero? Oct 24, 2018 at 19:47
  • 1
    It changes to d = ((i - m) (p - a (1 + m)^q))/((1 + i)^(1 + q) - (1 + m)^(1 + q)) where a is the starting value. There is still a payment at the start of the first period, so the fund starts with a + d. As before the final payment into the fund is d (1 + i)^q, bringing the fund value to p at the end of period q. Oct 25, 2018 at 11:49
  • 1
    It is similar to the Excel PMT function but includes the inflation term to increase the payments. It is a solution for d of the closed-form equation of nest egg = sum of future values of payments i.e. p = (d + a) (1 + m)^q + Σ d (1 + i)^(q - k) (1 + m)^k for k = 0 to k = q - 1. The Excel PMT function does the same kind of thing but is simpler, keeping the payment size the same. PMT would find a solution for d from p = Σ d (1 + m)^k for k = 0 to k = q - 1 (for payments at the end of each period). Oct 25, 2018 at 22:34

It’s easiest just to ignore inflation and do all of your planning in 2018 dollars, looking at real returns rather than nominal returns on your investments. But don’t forget that you then have to increase your monthly contributions each year by the rate of inflation — they can’t be a fixed nominal amount. So your $2 million in twenty years will probably be closer to $3 million in 2038 dollars when you come to retire.

  • But suppose I want a fixed contribution that I don't have to increase each year? Oct 22, 2018 at 19:40
  • 3
    @Seth Why not just make it a fixed percentage of your salary? Then it increases automatically as your income increases (hopefully at least on pace with inflation)
    – D Stanley
    Oct 22, 2018 at 21:49
  • @Seth If you really want a fixed contribution, you can use nominal investment returns and quote your required nest egg in 2038 dollars.
    – nanoman
    Oct 23, 2018 at 2:41
  • 4
    @Seth Why do you want a contribution that’s fixed in nominal terms rather than in real terms? It will represent an ever-declining proportion of your income, which can generally be assumed to be going up at least in line with inflation.
    – Mike Scott
    Oct 23, 2018 at 6:28

I use a spreadsheet. The basics are simple. Each row is a year.

For your working years:

  • Use today's current income and a reasonable guess for inflation to model how your income will change each year. Assume you slightly outpace inflation.

  • For the 401-K/IRA set a dollar figure or percentage for each year. Keep in mind there are annual limits for these funds.

  • Estimate the rate of growth. 7% to 10% seems to be the range. I suggest using the lower number.

At the moment of retirement:

  • Set a percentage of your final years income that you need to replace.

  • Get an estimate from the Social security administration for an estimate of your monthly benefit at different ages of retirement. They update their numbers each year.

  • The rest is from retirement funds.

For the retirement years:

  • Don't forget inflation.

  • your investments might be more conservative so a lower estimated growth may be in order.

Then play with the numbers. See what make sense and is achievable.

Review your progress every few years, or when your situation changes.


First, I don't know why you suggest 3%, the typical 'number' used is 4%. For an annual withdrawal of $60K, you need $1.5M in retirement savings. Next, assuming that while working, you earned $80K (a reasonable guess, based on the desired $60K/yr at retirement), you'd see about $25K from Social Security, and only need $35K/yr to make up the difference. $875K to produce a $35K withdrawal at 4%/yr.

I have a blog post from 2014 titled, The Number, where you can download the spreadsheet mhoran suggests, or at least the saving portion of one.

  • Is it typical to include any income from social security? From what I've read, social security will be insolvent in less than 20 years? Oct 23, 2018 at 16:04
  • I’d not be so quick to count it out. My annual statement warns of a possible 25% drop in benefits, not zero. I’d suggest saving as if social security won’t be there, and as if long term market return were 8%. As you approach 50/55, or so, you’ll be able to adjust, perhaps lowering saving rate or stopping completely. In my case, at 50, I was able to retire. Better that, than to plan on a 10-12% return but only see 8. Oct 23, 2018 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .