The flow rate of water in gallons per minute, or gpm, can be calculated with the help of the Bernoulli equation and careful unit conversion. If the pressure is known in pounds per square inch, or psi, at two locations along the pipe, then the Bernoulli equation can be used to determine the velocity of the water. The Bernoulli equation states that velocity is determined by calculating difference in pressure between two points, multiplying by 2, dividing by the density of water and then taking the square root. You then get the flow rate by multiplying the velocity by the crosssectional area of the pipe.
Things You'll Need
 Calculator

Calculate the difference in pressure between the tank pressure and the exit of the pipe.
This example will calculate the flow rate of water draining from a tank through a pipe with cross sectional area of 0.500 square feet. The pressure inside the tank is 94.0 psi and the pressure at the exit is atmospheric pressure, or 14.7 psi.
Subtract 14.7 from 94, which equals 79.3 pounds per square inch.

Convert pounds per square inch to pounds per square foot. Multiply 79.3 psi by 144 square inches per square foot, which equals 11,419 pounds per square foot.

Multiply by 2, which equals 22,838, and divide by the density of water. Divide 22,838 by 62.4 pounds per cubic foot, which equals 366.

Take the square root of 366, which equals 19.1 feet per second.

Multiply the velocity  19.1 feet per second  by the cross sectional area of the pipe  0.5 square feet  which equals 9.57 cubic feet per second.

Convert cubic feet per second to gallons per minute by multiplying by 448.8, which equals 4,290 gallons per minute.
Tips & Warnings
 This calculation assumes that the crosssectional area of the tank is so large compared to the crosssectional area of the pipe that if you divide the area of the pipe by the area of the tank, the ratio will be close to zero.
 This calculation assumes there is no loss of flow rate due to friction, and that the flow rate is fast enough to be considered turbulent.
References
 Transport Processes and Unit Operations, 3rd edition; Christie J. Geankoplis
 University of Delaware: BREG 215: Applied Fluid Mechanics: Flow of Fluids in Pipes
 Photo Credit Kattiyaearn/iStock/Getty Images