Raise the desired flow rate (in gallons per minute) to the power of 1.85. Multiply the result by 4.52. For example, if you needed a gravity feed pipe to transfer 20 gallons per minute then 20^1.85 = 255.215, which multiplied by 4.52 equals 1153.57
Find the design coefficient for the type of pipe that you are using. Look in the manufacturer's documentation for an exact coefficient. Estimate the coefficient as 100 for rough materials such as cast iron or 150 for very smooth materials such as copper or plastic. Raise the coefficient to the power of 1.85. For example, if your gravity fed pipe is made of cement it has a coefficient of 140, which equals 9339.78.
Multiply the design coefficient raised to the power of 1.85 by the pressure drop for water, 0.4333 psi per foot of pipe. For example, 9339.78 times 0.4333 equals 4046.93.
Divide the product from step 1 by the product from step 3. For example, 1153.57 divided by 4046.93 equals 0.285.
Enter "4.8655 radical" into your calculator, then type the result from step 4 under the radical. Press enter and record the result in inches. For example, 4.8655 radical 0.285 equals 0.7726 inches. The result is calculated inside diameter for your gravity fed pipe.