{
  "version": "v1",
  "source": "https://craftquantities.com",
  "licence": "CC BY 4.0",
  "licenceUrl": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "Craft Quantities — craftquantities.com",
  "documentation": "https://craftquantities.com/api/",
  "versioning": "Fields are added, never removed or repurposed, within a version. A breaking change becomes /api/v2/ and v1 keeps being built.",
  "slug": "horizontal-cylinder-partial-fill-calculator",
  "category": "materials-quantities",
  "title": "Horizontal Cylinder Tank Partial Fill Volume Calculator",
  "description": "How much liquid a horizontal cylindrical tank holds at a dipstick depth, with flat, dished or hemispherical ends, and the ullage left above it.",
  "url": "https://craftquantities.com/calculators/materials-quantities/horizontal-cylinder-partial-fill-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/horizontal-cylinder-partial-fill-calculator.json",
  "inputCount": 4,
  "testCaseCount": 4,
  "sourceCount": 3,
  "lastVerified": "2026-09-15",
  "citation": {
    "author": "Craft Quantities",
    "title": "Horizontal Cylinder Tank Partial Fill Volume Calculator",
    "version": "1.0.0",
    "sourcesChecked": "2026-09-15",
    "url": "https://craftquantities.com/calculators/materials-quantities/horizontal-cylinder-partial-fill-calculator/",
    "accessDate": null,
    "accessDateNote": "Add the date you retrieved this. It is deliberately absent: a static file cannot know when you read it, and the build date would be wrong.",
    "permanentVersionedUrl": null,
    "permanentVersionedUrlNote": "Not offered. This site keeps no archive of previous builds, so any such URL would resolve to the current page or to nothing. The version and sourcesChecked fields identify the calculation instead.",
    "formats": {
      "plain": "Craft Quantities. Horizontal Cylinder Tank Partial Fill Volume Calculator. Version 1.0.0. Sources checked 2026-09-15. https://craftquantities.com/calculators/materials-quantities/horizontal-cylinder-partial-fill-calculator/",
      "apa": "Craft Quantities. (2026). Horizontal Cylinder Tank Partial Fill Volume Calculator (Version 1.0.0) [Web calculator]. Retrieved from https://craftquantities.com/calculators/materials-quantities/horizontal-cylinder-partial-fill-calculator/",
      "harvard": "Craft Quantities (2026) Horizontal Cylinder Tank Partial Fill Volume Calculator (Version 1.0.0). Available at: https://craftquantities.com/calculators/materials-quantities/horizontal-cylinder-partial-fill-calculator/",
      "bibtex": "@misc{craftquantities-calculators-materials-quantities-horizontal-cylinder-partial-fill-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Horizontal Cylinder Tank Partial Fill Volume Calculator},\n  version      = {1.0.0},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/materials-quantities/horizontal-cylinder-partial-fill-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "tankDiameter",
      "label": "Tank diameter",
      "type": "number",
      "dimension": "length",
      "defaultValue": 1.2,
      "min": 0.1,
      "max": 6,
      "step": 0.01,
      "help": "The internal diameter of the cylindrical barrel."
    },
    {
      "id": "tankLength",
      "label": "Barrel length",
      "type": "number",
      "dimension": "length",
      "defaultValue": 2.5,
      "min": 0.1,
      "max": 30,
      "step": 0.05,
      "help": "The straight cylindrical part, not counting the ends."
    },
    {
      "id": "liquidDepth",
      "label": "Liquid depth",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0.4,
      "min": 0,
      "max": 6,
      "step": 0.005,
      "help": "The dipstick reading, measured from the lowest point inside the tank."
    },
    {
      "id": "endType",
      "label": "Tank ends",
      "type": "select",
      "defaultValue": "flat",
      "options": [
        {
          "value": "flat",
          "label": "Flat ends — a plain cylinder"
        },
        {
          "value": "elliptical",
          "label": "Dished ends, 2:1 elliptical — the common pressure-vessel head"
        },
        {
          "value": "hemispherical",
          "label": "Hemispherical ends — two half-spheres"
        }
      ],
      "help": "Flat, dished, or fully hemispherical heads."
    }
  ],
  "sources": [
    {
      "label": "The wetted cross-section of a horizontal cylinder is a circular segment, area r²·acos((r−h)/r) − (r−h)·√(2rh − h²). This is exact geometry rather than an approximation: it returns half the circle at half the diameter and the whole circle at full depth"
    },
    {
      "label": "Two hemispherical heads together form one sphere, and a sphere filled to depth h contains πh²(3r − h)/3. A 2:1 elliptical dished head is half the depth of a hemisphere and contributes half the volume, which is the standard treatment for the common pressure-vessel head"
    },
    {
      "label": "For fuel inventory, custody transfer or any regulated measurement, the governing figure comes from the tank's own calibrated STRAPPING TABLE rather than from geometry — a real tank is never exactly its drawing"
    }
  ],
  "testCases": [
    {
      "name": "a 1.2 m tank, 2.5 m long, flat ends, one third of the way up",
      "inputs": {
        "tankDiameter": 1.2,
        "tankLength": 2.5,
        "liquidDepth": 0.4,
        "endType": "flat"
      },
      "expected": 217.95,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Tank capacity when full",
          "value": 746.9288810748875,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 528.9814528402006,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the diameter",
          "value": 33.333333333333336,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 29.179140579092888,
          "unit": "%"
        },
        {
          "label": "In the cylindrical barrel",
          "value": 217.94742823468695,
          "unit": "gal"
        }
      ],
      "basis": "ambiguous"
    },
    {
      "name": "half depth really is half the volume, by symmetry",
      "inputs": {
        "tankDiameter": 1.2,
        "tankLength": 2.5,
        "liquidDepth": 0.6,
        "endType": "flat"
      },
      "expected": 373.46,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Tank capacity when full",
          "value": 746.9288810748875,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 373.46444053744375,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the diameter",
          "value": 50,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 50,
          "unit": "%"
        },
        {
          "label": "In the cylindrical barrel",
          "value": 373.46444053744375,
          "unit": "gal"
        }
      ],
      "basis": "ambiguous"
    },
    {
      "name": "a tenth of the depth holds about a twentieth of the volume",
      "inputs": {
        "tankDiameter": 1.2,
        "tankLength": 2.5,
        "liquidDepth": 0.12,
        "endType": "flat"
      },
      "expected": 38.87,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Tank capacity when full",
          "value": 746.9288810748875,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 708.0556999494082,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the diameter",
          "value": 10,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 5.204401933091389,
          "unit": "%"
        },
        {
          "label": "In the cylindrical barrel",
          "value": 38.87318112547933,
          "unit": "gal"
        }
      ],
      "basis": "ambiguous"
    },
    {
      "name": "hemispherical ends add a whole sphere of capacity",
      "inputs": {
        "tankDiameter": 1.2,
        "tankLength": 2.5,
        "liquidDepth": 0.6,
        "endType": "hemispherical"
      },
      "expected": 492.97,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Tank capacity when full",
          "value": 985.9461230188515,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 492.97306150942575,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the diameter",
          "value": 50,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 50,
          "unit": "%"
        },
        {
          "label": "In the cylindrical barrel",
          "value": 373.46444053744375,
          "unit": "gal"
        },
        {
          "label": "In the two ends",
          "value": 119.50862097198198,
          "unit": "gal"
        }
      ],
      "basis": "ambiguous"
    }
  ]
}
