In practice it varies - there are 14 year periods without doubling, and then there's 2019-2021 where the market doubled in 3 years. But on average, stocks earned 10.55%/year since 1972, which works out to doubling every 7 years.
Before you get too optimistic, ask yourself if you like it when people steal your money. When you have $5,000 and someone robs you of $2,000... because that's what the stock market feels like. It feels like a robbery, with the money just gone. To brace for that, I think investors should look at data on past crashes and recoveries.