This is a very debated subject amongst the hobby and trade as people have their own opinions however a good rule of thumb is as follows; Goldfish growing to a potential adult size of 30cm they require an absolute minimum of 300 litres. This is again a bare minimum where a few Goldfish can live a long-term life of good health with a suitable volume of water to live in. Taking into consideration they will readily breed once they reach sexual maturity it is certainly worth allowing extra space for this so having a pond larger than 300 litres will give the Goldfish room to grow in numbers as they breed.
As for Koi these require a far larger pond, their potential adult size of 120cm makes them a potentially enormous Fish. A Koi typically attains an adult size of 60cm in a pond with some specimens reaching the 100cm+ size. Their adult size does depend on several factors: genetics, pond size, feeding both quality of food and frequency of feeding and finally water quality and parameters. An absolute bare minimum 4000-5000 litres and ideally aiming for a pond with a depth of a metre deep. The deeper portion of the pond will hold temperatures better if dug into the ground also with this koi really appreciate the third dimension of being able to swim up and down instead of just side to side. In shallow Koi ponds it’s not uncommon to see individuals with “fat necks”, often where they cannot burn off excess fat from swimming up and down.