Physically, a computer can last much more than 3 years. I've had computers that have last 8+ years. However, technology progresses at such a rapid pace that usually a computer is outdated in 3 to 4 years. If you upgrade your computer periodically during that time, you may be able to stretch that to 5 or 6 years.
It will very much depend on the tasks that you wish to undertake with it:
a. Simple:(typing,emails) 5-6 years
b. Complicated: (design,programing,gaming): 2-3 years
depending on the user a computer can last up to ten years. A experienced user can keep their computer in top shape and get many hours of usage out of it. Normaly wear and tear is expected on a PC but normal tune ups and defraging can help to keep thme running better and longer.
If it is a desktop I think it will last two years of course if from the time I bought it is the one will the latest technology. For Laptops I will use is for more than three years eventhough most of the laptops are not capable of upgrade.