I also have a cube between a range of X and Y values. The calculator can also be used for partly filled circular pipes. For simplicity it looks like a cylinder on its side with a slight angle such that a partial amount of water would be deeper at one end than the other.
Tilt angle must be set in degrees enter 0 if the tank is horizontal.
The online calculator below can be used to calculate the volume and mass of liquid in a partly filled horizontal or sloped cylindrical tank if you know the inside diameter and the level of the liquid the tank. To perform calculation you must provide the tank size angle and liquid level. Namely determining the equation of the area of a triangular slice. Calculates volume of cylindrical tank tilted at an angle.