3785.4 cubic cm per gallon.
Volume of a cylinder equals (pi X r^2)Xheight
=50240 cubic cm
Divide by 3785.4 cubic cm per gallon=13.27 gallons
You just have to know which measurement is which, diameter or height, to figure out other volumes.
Example: 40 X 35cm.
If 35 is your height, your size would be (3.14X20X20X35)/3785.4=11.61 gallons
If 35 is your Diameter, your size would be (3.14X17.5X17.5X40)/3785.4=10.16 gallons