With this online calculator you can calculate mass of water in the pipe.
Formula:
m = π * p * l * d2 / 4
m - mass of water in the pipe
p - density of water
d - pipe diameter
l - pipe length
A pipe is a tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances which can flow.