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

Square Pyramid Volume Calculator (Base Area × Height ÷ 3)

Enter the base side length and the height of a square pyramid (a pyramid with a square base). You get the volume (side × side × height ÷ 3), converted to cm³, m³ and L as well.

Enter the base side and the height in the same unit, as numbers only (no units. For example, for 5 cm enter "5"). The height is the straight up-and-down distance from the base to the apex.
Result and figure
Enter the base side length and the height in the fields on the left and press "Calculate". The result and a 3D figure will appear here.

What you can do on this page

  • Just enter the side length of the base and the height, and you get the volume of a square pyramid (side × side × height ÷ 3) on the spot
  • The pyramid you entered is drawn in 3D (drag to spin it around)
  • The base area and the steps are shown too, so you can check how the answer was reached, not just the answer
  • The volume is also converted to other units (gal and ft³ if you enter inches, gal if you enter feet)
  • A plain-language explanation of why we divide by 3 and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
Enter the base side and the height in the same unit (both in inches, or both in feet). The height is the straight up-and-down distance from the base to the apex (not the length of a slanted edge). Cones, triangular pyramids and other solids are covered on their own pages.

What is this calculation used for?

Getting a feel for the size of the pyramids of Egypt (history and travel)

The Great Pyramid of Giza (the Pyramid of Khufu) is almost a right square pyramid, with a base side of about 756 ft and an original height of about 481 ft. Its volume is about \(756 \times 756 \times 481 \div 3 \approx 91{,}600{,}000\,\mathrm{ft^3}\), or about 92 million cubic feet (about 2.6 million m³). That is enough stone to fill roughly 1,000 Olympic-size swimming pools.
The real pyramid has passages and rooms inside, and its faces are not perfectly flat, so this is an estimate. Still, one formula lets you put the scale of a World Heritage Site into numbers.

Estimating the air inside a pyramid tent (camping)

A tent held up by a single center pole (a pyramid tent, also called a teepee-style tent) is almost a square pyramid if its floor is square. For a 10 ft × 10 ft floor and a 7 ft pole, the space inside is about \(10 \times 10 \times 7 \div 3 \approx 233\,\mathrm{ft^3}\).
Knowing the amount of air in the tent helps you judge how well a heater can warm it on a winter camping trip, or how likely condensation is (many real tents have short vertical walls at the bottom, so this is an estimate).

Finding the attic volume under a pyramid roof (construction)

A pyramid hip roof on a square building is exactly a square pyramid. For a 20 ft × 20 ft roof that rises 6 ft, the attic space under it is about \(20 \times 20 \times 6 \div 3 = 800\,\mathrm{ft^3}\).
The attic volume is a number used when planning attic ventilation and insulation. Many pointed roofs you see around you, such as gazebo and tower roofs, can be estimated with this formula.

Calculating the capacity of an upside-down pyramid hopper (manufacturing and farming)

A hopper is a funnel-shaped bin that stores grain, plastic pellets or powder and lets it out little by little from the bottom. It is often an upside-down square pyramid. For a hopper 6 ft across the top and 4.5 ft deep, the capacity is \(6 \times 6 \times 4.5 \div 3 = 54\,\mathrm{ft^3}\), which is 2 yd³, or about 43 bushels of grain (1 bushel ≈ 1.24 ft³).
Questions like "how many more tons will fit?" or "can it hold a day's worth of material?" start from this volume calculation (real hoppers are often cut off at the narrow bottom, forming a frustum; then you subtract the small pyramid from the large one).

Solving a classic geometry test question (school)

The volume of pyramids and cones is a staple of middle school and high school geometry, and the pyramid formula appears on the formula sheet of tests such as the SAT. For example, "What is the volume of a right square pyramid with a base side of 6 in and a height of 8 in?" The answer is \(6 \times 6 \times 8 \div 3 = 96\,\mathrm{in^3}\).
Forgetting to divide by 3 is the most common mistake. Remember it together with "a pointed solid is 1/3 of the prism", and you will get these points on the test.

Formulas and figures

