Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Capsule Volume Calculator (V = πr²h + 4/3πr³)

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³.

Enter the radius and the height in the same unit, as numbers only (no units. For example, for 3 cm enter "3"). The "height" does not include the hemisphere ends. If you only know the total length of the capsule, enter the total length minus twice the radius as the height.
Result and figure
Enter the radius and the height of the cylinder part in the fields on the left and press "Calculate". The result will appear here.

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
Enter the radius and the height in the same unit (both in inches, or both in feet). The "height" is the length of the cylinder part only, not including the hemisphere ends. Plain cylinders and spheres have their own pages.

What is this calculation used for?

Estimating how much a medicine capsule holds (pharmaceuticals and medicine)

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.

Capacity of a propane storage tank (energy and infrastructure)

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.

Estimating the load of a tank truck (logistics)

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).

Estimating the amount of stick-shaped foods such as hot dogs (food)

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

The idea behind the volume of a capsule (split into a cylinder and a sphere, then add)
Figure
Standard notation (the usual math form)
\(V\) \(=\) \(V_1\) \(+\) \(V_2\)
In words (symbols replaced with words)
③ \(V\): volume of the capsule \(=\) ① \(V_1\): volume of the cylinder part \(+\) ② \(V_2\): volume of the two hemispheres
The formula in words
① Add the \(V_1\): volume of the cylinder part
② and the \(V_2\): volume of the two hemispheres (= one whole sphere made by the two ends)
③ and you get the \(V\): volume of the capsule
Quick example
For a capsule with a radius of 3 in and a cylinder height of 4 in (worked out with basic formulas 1 and 2 below)
\(V\): volume of the capsule \(=\) cylinder part (36π in³) \(+\) sphere (36π in³)
\(36\pi + 36\pi = 72\pi \approx 226.19\,\mathrm{in^3}\)
Key idea
A capsule is a cylinder with a hemisphere (half of a sphere) on each end. The two hemispheres together make exactly one whole sphere, so the volume is just "one cylinder + one sphere". Split a solid that looks complicated into shapes you already know (a cylinder and a sphere) and add them up. This is the most important idea on this page.
Volume of the cylinder part (basic formula 1)
Figure
Standard notation (the usual math form)
\(V_1\) \(=\) \(\pi\) \(\times\) \(r\) \(2\) \(\times\) \(h\)
In words (symbols replaced with words)
⑤ \(V_1\): volume of the cylinder part \(=\) ① \(\pi\): pi \(\times\) ② \(r\): radius ③ squared (the number times itself) \(\times\) ④ \(h\): height of the cylinder part
The formula in words
① Take \(\pi\): pi
② multiply it by the \(r\): radius
③ squared (the number times itself) to get the area of the circular cross section
④ then multiply by the \(h\): height of the cylinder part
⑤ and you get the \(V_1\): volume of the cylinder part
Quick example
For a capsule with a radius of 3 in and a cylinder height of 4 in, the volume of the cylinder part is
\(V_1\): volume of the cylinder part \(=\) \(\pi\): pi \(\times\) radius (3 in) squared \(\times\) cylinder height (4 in)
\(\pi \times 3^{2} \times 4 = 36\pi \approx 113.1\,\mathrm{in^3}\)
Key idea
The volume of a cylinder is "base area × height". The cross section of a capsule is a circle, so the base area is the area of a circle, \(\pi r^2\) (π × radius squared). Note that the height \(h\) here is the length of the straight body only, not including the hemisphere ends. The Volume of a Cylinder Calculator page explains the cylinder formula in more detail.
Volume of the sphere made by the two ends (basic formula 2)
Figure
Standard notation (the usual math form)
\(V_2\) \(=\) \(\dfrac{4}{3}\) \(\times\) \(\pi\) \(\times\) \(r\) \(3\)
In words (symbols replaced with words)
⑤ \(V_2\): volume of the sphere \(=\) ① \(\dfrac{4}{3}\): constant \(\times\) ② \(\pi\): pi \(\times\) ③ \(r\): radius ④ cubed (the number used as a factor 3 times)
The formula in words
① Take the \(\dfrac{4}{3}\): constant
② multiply it by \(\pi\): pi
③ and by the \(r\): radius
④ cubed (the number used as a factor 3 times)
⑤ and you get the \(V_2\): volume of the sphere
Quick example
For a capsule with a radius of 3 in, the volume of the sphere made by the two hemisphere ends is
\(V_2\): volume of the sphere \(=\) \(\dfrac{4}{3}\): constant \(\times\) \(\pi\): pi \(\times\) radius (3 in) cubed
\(\dfrac{4}{3} \times \pi \times 3^{3} = \dfrac{4}{3} \times \pi \times 27\)
\(= 36\pi \approx 113.1\,\mathrm{in^3}\)
Key idea
The radius of the hemisphere ends is the same as the radius \(r\) of the cylinder part. Two hemispheres make one sphere, so instead of working out "hemisphere volume × 2", you can use the sphere formula \(\dfrac{4}{3}\pi r^3\) just once. \(\dfrac{4}{3}\) is the fixed coefficient (a constant) that always appears in the sphere formula. The Volume of a Sphere Calculator page explains the sphere formula in more detail.
Volume of a capsule in one formula
Figure
Standard notation (the usual math form)
\(V\) \(=\) \(\pi\) \(\times\) \(r\) \(2\) \(\times\) \(h\) \(+\) \(\dfrac{4}{3}\) \(\times\) \(\pi\) \(\times\) \(r\) \(3\)
In words (symbols replaced with words)
⑨ \(V\): volume of the capsule \(=\) ① \(\pi\): pi \(\times\) ② \(r\): radius ③ squared \(\times\) ④ \(h\): height of the cylinder part \(+\) ⑤ \(\dfrac{4}{3}\): constant \(\times\) ⑥ \(\pi\): pi \(\times\) ⑦ \(r\): radius ⑧ cubed
The formula in words
① Take \(\pi\): pi
② multiply it by the \(r\): radius
③ squared
④ and by the \(h\): height of the cylinder part to get the volume of the cylinder part.
⑤ Next, take the \(\dfrac{4}{3}\): constant
⑥ multiply it by \(\pi\): pi
⑦ and by the \(r\): radius
⑧ cubed to get the volume of the sphere made by the two hemisphere ends.
⑨ Add these two and you get the \(V\): volume of the capsule
Quick example
Working out the volume of a capsule with a radius of 3 in and a cylinder height of 4 in all at once gives
\(V\): volume of the capsule \(=\) \(\pi\): pi \(\times\) radius (3 in) squared \(\times\) cylinder height (4 in) \(+\) \(\dfrac{4}{3}\): constant \(\times\) \(\pi\): pi \(\times\) radius (3 in) cubed
\(\pi \times 3^{2} \times 4 = 36\pi\)
\(\dfrac{4}{3} \times \pi \times 3^{3} = 36\pi\)
\(36\pi + 36\pi = 72\pi \approx 226.19\,\mathrm{in^3}\)
Key idea
This formula is the first one, "cylinder + sphere", with basic formula 1 (the cylinder part) and basic formula 2 (the sphere) put in. The first half (\(\pi r^2 h\)) is the cylinder part, and the second half (\(\dfrac{4}{3}\pi r^3\)) is the sphere made by the two hemisphere ends. The exponents are easy to mix up. The radius is squared in the cylinder part and cubed in the sphere part, and the height \(h\) is multiplied only once. This calculator also shows the breakdown (cylinder part and sphere part), so you can check the values along the way.
Converting volume units (in³ → gallons)
Standard notation (the usual math form)
\(V_{\mathrm{gal}}\) \(=\) \(V_{\mathrm{in^3}}\) \(\div\) \(231\)
In words (symbols replaced with words)
③ \(V_{\mathrm{gal}}\): volume in gallons \(=\) ① \(V_{\mathrm{in^3}}\): volume in in³ \(\div\) ② \(231\): cubic inches in 1 gallon
The formula in words
① Take the \(V_{\mathrm{in^3}}\): volume in in³
② divide it by \(231\): cubic inches in 1 gallon
③ and you get the \(V_{\mathrm{gal}}\): volume in gallons
Quick example
The volume of the capsule with a radius of 3 in and a cylinder height of 4 in, about 226.19 in³, in gallons is
volume in gallons \(=\) volume in in³ (226.19) \(\div\) cubic inches in 1 gallon (231)
\(226.19 \div 231 \approx 0.979\,\mathrm{gal}\)
Key idea
One US gallon (a gallon jug of milk) is defined as exactly \(231\,\mathrm{in^3}\), so divide cubic inches by 231 to get gallons. The capsule above holds just under 1 gallon. For smaller amounts, use fluid ounces: \(1\,\mathrm{gal} = 128\,\mathrm{fl\ oz}\), so \(1\,\mathrm{fl\ oz} \approx 1.80\,\mathrm{in^3}\). The capsule above is about \(0.979 \times 128 \approx 125\,\mathrm{fl\ oz}\).
Converting volume units (in³ → ft³)
Standard notation (the usual math form)
\(V_{\mathrm{ft^3}}\) \(=\) \(V_{\mathrm{in^3}}\) \(\div\) \(1728\)
In words (symbols replaced with words)
③ \(V_{\mathrm{ft^3}}\): volume in ft³ \(=\) ① \(V_{\mathrm{in^3}}\): volume in in³ \(\div\) ② \(1728\): cubic inches in 1 ft³
The formula in words
① Take the \(V_{\mathrm{in^3}}\): volume in in³
② divide it by \(1728\): cubic inches in 1 ft³
③ and you get the \(V_{\mathrm{ft^3}}\): volume in ft³
Quick example
A capsule-shaped storage tank that holds 250 gallons has a volume of 57,750 in³. In cubic feet, that is
volume in ft³ \(=\) volume in in³ (57,750) \(\div\) cubic inches in 1 ft³ (1728)
\(57750 \div 1728 \approx 33.4\,\mathrm{ft^3}\)
Key idea
The conversion factor for volume is the cube of the factor for length. Since \(1\,\mathrm{ft} = 12\,\mathrm{in}\), \(1\,\mathrm{ft^3}\) is \(12 \times 12 \times 12 = 1728\,\mathrm{in^3}\). It is not 12 times or 144 times but 1728 times, which is easy to get wrong. To go back from ft³ to in³, multiply by 1728. The link with gallons is \(1\,\mathrm{ft^3} = 1728 \div 231 \approx 7.48\,\mathrm{gal}\).
The volume of a capsule is "cylinder part (πr²h) + the sphere made by the two hemisphere ends (4/3πr³)". Do not include the hemispheres in the height h, and do not mix up squared and cubed. The answer is in the cube of the unit you entered (in³ for inches).

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)
  • Knowing that the area of a circle is radius × radius × π
  • Being able to tell the radius from the diameter, and to find the radius as diameter ÷ 2
