A general rule of thumb before you buy your goldfish tank is to first determine number of fish that you intend to keep in your aquarium. A normal practice based on my own experience is that you will need,
3 gallons of water for every inch (2.5cm) of goldfish length
That means, if you have 4 goldfish with each measuring 3 inches in length, you would require at least 36 gallon fish tank size to accommodate all your pets. However, bear in mind that common goldfish can grow up to 8-10 inches in length and thus your aquarium should be sized accordingly to cater for your pet’s maximum growth. Common mistake made by aquarium owners is to buy smaller tanks when they think that this is more than enough for the younger fry but later found out that, the fish tank size is in fact not big enough after all.
Having the right aquarium size is very important because without much room, this will mean that your goldfish will not be able to reach maximum growth size and will become stunted. This will also lead to development of not proportionately equal fin size.
Related topic: Goldfish Reproduction