Written by Erum Nazeer Built by Muhammad Ayaz Akhtar Updated

Volume calculator

Pyramid Volume Calculator

Enter the base length, base width, and vertical height to calculate pyramid volume. The calculator works for rectangular, square, and triangular pyramids, the formula always divides base area times height by 3. Vertical height is the straight distance from the base center to the apex, not the slant distance along a triangular face.

V = (base area × height) / 3

Pyramid

Enter pyramid dimensions

Formula: V = (length × width × height) / 3

3D visual

Pyramid preview

Loading visual

One Formula for Every Pyramid

Square pyramid volume diagram with base side a and vertical height h labeled, showing V = (1/3)a²h
Square pyramid with base side a and vertical height h labeled showing the formula V = (1/3)a²h
V = base area × h ÷ 3

Whatever shape the base is, a pyramid holds one-third of the prism that shares its base and height. Only the base area changes from one type to the next:

Base shapeBase areaVolume
Square, side ss²s²h ÷ 3
Rectangle, l by wl × wlwh ÷ 3
Triangle, base b and height tb × t ÷ 2(bt ÷ 2) × h ÷ 3

The one-third is not a rule of thumb. As you climb a pyramid, each horizontal slice shrinks in proportion to the square of the distance to the apex, and adding up those shrinking slices gives exactly one-third. The same argument explains the cone, and Why a Cone Is Exactly One-Third of a Cylinder walks through it with pyramids included.

Using the Calculator

Enter the base length, base width, and vertical height in one unit. For a square pyramid, type the same number for length and width. The results show the volume, base area, surface area, two slant heights, and the volume in liters, US gallons, imperial gallons, and cubic feet.

The calculator handles square and rectangular bases. For a triangular pyramid, work out the triangle's area by hand and use the formula directly, as in the examples below.

Vertical Height vs Slant Height

This is where most pyramid answers go wrong. The volume formula needs the vertical height: the straight drop from the apex to the center of the base. The slant height runs from the apex down the middle of a triangular face to the base edge. It is always longer, so using it inflates the volume.

The calculator derives both slant heights from your inputs using Pythagoras. Take a rectangular pyramid 18 in long, 10 in wide, and 15 in tall:

If a problem gives you only the slant height, reverse it: vertical height = √(slant² − (half the base side)²). Slant heights are what you need for cutting the triangular faces out of card, sheet metal, or fabric. Volume never uses them.

Worked Examples

ProblemBase area× height ÷ 3Volume
Display stand, rectangular base 18 × 10 in, height 15 in180 in²180 × 15 ÷ 3900 in³
Square pyramid, base 12 cm, height 9 cm144 cm²144 × 9 ÷ 3432 cm³
Square pyramid, base 4 cm, height 9 cm16 cm²16 × 9 ÷ 348 cm³
Rectangular pyramid, 9 × 8 in, height 6 in72 in²72 × 6 ÷ 3144 in³
Triangular pyramid, triangle base 8 m and height 5 m, pyramid height 6 m20 m²20 × 6 ÷ 340 m³
Container, square base 0.9 m inside, height 1.2 m0.81 m²0.81 × 1.2 ÷ 30.324 m³ = 324 L

The container row is filled all the way to the apex. Because a pyramid is widest at the bottom, filling it to half its height already holds seven-eighths of the full volume: the empty top half is a small pyramid with half the height and one-eighth the volume.

For a larger example, the Great Pyramid of Giza has a square base of about 230.4 m and a current height of about 138.8 m. That gives 230.4² × 138.8 ÷ 3 ≈ 2.46 million m³.

Finding a Missing Height or Base

h = 3V ÷ base area    base area = 3V ÷ h

Multiply the volume by 3 first, then divide. A pyramid of 240 cm³ on a 60 cm² base has h = 720 ÷ 60 = 12 cm. Forgetting the 3 here gives 4 cm, which is the height of a box, not a pyramid.

If the top of the pyramid has been cut off flat, the shape is a frustum and needs its own formula. The Frustum Volume Calculator handles that case.

Units

Volume unit conversion table showing cm³, mL, liters, US gallons, UK gallons, cubic feet, and cubic meters
Common volume unit conversions: cm³, mL, liters, US gallons, UK gallons, cubic feet, and cubic meters

Volume comes out in the cube of whatever unit you entered: centimeters give cm³, feet give ft³. Keep all three measurements in the same unit. For capacity, 1,000 cm³ is 1 liter, 1 m³ is 1,000 liters, and 231 in³ is 1 US gallon.

How the Numbers Are Checked

When length and width differ, the calculator produces two distinct slant heights: sqrt((width/2)^2 + height^2) for the two length-direction faces and sqrt((length/2)^2 + height^2) for the two width-direction faces, each from its own Pythagorean calculation. They only match when the base is square. The surface area (base area plus length times its slant height plus width times its slant height) always runs both, so a rectangular base is never treated as square.

Frequently Asked Questions

How do you calculate the volume of a pyramid?

Use V = base area × height ÷ 3. Find the base area first (length × width for a rectangular base, s² for a square base), multiply by vertical height, then divide by 3.

Is pyramid height the same as slant height?

No. Vertical height is the straight perpendicular distance from the center of the base to the apex, that is what the volume formula requires. Slant height is the longer diagonal distance along a triangular face, and it appears in surface area calculations, not volume.

Why does the pyramid volume formula always divide by 3?

A pyramid is one-third of a prism with the same base and height, the same relationship as a cone to a cylinder. This holds regardless of base shape: rectangular, square, or triangular. The factor of 1/3 is always there. For a pyramid with its top cut off horizontally, the resulting shape is a frustum: a separate calculator handles that case.

References