What volume is and its units (Grade 5)
  • Knowing that volume can be measured by how many unit cubes (such as 1 in³ cubes) fill a solid
  • Being able to read and write the units in³, ft³ and gallons, and knowing that \(1\,\mathrm{gal} = 231\,\mathrm{in^3}\) and \(1\,\mathrm{ft^3} = 1728\,\mathrm{in^3}\)
Volume of prisms and cylinders (Grade 8)
  • Knowing that the volume of a prism or a cylinder is base area × height
Volume of a sphere (Grade 8)
  • Knowing that the volume of a sphere is \(\dfrac{4}{3}\pi r^3\) (4/3 × π × radius cubed)
  • Knowing that a hemisphere has half the volume of the sphere
Pi and expressions with letters (Grades 6–7)
  • Being able to use the symbol \(\pi\) instead of 3.14 and write an answer such as \(72\pi\) without multiplying it out
What exponents stand for (Grade 6)
  • Knowing that the small number at the upper right tells how many times to use the number as a factor, as in \(r^2 = r \times r\) and \(r^3 = r \times r \times r\)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to add the cylinder and the sphere
Cylinder part V1 (in³) 113.1
Sphere from the two ends V2 (in³) 113.1
Capsule volume (in³) =B1+B2
Table to find the volume of the cylinder part
Radius r (in) 3
Cylinder height h (in) 4
Cylinder part, πr²h (in³) =PI()*B1^2*B2
Table to find the volume of the sphere from the two ends
Radius r (in) 3
Sphere, 4/3πr³ (in³) =4/3*PI()*B1^3
Table to find the capsule volume in one formula
Radius r (in) 3
Cylinder height h (in) 4
Capsule volume (in³) =PI()*B1^2*B2+4/3*PI()*B1^3
Table to convert in³ to gallons
Volume in in³ 226.19
Volume in US gallons =B1/231
Table to convert in³ to ft³
Volume in in³ 57750
Volume in ft³ =B1/1728
After pasting, column A holds the labels and column B holds the numbers. The upper rows are your inputs, and the formula in the last row calculates from them automatically.
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

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to add the cylinder and the sphere
Cylinder part V1 (in³) 113.1
Sphere from the two ends V2 (in³) 113.1
Capsule volume (in³) =B1+B2
Table to find the volume of the cylinder part
Radius r (in) 3
Cylinder height h (in) 4
Cylinder part, πr²h (in³) =PI()*B1^2*B2
Table to find the volume of the sphere from the two ends
Radius r (in) 3
Sphere, 4/3πr³ (in³) =4/3*PI()*B1^3
Table to find the capsule volume in one formula
Radius r (in) 3
Cylinder height h (in) 4
Capsule volume (in³) =PI()*B1^2*B2+4/3*PI()*B1^3
Table to convert in³ to gallons
Volume in in³ 226.19
Volume in US gallons =B1/231
Table to convert in³ to ft³
Volume in in³ 57750
Volume in ft³ =B1/1728
The same formulas as in Excel (including the PI() function) work as is. Copy the whole table, paste it into cell A1, and replace the input numbers with the size of your own capsule.

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")
Runs with the standard library only. "math.pi" is π, "**" raises to a power (squared or cubed) and "*" is multiplication. Change the radius and the cylinder height at the top and run it. (This example uses inches. If you enter feet, the volume is in ft³; multiply by 1728 and divide by 231 to get gallons.)

How to write it in LaTeX and other math languages (copy and paste)

The idea behind the volume of a capsule (split into a cylinder and a sphere, then add)
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
Volume of the cylinder part (basic formula 1)
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>&#x3C0;</mi>
    <mo>&#x2062;</mo>
    <msup><mi>r</mi><mn>2</mn></msup>
    <mo>&#x2062;</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
Volume of the sphere made by the two ends (basic formula 2)
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>&#x2062;</mo>
    <mi>&#x3C0;</mi>
    <mo>&#x2062;</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
Volume of a capsule in one formula
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>&#x3C0;</mi>
    <mo>&#x2062;</mo>
    <msup><mi>r</mi><mn>2</mn></msup>
    <mo>&#x2062;</mo>
    <mi>h</mi>
    <mo>+</mo>
    <mfrac><mn>4</mn><mn>3</mn></mfrac>
    <mo>&#x2062;</mo>
    <mi>&#x3C0;</mi>
    <mo>&#x2062;</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
Converting volume units (in³ → gallons)
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>&#xF7;</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
Converting volume units (in³ → ft³)
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>&#xF7;</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
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.