If I don't know how much a tank holds (provided it not and absolutely huge tank that's obviously over 10 gallons) I just go by the old method of getting a 1 gallon jug and seeing how much I can pour into the tank. Low-tech, pretty lame, but it works. xD
But if it's big, or you need to know before you buy and the petstore doesn't look fondly upon you pouring water in their containers (really I don't know why they always get so upset over that xD), then you go by this rough formula:
LxWxH=in3 (Length times width times height equals cubic inches)
and then
in3 / 231=US Gal. (cubic inches divided by 231 equals your amount in US gallons). <-- Because there are 231 cubic inches in a US gallon.
But hey, you're on a computer, you can always go over to a handy dandy conversion calculator:
Cubic Inches to Gallons conversion calculator
That one right there works quite nicely, and type in your number of cubic inches and wha-lah, it will tell you approximately how many gallons you get so you don't have to do that last bit on your own.