err...i'm by no means an expert on goldfish,sullybaby27 would help you better but i'll try.
gold fish live about 20 years,perhaps more if kept in a large tank or pond.1 gallon,even 10 gallons is not suffiecent for a fancy goldfish,they should have 20 gallons for the first one,plus 5 more gallons for every other one.
a goldfish will survive a few months in a one gallon. at the most even with filtration.
a goldfish will survive fine for about 2-3 years alone in a 10 gallon, but once they start to reach adult size they shouldnt be kept in anything smaller than a 20 at the least.
the normal life span of a properly cared for goldfish can reach upwards of 20-30 years, the record holder from england is 43.
the reason why goldfish need alot of filtration and alot of space is because they naturally produce alot of waste product. and although the tank may be clear, chemically it can be quite bad. the ammonia levels they produce can kill them if they are kept in a small tank, also the liklihood of disease and infection increases significantly.
right now i have 1 large goldfish 1 medium goldfish and 2 small goldfish in a 30 gallon, according to my suggestions this seems small, but i have an enormous filter on the tank, the filter is for up to 75 gallons, and i also do 2 25% water changes per week, as well as giving them a healthy diet of frozen brine shrimp, live feeder guppies, pellets, and zucchini. My set up wont last forever tho, i would be in a very different situation if all my goldfish were full size, i would not be able to keep them all healthy.
so, if you already have a goldfish what i would do is get the largest tank you can possibly afford, and if you cannot afford more than a one gallon, you need to find someone else to take care of your fish because your goldfish wont make it very long in a one gallon tank.
let me know if you have any other questions, i would be more than happy to go into more detail with anything else.