A computer's power supply typically lasts two to five years. However, the longevity of the computer can be considerably affected by various factors, such as the power supply's quality, the working environment, and the way the computer is used.