I'm sure there are tons of posts about it Sarahbellum.
For goldfish, another rule (which probably isn't great either) is 20g for the 1st and then 10g for every additional goldfish, meaning that you need a 30g for 2. Goldfish get large and are messy, so they require larger tanks. If a 30g is in the near future, you are doing good. Don't leave them in the 10g for too long.