I am trying to calculate what my investment pot will be in 25 years, adjusting for inflation.
You should really be looking at estimated future returns, not historical returns.
The stock return will consist of three components:
- Inflation. Stocks are inherently inflation-protected, so whatever inflation there will be will be part of your return.
- Economic growth. Stocks are investments into companies that are running a good fraction of the world economy.
- Dividends. Stocks pay dividend and it will directly benefit you.
Global economic growth in the near future (2030) is projected to be bit below 4%. However, US economic growth is lower. Then again, most companies in S&P 500 are global companies benefiting from economic growth wherever it happens, so the best estimate for economic growth component is between US growth (around 2%) and global growth (bit below 4%). I would say 3% is a good estimate.
Dividend yield of S&P 500 is 2% currently. However, some companies do share buybacks so you should take those into account as positive dividends. On the other hand, some companies issue new shares, collecting money from the investors, so you should take those into account as negative dividends. I would assume the share buybacks and issues of new shares cancel each other out, so 2% dividends is reasonable.
Inflation target in most areas is 2% (EU, US). This is the best estimate for long-term inflation.
So, you can assume your returns are 3%+2%+2% = 7% if investing to the US stock market. You must subtract the costs of investing and taxes from this pre-cost+pre-tax return.
Another way to take a look at the returns: corporate earnings are turned into two components: economic growth and dividends. Inflation is a component taken separately into account. Thus, the return can be estimated to be E/P + inflation. S&P 500 P/E ratio currently is 25, so E/P ratio is 4%. This would give you a return of 4% + 2% = 6%.