Hardware is the longest but it varies. Roku which just exited took 14 years since founding, but Fitbit and Apple took only 7 years and 4 years respectively. Sonos took 16 years, but Peloton only took 7. The data on hardware is pretty wide ranging so while the median may be 11 years, one third of the companies in the data set exited much faster.
Marketplaces, gaming, and social media took 6 to 8 years since founding to exit. Similar to payments and ecommerce, there is a naturally viral effect to these consumer businesses which allows for faster scaling.