Odd question, but a rather fun one to answer. I wrote a program a few years ago and have updated the Shiller data. So I think I can give you a pretty good answer. First some important notes:
You can invest $19,000 in your 401K this year, and you could have invested $18,000 a few years ago... however going back 20 years, it was $10,000 as the max you could invest. This value tends (in a rough sense) to follow inflation... very roughly. So I'll just assume moving forward the max contribution will be approximately $19,000 in 2019 dollars.
Now, if we take an individual making $50,000 a year and investing 38% of his income ($19,000) a year (well his salary isn't important, or his rate of savings, let's just say he invests $19,000 a year), and assume he continues to contribute that amount for 50 years we can normalize the data to 2019 dollars and extrapolate backwards to figure out historically how someone investing $19,000 a year (2019) dollars for every 50 year period in history since 1871 would have done.
Here are the results for the last 50ish years...
Someone who turned 20 in June of 1968 and started working that month, investing $2,545.50 (which is 1968's equivalent of 2018's $19,000) into his 401k entirely in the S&P500, reinvesting dividends... who continued to invest an amount each year equal to that $19K in 2018 dollars into the account while letting dividends and growth compound... would end up with $8,625,000 dollars as of June 2018 based on how the market has performed the last 50 years.
If this unfortunate soul had turned 20 in February of 1885, he would have had to work 60 years and 2 months to achieve the same nest egg. If they had started working in September of 1920, it would have only taken them 41 years and 3 months to achieve the same 8.6 million dollar nest egg in 2019 dollars.
To answer your question... it depends.
How you invest and where...
if you invested in the S&P500 the max amount into your 401K every year for 50 years... you'd end up with somewhere between 3.5 and 15million depending on the market tides. Ideally you'd want to start, or have soon after you started... the biggest recession (depression) possible. You'd either not run into one of those when you reached retirement though. In the long run it tends to all even itself out.
That 1885 guy... would surely discover that in his 60's...