{
  "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": "sphere-capsule-tank-volume-calculator",
  "category": "materials-quantities",
  "title": "Sphere and Capsule Tank Volume Calculator",
  "description": "Contents of a spherical or vertical capsule tank at a measured depth, and why a dipstick only tells the truth through the straight middle.",
  "url": "https://craftquantities.com/calculators/materials-quantities/sphere-capsule-tank-volume-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/sphere-capsule-tank-volume-calculator.json",
  "inputCount": 4,
  "testCaseCount": 4,
  "sourceCount": 3,
  "lastVerified": "2026-09-15",
  "citation": {
    "author": "Craft Quantities",
    "title": "Sphere and Capsule Tank Volume Calculator",
    "version": "1.0.0",
    "sourcesChecked": "2026-09-15",
    "url": "https://craftquantities.com/calculators/materials-quantities/sphere-capsule-tank-volume-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. Sphere and Capsule Tank Volume Calculator. Version 1.0.0. Sources checked 2026-09-15. https://craftquantities.com/calculators/materials-quantities/sphere-capsule-tank-volume-calculator/",
      "apa": "Craft Quantities. (2026). Sphere and Capsule Tank Volume Calculator (Version 1.0.0) [Web calculator]. Retrieved from https://craftquantities.com/calculators/materials-quantities/sphere-capsule-tank-volume-calculator/",
      "harvard": "Craft Quantities (2026) Sphere and Capsule Tank Volume Calculator (Version 1.0.0). Available at: https://craftquantities.com/calculators/materials-quantities/sphere-capsule-tank-volume-calculator/",
      "bibtex": "@misc{craftquantities-calculators-materials-quantities-sphere-capsule-tank-volume-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Sphere and Capsule Tank Volume Calculator},\n  version      = {1.0.0},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/materials-quantities/sphere-capsule-tank-volume-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "tankDiameter",
      "label": "Tank diameter",
      "type": "number",
      "dimension": "length",
      "defaultValue": 1.6,
      "min": 0.1,
      "max": 30,
      "step": 0.01,
      "help": "The internal diameter at the widest point."
    },
    {
      "id": "tankShape",
      "label": "Tank shape",
      "type": "select",
      "defaultValue": "capsule",
      "options": [
        {
          "value": "capsule",
          "label": "Vertical capsule — a straight barrel with hemispherical heads"
        },
        {
          "value": "sphere",
          "label": "Sphere — an LPG ball or a spherical process vessel"
        }
      ],
      "help": "A plain sphere, or a straight barrel capped at both ends."
    },
    {
      "id": "barrelLength",
      "label": "Straight barrel length",
      "type": "number",
      "dimension": "length",
      "defaultValue": 2,
      "min": 0,
      "max": 40,
      "step": 0.05,
      "help": "The straight cylindrical section between the two heads."
    },
    {
      "id": "liquidDepth",
      "label": "Liquid depth",
      "type": "number",
      "dimension": "length",
      "defaultValue": 1.2,
      "min": 0,
      "max": 40,
      "step": 0.005,
      "help": "Measured from the lowest point inside the tank."
    }
  ],
  "sources": [
    {
      "label": "A sphere of radius r filled to depth h contains πh²(3r − h)/3 — the standard spherical cap, which returns a hemisphere at h = r and a whole sphere at h = 2r. Both boundaries are checked rather than assumed"
    },
    {
      "label": "Above the equator the filled region is a spherical zone, πt(r² − t²/3) for a height t above the widest point, which returns the upper hemisphere exactly at t = r. A vertical capsule is that pair of heads with a straight cylinder between them, so one expression family covers both shapes and a sphere is simply a capsule with no barrel"
    },
    {
      "label": "For fuel inventory, custody transfer or any regulated measurement, the governing figure is the vessel's own calibrated strapping table. A pressure vessel's heads are frequently torispherical rather than hemispherical, which holds less"
    }
  ],
  "testCases": [
    {
      "name": "a 1.6 m capsule with a 2 m barrel, filled to 1.2 m",
      "inputs": {
        "tankDiameter": 1.6,
        "tankShape": "capsule",
        "barrelLength": 2,
        "liquidDepth": 1.2
      },
      "expected": 495.74,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Capacity when full",
          "value": 1628.858241395903,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 1133.1187766232367,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the height",
          "value": 33.33333333333333,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 30.434782608695656,
          "unit": "%"
        },
        {
          "label": "Height of the band a dipstick reads honestly",
          "value": 55.55555555555556,
          "unit": "%"
        }
      ],
      "basis": "ambiguous"
    },
    {
      "name": "half a sphere is exactly a hemisphere",
      "inputs": {
        "tankDiameter": 1.6,
        "tankShape": "sphere",
        "barrelLength": 2,
        "liquidDepth": 0.8
      },
      "expected": 283.28,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Capacity when full",
          "value": 566.5593883116185,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 283.2796941558092,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the height",
          "value": 50,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 50.000000000000014,
          "unit": "%"
        }
      ],
      "basis": "ambiguous"
    },
    {
      "name": "a tenth of a sphere's diameter holds under three per cent of it",
      "inputs": {
        "tankDiameter": 1.6,
        "tankShape": "sphere",
        "barrelLength": 2,
        "liquidDepth": 0.16
      },
      "expected": 15.86,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Capacity when full",
          "value": 566.5593883116185,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 550.6957254388932,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the height",
          "value": 10,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 2.8000000000000003,
          "unit": "%"
        }
      ],
      "basis": "ambiguous"
    },
    {
      "name": "a full capsule is its sphere plus its barrel",
      "inputs": {
        "tankDiameter": 1.6,
        "tankShape": "capsule",
        "barrelLength": 2,
        "liquidDepth": 3.6
      },
      "expected": 1628.86,
      "toleranceDecimalPlaces": 0,
      "unit": "gal",
      "confidence": "high",
      "steps": [
        {
          "label": "Capacity when full",
          "value": 1628.858241395903,
          "unit": "gal"
        },
        {
          "label": "Ullage — the empty space above",
          "value": 0,
          "unit": "gal"
        },
        {
          "label": "Depth as a proportion of the height",
          "value": 100,
          "unit": "%"
        },
        {
          "label": "Volume as a proportion of capacity",
          "value": 100,
          "unit": "%"
        },
        {
          "label": "Height of the band a dipstick reads honestly",
          "value": 55.55555555555556,
          "unit": "%"
        }
      ],
      "basis": "ambiguous"
    }
  ]
}
