In my experience, MacBooks are built like tanks and will last as long as the hardware inside of them is capable of running the software that you regularly use. I have one from 2007 that still works fine for basic tasks like word processing, email, and using the Internet, but I wouldn't use it for anything more than that. The only thing I've had to do to it is replace the battery a few years ago because the original would no longer hold a charge.
If I were looking to buy a new one, I would make a list of software that I regularly use, and make a buying decision that matches the hardware to the software. Once you buy the computer, you should expect it to give you many years of good service.