As you can see in the chart above inflation has been rising from 1913 - 2013 with an average rate of 3,4%!
with other words this means that if you bough something for $100 in 1913 it would cost $2275,22 now.
So as a stock investor we want to protect us against this inflation because a dollar today is worth more than a dollar tomorrow
SO HOW DOES A STOCK PROTECT YOU AGAINST INFLATION?
Companies’ sales and earnings rise because of inflation, and the value of their stock, which is generally based on earnings, goes up in accordance.
100$ cash vs 100$ in a stock
100$ cash => will be less worth in the future because inflation
100$ stock => "may" be worth more because inflation "may" increase earnings of that stock.
This is something you got to keep in your mind when you purchase a stock.