Enter the radius and the height of the cylinder part of the capsule. You get the volume (V = πr²h + 4/3πr³), its breakdown into the cylinder part and the sphere part, and the volume in cm³, L and m³.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formulas and figures
-
The idea behind the volume of a capsule (split into a cylinder and a sphere, then add)
-
Volume of the cylinder part (basic formula 1)
-
Volume of the sphere made by the two ends (basic formula 2)
-
Volume of a capsule in one formula
-
Converting volume units (in³ → gallons)
-
Converting volume units (in³ → ft³)
-
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter the radius and the height of the cylinder part, and you get the volume of a capsule (a cylinder with a hemisphere on each end) on the spot (\(V = \pi r^2 h + \dfrac{4}{3}\pi r^3\))
- It also shows the volume of the cylinder part and of the sphere made by the two hemisphere ends separately, so you can see how the calculation works
- The result is also shown as a 3D shape that you can turn with your mouse or by swiping
- Volume unit conversions are shown too: gallons and ft³ when you enter inches, and gallons when you enter feet. Switch "Units" to Metric to get liters and m³ instead
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
A medicine capsule is the classic example of this shape. Treat a capsule with a radius of 0.16 in and a cylinder height of 0.55 in as this shape, and it holds \(\pi \times 0.16^2 \times 0.55 + \dfrac{4}{3}\pi \times 0.16^3 \approx 0.061\,\mathrm{in^3}\), or about 1 mL.
A real capsule is made of two overlapping parts (the cap and the body), so this is only an estimate. Still, this formula is the basis for estimating how much medicine a capsule of a given size can hold.
Pressure tanks for propane and other gases are often capsules lying on their side, a cylinder with rounded ends. A shape with corners concentrates pressure at the corners and breaks more easily, while a rounded shape spreads the pressure evenly.
A typical 500-gallon home propane tank is about 37.5 in across and 120 in long. With a radius of 18.75 in, the cylinder part is \(120 - 37.5 = 82.5\) in, so the capacity is \(\pi \times 18.75^2 \times 82.5 + \dfrac{4}{3}\pi \times 18.75^3 \approx 118{,}730\,\mathrm{in^3}\), about 514 gallons. Finding how much a tank holds from its dimensions is a job for this formula in both design and inspection.
The tank of a truck that carries fuel is also close to a capsule: a cylinder with rounded end caps (called heads). Treat the heads as hemispheres, with a radius of 3.75 ft and a cylinder part of 22 ft, and you get \(\pi \times 3.75^2 \times 22 + \dfrac{4}{3}\pi \times 3.75^3 \approx 1{,}193\,\mathrm{ft^3}\), or about 8,900 gallons (× 7.48).
Real heads are usually shallower than a hemisphere, so the exact capacity depends on the drawings. Still, this is a good estimate in the same range as a large fuel tank truck (around 9,000 gallons).
Stick-shaped foods with rounded ends, such as hot dogs, can be treated as capsules. For a hot dog 0.9 in across (radius 0.45 in) and 6 in long, the cylinder part is \(6 - 0.9 = 5.1\) in, and the volume is \(\pi \times 0.45^2 \times 5.1 + \dfrac{4}{3}\pi \times 0.45^3 \approx 3.6\,\mathrm{in^3}\) (about 59 mL).
Many foods have a density close to that of water (1 in³ of water weighs about 0.58 oz), so it weighs about 2.1 oz. That matches a real pack of 8 hot dogs per pound, which is 2 oz each. Estimating weight or calories from volume works both in food development and at home.
Formulas and figures
Symbols and terms
Symbols
| \(V\) | vee | A common symbol for volume, from the first letter of "volume". On this page it is the volume of the whole capsule. |
| \(V_1\), \(V_2\) | V sub one, V sub two | When there are several quantities of the same kind (here, volumes), a small number at the lower right (a subscript) tells them apart. On this page, \(V_1\) is the volume of the cylinder part and \(V_2\) is the volume of the sphere made by the two hemisphere ends. |
| \(r\) | ar | The radius (the length from the center of a circle to its edge), from the first letter of "radius". In a capsule, the radius of the cylinder's cross section and the radius of the hemisphere ends are the same \(r\). It is half the diameter. |
| \(h\) | aitch | The height of the cylinder part (the length of the straight body, not including the hemisphere ends), from the first letter of "height". The total length of the capsule is \(h + 2r\). |
| \(\pi\) | pi | The Greek letter for the circumference ÷ diameter of a circle. It is \(3.14159\ldots\) and never ends. The 3.14 used in simple calculations is an approximation of it. |
| \(r^2\), \(r^3\) | r squared, r cubed | The small number at the upper right (the exponent) tells how many times the number is used as a factor: \(r^2 = r \times r\) and \(r^3 = r \times r \times r\). The cylinder part uses the square, and the sphere part uses the cube. |
| \(\dfrac{4}{3}\) | four thirds | The fixed coefficient (a constant) that always appears in the sphere formula. It is about 1.33, and it says that the volume of a sphere is \(\dfrac{4}{3}\) times "\(\pi\) times the radius cubed, \(r^3\)". |
| \(\mathrm{in^3}\) | cubic inch | A unit of volume. A cube 1 in on each side has a volume of 1 in³ (1 in³ ≈ 16.4 mL). |
| \(\mathrm{ft^3}\) | cubic foot | A unit of volume. A cube 1 ft on each side has a volume of 1 ft³. \(1\,\mathrm{ft^3} = 1728\,\mathrm{in^3} \approx 7.48\,\mathrm{gal}\). |
| \(\mathrm{gal}\) | gallon | A unit of volume (capacity), familiar from milk jugs and gas pumps. One US gallon is exactly \(231\,\mathrm{in^3}\), or \(128\,\mathrm{fl\ oz}\). |
Terms
| capsule | A solid made of a cylinder with a hemisphere on each end. You see this shape in medicine capsules and gas storage tanks. In video games and computer graphics, "capsule" shapes are also common, for example for collision detection. |
| hemisphere | A sphere cut exactly in half by a plane through its center. It is the rounded part on each end of a capsule. Two hemispheres together make one sphere. |
| cylinder | A straight solid with a circular base; slice it anywhere across and you get a circle of the same size. It is the body in the middle of a capsule. |
| sphere | A solid like a ball, made of all the points at the same distance from the center. Its volume is \(\dfrac{4}{3}\pi r^3\). |
| volume | The amount of space a solid takes up, given as a number. It is measured by how many unit cubes (such as 1 in³ cubes) would fill it. |
| pi | The number that tells how many times the circumference of a circle is its diameter. It is the same for a circle of any size and is written with the symbol \(\pi\) (about 3.14). |
| unit conversion | Writing the same amount in a different unit. For volume, the key is that the conversion factor is the cube of the length factor (1 ft = 12 in, so 1 ft³ = 1728 in³). |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
| Area of a circle (Grade 7) |
|
| What volume is and its units (Grade 5) |
|
| Volume of prisms and cylinders (Grade 8) |
|
| Volume of a sphere (Grade 8) |
|
| Pi and expressions with letters (Grades 6–7) |
|
| What exponents stand for (Grade 6) |
|
How to calculate it in Excel
| Cylinder part V1 (in³) | 113.1 |
| Sphere from the two ends V2 (in³) | 113.1 |
| Capsule volume (in³) | =B1+B2 |
| Radius r (in) | 3 |
| Cylinder height h (in) | 4 |
| Cylinder part, πr²h (in³) | =PI()*B1^2*B2 |
| Radius r (in) | 3 |
| Sphere, 4/3πr³ (in³) | =4/3*PI()*B1^3 |
| Radius r (in) | 3 |
| Cylinder height h (in) | 4 |
| Capsule volume (in³) | =PI()*B1^2*B2+4/3*PI()*B1^3 |
| Volume in in³ | 226.19 |
| Volume in US gallons | =B1/231 |
| Volume in in³ | 57750 |
| Volume in ft³ | =B1/1728 |
In a formula, "PI()" is the Excel function that returns π (3.14159…), "B1" and "B2" tell the formula to use the number in that cell, "*" is multiplication, "/" is division and "^" raises to a power (how many times to multiply).
In the second table, for example, B3 shows about 113.097 (in in³, because the inputs are in inches). The third table shows about 113.097 in B2, and the fourth table shows about 226.195 in B3, which is almost the same as "cylinder part + sphere part" in B3 of the first table (226.2, because it adds values rounded to 113.1). The fifth table shows about 0.979 in B2, and the sixth table shows about 33.42 in B2. Just replace the input numbers with the size of your own capsule.
How to calculate it in Google Sheets
| Cylinder part V1 (in³) | 113.1 |
| Sphere from the two ends V2 (in³) | 113.1 |
| Capsule volume (in³) | =B1+B2 |
| Radius r (in) | 3 |
| Cylinder height h (in) | 4 |
| Cylinder part, πr²h (in³) | =PI()*B1^2*B2 |
| Radius r (in) | 3 |
| Sphere, 4/3πr³ (in³) | =4/3*PI()*B1^3 |
| Radius r (in) | 3 |
| Cylinder height h (in) | 4 |
| Capsule volume (in³) | =PI()*B1^2*B2+4/3*PI()*B1^3 |
| Volume in in³ | 226.19 |
| Volume in US gallons | =B1/231 |
| Volume in in³ | 57750 |
| Volume in ft³ | =B1/1728 |
How to calculate it in Python
import math
radius = 3 # radius (inches in this example)
height = 4 # height of the cylinder part (not including the hemisphere ends; same unit as the radius)
cylinder_volume = math.pi * radius ** 2 * height # volume of the cylinder part (pi r^2 h; in3 in this example)
sphere_volume = 4 / 3 * math.pi * radius ** 3 # volume of the sphere made by the two hemisphere ends (4/3 pi r^3)
volume = cylinder_volume + sphere_volume # capsule volume (cube of the input unit)
volume_gal = volume / 231 # volume in US gallons, if you entered inches (1 gal = 231 in3)
print(f"Cylinder part: {cylinder_volume} in3")
print(f"Sphere from the two ends: {sphere_volume} in3")
print(f"Capsule volume: {volume} in3")
print(f"In gallons: {volume_gal} gal")
How to write it in LaTeX and other math languages (copy and paste)
V = V₁ + V₂
V = V_{1} + V_{2}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>V</mi>
<mo>=</mo>
<msub><mi>V</mi><mn>1</mn></msub>
<mo>+</mo>
<msub><mi>V</mi><mn>2</mn></msub>
</mrow>
</math>
V = V_1 + V_2
v1 + v2
V := V1 + V2;
V = V1 + V2;
V = V_1 + V_2
V₁ = π × r² × h
V_{1} = \pi r^{2} h
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>V</mi><mn>1</mn></msub>
<mo>=</mo>
<mi>π</mi>
<mo>⁢</mo>
<msup><mi>r</mi><mn>2</mn></msup>
<mo>⁢</mo>
<mi>h</mi>
</mrow>
</math>
V_1 = pi r^2 h
Pi*r^2*h
V1 := Pi*r^2*h;
V1 = pi*r^2*h;
V_1 = πr^2 h
V₂ = 4/3 × π × r³
V_{2} = \dfrac{4}{3}\pi r^{3}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>V</mi><mn>2</mn></msub>
<mo>=</mo>
<mfrac><mn>4</mn><mn>3</mn></mfrac>
<mo>⁢</mo>
<mi>π</mi>
<mo>⁢</mo>
<msup><mi>r</mi><mn>3</mn></msup>
</mrow>
</math>
V_2 = 4/3 pi r^3
4/3*Pi*r^3
V2 := (4/3)*Pi*r^3;
V2 = 4/3*pi*r^3;
V_2 = (4/3)πr^3
V = π × r² × h + 4/3 × π × r³
V = \pi r^{2} h + \dfrac{4}{3}\pi r^{3}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>V</mi>
<mo>=</mo>
<mi>π</mi>
<mo>⁢</mo>
<msup><mi>r</mi><mn>2</mn></msup>
<mo>⁢</mo>
<mi>h</mi>
<mo>+</mo>
<mfrac><mn>4</mn><mn>3</mn></mfrac>
<mo>⁢</mo>
<mi>π</mi>
<mo>⁢</mo>
<msup><mi>r</mi><mn>3</mn></msup>
</mrow>
</math>
V = pi r^2 h + 4/3 pi r^3
Pi*r^2*h + 4/3*Pi*r^3
V := Pi*r^2*h + (4/3)*Pi*r^3;
V = pi*r^2*h + 4/3*pi*r^3;
V = πr^2 h + (4/3)πr^3
V[gal] = V[in³] ÷ 231
V_{\mathrm{gal}} = V_{\mathrm{in^3}} \div 231
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>V</mi><mi>gal</mi></msub>
<mo>=</mo>
<msub><mi>V</mi><mrow><msup><mi mathvariant="normal">in</mi><mn>3</mn></msup></mrow></msub>
<mo>÷</mo>
<mn>231</mn>
</mrow>
</math>
V_(gal) = V_(in^3) -: 231
vIn3/231
vGal := vIn3/231;
v_gal = v_in3/231;
V(gal) = V(in³)/231
V[ft³] = V[in³] ÷ 1728
V_{\mathrm{ft^3}} = V_{\mathrm{in^3}} \div 1728
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>V</mi><mrow><msup><mi mathvariant="normal">ft</mi><mn>3</mn></msup></mrow></msub>
<mo>=</mo>
<msub><mi>V</mi><mrow><msup><mi mathvariant="normal">in</mi><mn>3</mn></msup></mrow></msub>
<mo>÷</mo>
<mn>1728</mn>
</mrow>
</math>
V_(ft^3) = V_(in^3) -: 1728
vIn3/1728
vFt3 := vIn3/1728;
v_ft3 = v_in3/1728;
V(ft³) = V(in³)/1728
How to have ChatGPT do the calculation
You are a math calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). A capsule (a cylinder with a hemisphere on each end) has a radius of 3 in and a cylinder part 4 in high. Find each of the following: 1. The volume of the cylinder part in in³ 2. The volume of the sphere made by the two hemisphere ends in in³ 3. The volume of the whole capsule in in³ 4. That volume in US gallons (1 gal = 231 in³) Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
