actually it is 30 plus, though not all live that long, usually 20-25 as said, but there was one that lived to be 43, the oldest living goldfish.
Now koi on the other hand can live hundred plus years.
But that is the life span for coomen/commets. Fanceys lives are shorter do to the selective breeding.
Also, in the pond you need to take into consideration other things that may get at the goldfish. So it may be one year, one day, 15 years, in a outside pond it really depends.