Excellent question. Typically when you chart the S&P you are seeing it priced in US Dollars, which lose value over time due to inflation.
But you don’t have to price it in dollars. You can compare it to any currency or asset that is traded on the open market. Just open your favorite charting tool and enter SPX/BTC OR SPX/GOLD etc.
Here are two more examples…
S&P 500 vs M2 total money supply:
And BTC vs M2 total money supply:
Is the stock market really helping me to beat inflation? It doesn’t look great.