Square pyramid volume formula
Figure
Standard notation (the usual math form)
\(V\) \(=\) \(a\) \(2\) \(\times\) \(h\) \(\div\) \(3\)
In words (symbols replaced with words)
⑤ \(V\): pyramid volume \(=\) ① \(a\): base side ② squared (the length times itself) \(\times\) ③ \(h\): height \(\div\) ④ \(3\): split into 3 equal parts
The formula in words
① Take the \(a\): base side ,
② find its square (the length times itself) to get the base area,
③ multiply by the \(h\): height ,
④ and divide by \(3\): split into 3 equal parts to get the
⑤ \(V\): pyramid volume
Quick example
The volume of a square pyramid with a base side of 5 in and a height of 12 in is
\(V\): pyramid volume \(=\) base side (5 in) squared \(\times\) height (12 in) \(\div\) split into 3 equal parts (3)
\(5 \times 5 = 25\)
\(25 \times 12 \div 3 = 300 \div 3 = 100\,\mathrm{in^3}\)
Key idea
Why divide by 3? A cube (the shape of a die) can be cut from one corner into exactly 3 identical "slanted" square pyramids. So the volume of a pyramid is exactly \(\dfrac{1}{3}\) of the volume of a prism (a box) with the same base and the same height. This formula writes "\(\times \dfrac{1}{3}\)" as "\(\div 3\)". Note that the height \(h\) is the straight up-and-down distance from the base to the apex, not the length of a slanted edge (an edge running to the apex). Also, even for a "slanted" pyramid whose apex is not directly above the center of the base, the volume is the same as long as the base area and the height are the same.
Volume formula for all pyramids and cones (from the base area)
Figure
Standard notation (the usual math form)
\(V\) \(=\) \(S\) \(\times\) \(h\) \(\div\) \(3\)
In words (symbols replaced with words)
④ \(V\): volume of the pyramid or cone \(=\) ① \(S\): base area \(\times\) ② \(h\): height \(\div\) ③ \(3\): split into 3 equal parts
The formula in words
① Multiply the \(S\): base area
② by the \(h\): height ,
③ and divide by \(3\): split into 3 equal parts to get the
④ \(V\): volume of the pyramid or cone
Quick example
The volume of a pyramid with a base area of 25 in² and a height of 12 in is
\(V\): volume of the pyramid or cone \(=\) base area (25 in²) \(\times\) height (12 in) \(\div\) split into 3 equal parts (3)
\(25 \times 12 \div 3 = 300 \div 3 = 100\,\mathrm{in^3}\)
Key idea
This formula is not just for square pyramids. It works for every pyramid, such as triangular and pentagonal pyramids, and for cones too (every solid that narrows to a point, an apex, has volume "base area × height ÷ 3"). In US textbooks it is often written \(V = \dfrac{1}{3}Bh\), with \(B\) for the base area. In a square pyramid the base is a square, so the base area is \(S = a \times a\). Substituting this gives the first formula, \(V = \dfrac{1}{3} a^{2} h\). For a cone, the base area is the area of a circle, \(S = \pi r^{2}\).
Converting volume units (in³ to ft³)
Figure
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
① Divide the \(V_{\mathrm{in^3}}\): volume in in³
② by \(1728\): cubic inches in 1 ft³ to get the
③ \(V_{\mathrm{ft^3}}\): volume in ft³
Quick example
The volume of the square pyramid with a base side of 5 in and a height of 12 in, 100 in³, converted to ft³ is
volume in ft³ \(=\) volume in in³ (100) \(\div\) cubic inches in 1 ft³ (1728)
\(100 \div 1728 \approx 0.0579\,\mathrm{ft^3}\)
Key idea
\(1\,\mathrm{ft^3}\) is the volume of a cube 1 ft (12 in) on each side, so \(1\,\mathrm{ft^3} = 12 \times 12 \times 12 = 1728\,\mathrm{in^3}\). The same idea works for cubic yards: \(1\,\mathrm{yd} = 3\,\mathrm{ft}\), so \(1\,\mathrm{yd^3} = 3 \times 3 \times 3 = 27\,\mathrm{ft^3}\). The conversion factor for volume is the conversion factor for length cubed (squared for area, cubed for volume). A common mistake is to divide by 12 or 144 instead of 1728. For liquids, the US uses gallons: \(1\,\mathrm{gal} = 231\,\mathrm{in^3}\), so divide cubic inches by 231 to get gallons (\(100 \div 231 \approx 0.433\,\mathrm{gal}\)).
The volume of a square pyramid is "base area (side × side) × height ÷ 3". We divide by 3 because a pyramid or cone has exactly 1/3 the volume of a prism (a box) with the same base and the same height. Use the straight up-and-down height from the base to the apex; the answer is in the length unit cubed (in³ for inches).

Symbols and terms

Symbols

\(V\) vee A common symbol for volume, from the first letter of "volume". On this page it stands for the volume of the square pyramid.
\(a\) a The side length of the square base. The length and width of the base are the same, so one symbol is enough.
\(a^2\) a squared The number \(a\) multiplied by itself (\(a \times a\)). The small 2 at the upper right is an exponent. On this page it is the base area (the area of the square).
\(h\) aitch The height, from the first letter of "height". It is measured straight up (at a right angle) from the base to the apex, not along a slanted edge.
\(S\) ess A symbol used here for the base area (the area of the base). US textbooks often use \(B\) instead. For a square pyramid, \(S = a \times a\).
\(\mathrm{in^3}\) cubic inches A unit of volume. A cube with 1-inch sides has a volume of 1 in³. Do not mix it up with in² (square inches), the unit of area.
\(\mathrm{ft^3}\) cubic feet A unit of volume. A cube with 1-foot sides has a volume of 1 ft³, and \(1\,\mathrm{ft^3} = 1728\,\mathrm{in^3}\).
\(\mathrm{gal}\) gallons A unit of volume, mostly used for liquids. One US gallon is \(1\,\mathrm{gal} = 231\,\mathrm{in^3}\). It is the familiar unit on milk jugs and at the gas pump.

