well, depends what you mean by last. If you mean when it's going to brake down... well that's probably around 15 years or so. Though computers are really unpredictable when it comes to braking down. It might blow up tomorrow or it might be fine in 2050.
If you are talking about running new applications etc then it might be time to upgrade soon. If it's gaming that you want, well then it's definitely time to upgrade.
So if you are just doing stuff like browsing the internet and writing word documents that computer should be fine for the next few years.