For a square tank, the math is real easy. Length X Width X Height which will give you cubic inches. Just convert that to gallons. (
www.onlineconversion.com makes this easy)
Square tanks are not something I would recommend unless you really know what you are doing. Corners and flat surfaces are not common on pressure vessels (air tanks, gas bottles etc) because of the stresses involved. Its really something that needs to be properly engineered and professionally welded.