I wrote an article Retirement Savings Ratio, which links to a spreadsheet you can download.

The approach I took was to look at the goal of having X times your final income saved for retirement. It turns our that if you start saving at age 20, and retire at 62, by saving 15% of your gross income, you'll have 20X your final earnings in your retirement account.
The sheet allows you to adjust the inflation/income increase each year, percent saved, and the annual return. To keep it simple, I don't have different numbers for wage increase vs inflation.
The criticism of the method - (a) salary should increase faster than inflation. (b) returns aren't level each year. (of course not, one can make such exercises as complex as they wish. I chose to use an 8% return, thinking that was a conservative number.) (c) a final year drop in income distorts the ratio saved. (Well, yes. Savings needed is really a function of spending, not income. So the required ratio isn't the same for everyone.) (d) I ignored Social Security. (Indeed, but the sheet doesn't change, just the ratio that will make you happy. You earned $100K, and spent $80K/yr? $20K in SS benefits? You need $60k/yr to replace the needed income, $1.5M will provide that. A 15X ratio)
One can tinker with the sheet easy enough. The main point it to have an ongoing goal of X times income to see that you're on track. Last, the 15% is total savings, your deposit plus any company match or pension deposit.
5 - 1 = 4%
. To calculate pension fund value you may find this useful.