The average life of a well-maintained laptop is about three to five years, IMO. There are several factors including the quality of the hardware, and the type, care and usage of the laptop. Cheaper models are built with cheaper materials, so if you're looking for a computer that will last three to five years or longer, invest in a laptop with quality hardware. Some manufacturers use the cheapest hardware for the cheapest laptops. It is all replaceable, but at what cost? If your motherboard fails in two years, do you really want to spend $200-400 on a new one for outdated equipment? Most people would just buy a new laptop. Parts like the battery and graphics card can be overused, and the warranty won't cover anything that stops working from normal use.
Regular care will help your laptop last longer. Regularly clean it or take it in to have the dust removed from the fan, keep liquids away from it, keep the monitor clean. Never set your computer on soft surfaces like your bed, overheating will cause laptop performance to quickly deteriorate. Don't set it on a carpet, the fibers will work their way into the case and degrade the performance and life of the laptop. Be careful with the cord that charges the computer: they can easily wear out when bent beside the laptop's plug-in slot.
Computers used for gaming wear out the hardware faster than those used for simple office work/ and or/ browsing. Try not to overwork the computer -- the parts can burn out. Also make sure you do not leave it running constantly, and avoid running it from the battery to get a longer lifespan. With great care, a laptop can easily last three years, and in some cases can last 10 years or more. It all depends on how well you protect it.
I'm posting this message on a 5yr old Dell 2200 (Win XP Home) laptop and the original hard drive just crapped out on me about 2 months ago.
I replaced the HDD with this one, cost me only 50 bucks and it runs like new, Other than that, I've had no problems with it, but then again I'm a bit fanatical about it's maintenance. I have a second laptop (Gateway NV59C, Win 7 64 bit, 320 GB HDD) that I use for all my "heavy lifting" (gaming, etc.)
Macs seem to last longer than PCs, but cost more upfront. I can't speak from experience, since I've never owned a Mac. I have a friend who has a Mac that's 10 years old.
Hope this helps!