A vertical tank half full holds half its capacity. A horizontal one does too — but at a quarter of the way up it holds about a fifth, and that is where people get caught. This gives the volume at any depth, plus a dipstick table.
Notes
Why horizontal tanks are counter-intuitive
The cross-section is a circle, so equal increases in depth do not add equal volumes. Filling the first quarter of the height adds far less than filling the middle quarter.
The formula for a partly full cylinder
The wetted area is the circular segment: r squared times (theta minus sin theta) over two, where theta is twice the arccosine of (r minus depth) over r. Multiply by the length and you have the volume.
Making a dipstick
Print the table and mark the depths on a suitable measuring stick. Use internal dimensions and check against known fill quantities. Keep the tank level; avoid inserting tools into hazardous contents.
What this does not do
It assumes flat ends and a level tank. Dished or hemispherical ends add capacity, and a tank sitting even slightly out of level reads wrong at both extremes.