{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"horizontal-tank-volume"},"result":{"entity_type":"calculator","id":"horizontal-tank-volume","calculator_id":"horizontal-tank-volume","canonical_url":"https://tttkmbb.com/engineering/horizontal-tank-volume","name":"Horizontal Tank Volume Calculator","title":"Horizontal Cylindrical Tank Volume Calculator – Liquid Volume at a Dipstick Level (Flat or Hemispherical Ends)","category":"engineering","category_name":"Engineering & Automotive","tool_name":"calculate_horizontal_tank_volume","featured_mcp_tool":false,"description":"Computes the liquid volume in a horizontal cylindrical tank from its diameter, length and the measured liquid depth, using the circular-segment area for flat ends and adding two spherical-cap segments for hemispherical ends, plus total capacity, fill percentage and remaining ullage.","use_when":"You need to convert a dipstick or sight-glass reading on a horizontal fuel, water, oil or chemical tank into litres or gallons, or want the tank's total capacity.","do_not_use_when":"The tank stands vertically or is rectangular (volume is simply area × depth; use cylinder or rectangular-prism), has dished or elliptical (2:1) heads, or is not level.","inputs":[{"name":"diameter_m","label":"Tank internal diameter","type":"number","unit":"m","required":true,"max":100,"exclusive_min":0,"description":"Internal diameter of the cylindrical shell in metres (1 ft = 0.3048 m, 1 in = 0.0254 m).","example":2},{"name":"length_m","label":"Cylinder length","type":"number","unit":"m","required":true,"max":1000,"exclusive_min":0,"description":"Length of the straight cylindrical section in metres, excluding the end caps.","example":5},{"name":"liquid_level_m","label":"Liquid level","type":"number","unit":"m","required":true,"min":0,"max":100,"description":"Depth of liquid measured vertically from the bottom of the tank, 0 to diameter_m.","example":0.5},{"name":"end_type","label":"End type","type":"enum","required":false,"default":"flat","values":[{"value":"flat","label":"Flat ends (cylinder only)"},{"value":"hemispherical","label":"Hemispherical ends (two half-spheres of the tank radius)","aliases":["hemisphere","spherical"]}],"description":"Shape of the two end caps.","example":"flat"}],"outputs":[{"name":"liquid_volume_m3","label":"Liquid volume","type":"number","unit":"m³","decimals":4,"description":"Volume of liquid at the given level."},{"name":"liquid_volume_liters","label":"Liquid volume","type":"number","unit":"L","decimals":1,"description":"Liquid volume in litres (1 m³ = 1000 L)."},{"name":"liquid_volume_gal_us","label":"Liquid volume","type":"number","unit":"gal (US)","decimals":1,"description":"Liquid volume in US gallons (1 gal = 3.785411784 L)."},{"name":"total_volume_m3","label":"Total capacity","type":"number","unit":"m³","decimals":4,"description":"Volume of the full tank including the end caps."},{"name":"total_volume_liters","label":"Total capacity","type":"number","unit":"L","decimals":1,"description":"Full-tank capacity in litres."},{"name":"total_volume_gal_us","label":"Total capacity","type":"number","unit":"gal (US)","decimals":1,"description":"Full-tank capacity in US gallons."},{"name":"fill_percent","label":"Fill","type":"number","unit":"%","decimals":2,"description":"liquid volume / total volume × 100."},{"name":"empty_volume_liters","label":"Ullage (empty space)","type":"number","unit":"L","decimals":1,"description":"Volume still available: total minus liquid."},{"name":"level_percent","label":"Level","type":"number","unit":"%","decimals":2,"description":"liquid_level_m / diameter_m × 100 (the height fraction, which is not the volume fraction)."}],"input_schema":{"type":"object","properties":{"diameter_m":{"description":"Internal diameter of the cylindrical shell in metres (1 ft = 0.3048 m, 1 in = 0.0254 m). Unit: m.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[2],"x-unit":"m"},"length_m":{"description":"Length of the straight cylindrical section in metres, excluding the end caps. Unit: m.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[5],"x-unit":"m"},"liquid_level_m":{"description":"Depth of liquid measured vertically from the bottom of the tank, 0 to diameter_m. Unit: m.","type":"number","minimum":0,"maximum":100,"examples":[0.5],"x-unit":"m"},"end_type":{"description":"Shape of the two end caps.","type":"string","enum":["flat","hemispherical"],"default":"flat","examples":["flat"]}},"additionalProperties":false,"required":["diameter_m","length_m","liquid_level_m"]},"output_schema":{"type":"object","properties":{"liquid_volume_m3":{"description":"Volume of liquid at the given level. Unit: m³.","type":"number","x-unit":"m³"},"liquid_volume_liters":{"description":"Liquid volume in litres (1 m³ = 1000 L). Unit: L.","type":"number","x-unit":"L"},"liquid_volume_gal_us":{"description":"Liquid volume in US gallons (1 gal = 3.785411784 L). Unit: gal (US).","type":"number","x-unit":"gal (US)"},"total_volume_m3":{"description":"Volume of the full tank including the end caps. Unit: m³.","type":"number","x-unit":"m³"},"total_volume_liters":{"description":"Full-tank capacity in litres. Unit: L.","type":"number","x-unit":"L"},"total_volume_gal_us":{"description":"Full-tank capacity in US gallons. Unit: gal (US).","type":"number","x-unit":"gal (US)"},"fill_percent":{"description":"liquid volume / total volume × 100. Unit: %.","type":"number","x-unit":"%"},"empty_volume_liters":{"description":"Volume still available: total minus liquid. Unit: L.","type":"number","x-unit":"L"},"level_percent":{"description":"liquid_level_m / diameter_m × 100 (the height fraction, which is not the volume fraction). Unit: %.","type":"number","x-unit":"%"}}},"formula":"r = diameter_m / 2, h = liquid_level_m; segment area A = r² · acos((r − h) / r) − (r − h) · √(2·r·h − h²); cylinder liquid volume = A × length_m; hemispherical ends add π·h²·(3·r − h)/3 (a spherical cap of height h; the two half-spheres together form one sphere); total = π·r²·length_m (+ 4/3·π·r³ for hemispherical ends); fill_percent = liquid / total × 100","method":"Exact geometry for a level tank with a true cylindrical shell; wall thickness, internal fittings and dished (torispherical or 2:1 elliptical) heads are not modelled, so hemispherical is an upper bound for domed heads. Volumes are geometric and do not account for thermal expansion of the liquid.","sources":[{"name":"Wikipedia – Circular segment","url":"https://en.wikipedia.org/wiki/Circular_segment","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Spherical cap","url":"https://en.wikipedia.org/wiki/Spherical_cap","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"2 m diameter, 5 m long, 0.5 m of liquid, flat ends","inputs":{"diameter_m":2,"length_m":5,"liquid_level_m":0.5,"end_type":"flat"},"expected":{"liquid_volume_m3":3.0709,"liquid_volume_liters":3070.9,"liquid_volume_gal_us":811.3,"total_volume_m3":15.708,"total_volume_liters":15708,"fill_percent":19.55,"empty_volume_liters":12637,"level_percent":25},"url":"https://tttkmbb.com/api/v1/calculate/horizontal-tank-volume?diameter_m=2&length_m=5&liquid_level_m=0.5&end_type=flat"},{"name":"3 m diameter, 6 m shell, 2 m of liquid, hemispherical ends","inputs":{"diameter_m":3,"length_m":6,"liquid_level_m":2,"end_type":"hemispherical"},"expected":{"liquid_volume_m3":40.5082,"liquid_volume_liters":40508.2,"total_volume_m3":56.5487,"fill_percent":71.63,"level_percent":66.67},"url":"https://tttkmbb.com/api/v1/calculate/horizontal-tank-volume?diameter_m=3&length_m=6&liquid_level_m=2&end_type=hemispherical"}],"faq":[{"q":"Why is a half-full dipstick reading not 25 % of the volume at a quarter of the diameter?","a":"The cross-section is a circle, so the volume per centimetre of depth is smallest near the bottom and top and largest at the centre; at 25 % of the diameter a flat-ended tank holds only about 19.6 % of its volume."},{"q":"Does length_m include the end caps?","a":"No. Enter the straight shell length; hemispherical heads add their own volume automatically (each head extends by the tank radius)."},{"q":"My tank has dished (torispherical) heads.","a":"Dished heads hold less than hemispherical ones (roughly 8–10 % of the cylinder volume per pair of 2:1 elliptical heads on a tank with L = 2D). Use flat and hemispherical as lower and upper bounds, or the manufacturer's strapping chart."}],"tags":["horizontal tank volume","tank dipstick chart","cylindrical tank volume","fuel tank level","tank strapping","circular segment"],"related":[{"calculator_id":"cylinder","reason":"Volume and surface area of a full cylinder."},{"calculator_id":"circle-sector","reason":"Area of the circular sector and segment used here."},{"calculator_id":"pipe-flow","reason":"Flow and pressure drop in the pipe filling or draining the tank."}],"links":{"html":"https://tttkmbb.com/engineering/horizontal-tank-volume","markdown":"https://tttkmbb.com/engineering/horizontal-tank-volume.md","json":"https://tttkmbb.com/engineering/horizontal-tank-volume.json","api":"https://tttkmbb.com/api/v1/calculate/horizontal-tank-volume","schema":"https://tttkmbb.com/api/v1/calculators/horizontal-tank-volume","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T03:46:42Z","next_actions":[{"tool":"run_calculator","calculator_id":"horizontal-tank-volume","reason":"Run Horizontal Tank Volume Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/engineering/horizontal-tank-volume.md"}}