An average laptop can last upto 4-5 years upon average, and even more if you use with care and not intensively( too much). Typically, the battery degrades as time passes ( around after 1.5-2 years), as laptops are used even while charging.

I've got about a 5 year old desktop that outperforms many new systems still. Surprising how performance has slowed. Most advances have been in power consumption, portability and newer sensors and interaction inputs.

Assuming everything is in perfect working order, the laptop can potentially last a decade or more, exceeding it's service life.

But of course, individual components can and will fail. Hard drives can fail, batteries will wear out after a couple/few years, plastic can age and crack... but on the original core parts it'll last a while, best case.

But it also depends in the design and stuff. HP had the infamous Pavilion dv series laptops (late 2000's) that had bad thermal design which relegated many a laptop to an early scorching death.

However I have a Lenovo ThinkPad T400 and my friend has a Dell Latitude E-something (both are business class PC's and were direct competitors) that are similar in age and still tick. So if you're going for longevity over slimness etc. a business/professional grade laptop will be the ticket. Easier to source parts for too typically.

PC minimum requirements have also plateaued somewhat since the days of Vista so a computer will remain useful, for longer these days. (My dad has a laptop with Windows 2000 that still works perfectly fine, but its 96 MB of RAM and underpowered-back-then CPU means it won't be doing modern computing anytime ever.