Actually rainfall is not calculated it is ‘Measured’.
Rainfall is measured with Rain Gauge
The standard raingauge is 203mm in diameter (8″ in the old measure). This is the exact diameter of the top of a funnel. Water falling in the funnel runs down into the bucket below in which it is collected. The measuring glass is a calibrated tube about a quarter the diameter of the funnel. This exaggerates the vertical depth of the water allowing the depth to be read with great accuracy – 0.2mm or 100th of an inch (one point on the old scale).
The depth of the rainfall is what is measured, not the volume. By measuring the depth, it can be extrapolated to an area to calculate the volume of water that has fallen on an area. If you have 20mm of rain falling on a roof of 200sq metres, that will put 200 *.02 or 4 cubic metres of water in a collection tank.
A standard rain guage has a collector which may be a funnel attached to a long measuring tube. The cross sectional area of the collector is amplified 10 fold in the tube so 10 inches of rainfall in the tube would be 1 inch of rainfall. Because of this amplification rainfall amounts can be made when the rainfall is as small as one-hundredth of an inch. Anything less is called a “trace”. I should add that the “standard guage” is just one of at least three types of precipitation measuring instruments.