Horizontal tank with hemispherical ends depth to capacity calculation I am trying to find an accurate way of calculating the capacity of an underground tank at a given depth.  The tank manufacturer has provided a strapping table for the tank which tells me the capacity at various depths.
Gauge Depth (cm)  /  Capacity (Liters)
2cm = 29.8 liters
12cm = 240.4 liters
...
66cm = 2372.8 liters
118cm = 4008.4 liters

However, I would like to find an equation for calculating the volume of liquid in the tank based on the liquid depth level.
They have provided the following dimensions for the tank:
1219mm Diameter
3785mm Long
3978 Liters Capacity

The tank is horizontal with hemispherical ends.  It is safe to assume that the radius of the hemispherical ends is 1/2 of the diameter of the tank.
Any help or direction would be greatly appreciated!

You can divide the tank into a sphere (formed from the two  hemispherical ends) and a cylinder.  Wikipedia Spherical cap gives the volume as $\frac{\pi h^2}{3}(3r-h)$ where $r$ is the radius of the sphere and $h$ the depth.  Then Circular Segment gives the area of the segment as $\frac{r^2}{2}(\theta - \sin \theta )$ where $\theta=\arccos(\frac{r-h}{r})$.  Multiply this last by the length, add the spherical cap, and there you are.
