I think the general rule when it comes to goldfish is 10 gal per fish. Or even 20 gal for the first fish, then 10 gal for every additional fish according to some members of this forum.
You will see the benefit to the fish within days of putting it in a bigger filtered tank. My goldfish is now in a 10 gal cube tank with two filters, and it is thriving. Growing well, feeding well and is always very active. A year ago the fish was being kept in a 4 gal ish bowl with no filter and very occasional tank maintainance. It has probably doubled in size in the year since having a filter added first and the subsequent tank upgrade.