Shit my desktop was built in 2013 and still works great with win 10..... granted i built a pretty high end system for that time
I finally just built up a new one about a month ago. Mine was from ~2010. Technology seems to have slowed down since then and there haven't been huge leaps in tech so it still worked great. Had to replace the video card and RAM maybe two years ago, and finally the mobo died about a month ago. Found I had a tiny leak in the upper radiator that must have slowly killed the former parts as well.
Laptops don't last as long as desktops in general because of heat. Everything is smaller and crammed into a base with bad airflow. The heatsinks get clogged with dust and most people don't clean them and use them on a blanket or pillow. Heat kills electronics.