Lifespan varies dramatically by species.
Examples
Guppies and bettas live 2–5 years; goldfish 10–20 years; angelfish and clownfish 10–30 years; koi and sturgeon can reach 50–100 years; Greenland sharks may live up to 400 years.
Factors
Species, environment, genetics, and care quality all influence longevity.
There is no single answer for all fish.