Terms

square pyramid A solid with a four-sided base that narrows to a single point (the apex). This page covers the ones with a square base (the classic pyramid shape).
right square pyramid A square pyramid whose apex is directly above the center of the square base. The pyramids of Egypt have this shape. Even if the apex is not directly above the center, the volume does not change as long as the base area and the height stay the same.
pyramid The general name for a solid with a polygon base (a triangle, a four-sided shape, a pentagon and so on) that narrows to a single point. With a triangle base it is a triangular pyramid; with a four-sided base, a square or rectangular pyramid.
base area The area of the bottom face (the base) of a solid. For a square pyramid, it is the area of the square base (side × side).
volume The amount of space a solid takes up, given as a number. It is measured by how many cubes with 1-inch sides (1 in³) would fill it.
apex The single point at the top of a pyramid or a cone, where the faces meet. Every solid that narrows from its base to one apex, pyramids and cones alike, has volume "base area × height ÷ 3".

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.

Multiplication and division (Grades 3–4)
  • Being able to do a calculation that mixes multiplication and division, such as 36 × 5 ÷ 3
Area of a square (Grade 3)
  • Knowing that the area of a square is side × side (used for the base area of the pyramid)
What volume is and its units (Grade 5)
  • Knowing that volume can be measured as how many cubes with 1-inch sides (1 in³) fit inside
  • Being able to read and write the units in³, ft³ and gal, and knowing that 1 ft³ = 1728 in³
Pyramids as solids (Grade 7 and geometry)
  • Being able to picture a square pyramid from a drawing (a solid with a four-sided base that narrows to one point)
  • Knowing that the height is the straight up-and-down distance from the base to the apex, and is different from the length of a slanted edge

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 find the volume of a square pyramid
Base side length 5
Height 12
Pyramid volume =B1^2*B2/3
Table to find the volume of any pyramid or cone (from the base area)
Base area 25
Height 12
Volume =B1*B2/3
Table to convert in³ to ft³
Volume in in³ 100
Volume in ft³ =B1/1728
After pasting, column A holds the item names and column B holds the numbers. The upper rows are your inputs, and the formula in the last row calculates automatically from them.
In a formula, "B1" and "B2" tell Excel to use the number in that cell. "*" is multiplication, "/" is division and "^" is a power (how many times to multiply).
In the first table, for example, B3 shows 5 × 5 × 12 ÷ 3 = 100 (in³ if you entered inches). The second table shows 100 in B3, and the third table shows about 0.0579 in B2. Just replace the input numbers with your own lengths.

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 find the volume of a square pyramid
Base side length 5
Height 12
Pyramid volume =B1^2*B2/3
Table to find the volume of any pyramid or cone (from the base area)
Base area 25
Height 12
Volume =B1*B2/3
Table to convert in³ to ft³
Volume in in³ 100
Volume in ft³ =B1/1728
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the input numbers with your own lengths.

How to calculate it in Python

a = 5    # base side length (in inches in this example)
h = 12   # height (straight up from the base to the apex; same unit as a)

base_area = a ** 2            # base area (area of the square)
volume = base_area * h / 3    # pyramid volume (input unit cubed; in3 in this example)
volume_gal = volume / 231     # volume in US gallons, if you entered inches

print(f"Base area: {base_area} in2")
print(f"Pyramid volume: {volume} in3")
print(f"In gallons: {volume_gal} gal")
Runs with the standard library only. "**" is a power (squared), "*" is multiplication and "/" is division. Change the side and the height at the top and run it (this example uses inches; to get ft³ instead, divide the volume by 1728).

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

Square pyramid volume formula
V = a² × h ÷ 3
V = \frac{1}{3} a^{2} h
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>V</mi>
    <mo>=</mo>
    <mfrac><mn>1</mn><mn>3</mn></mfrac>
    <msup><mi>a</mi><mn>2</mn></msup>
    <mi>h</mi>
  </mrow>
</math>
V = 1/3 a^2 h
a^2*h/3
V := a^2*h/3;
V = a^2*h/3;
V = (a^2 × h)/3
Volume formula for all pyramids and cones (from the base area)
V = S × h ÷ 3
V = \frac{1}{3} S h
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>V</mi>
    <mo>=</mo>
    <mfrac><mn>1</mn><mn>3</mn></mfrac>
    <mi>S</mi>
    <mi>h</mi>
  </mrow>
</math>
V = 1/3 S h
s*h/3
V := S*h/3;
V = s*h/3;
V = (S × h)/3
Converting volume units (in³ to 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 square pyramid has a square base with 5 in sides and a height of 12 in.
Find each of the following:
1. The base area of this pyramid in in²
2. The volume of this pyramid in in³ (volume = base area × height ÷ 3)
3. 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.