According to The Nest, pet goldfish usually live between five and 10 years. Under perfect conditions or in the wild, goldfish are known to live 25 years.
A goldfish's lifespan can be maximized by keeping it in ideal conditions for its species. Goldfish prefer temperatures around 65 to 68 degrees Fahrenheit. They thrive in large tanks, preferring a minimum of 20 gallons per 35 ounces of goldfish. A diet of high-quality flake food supplemented with daphnia, freeze-dried foods and vegetable matter is the healthiest choice for pet goldfish and lets them grow properly. The oldest recorded pet goldfish lived 43 years.