Pyramid Volume Calculator Formula

Understand the math behind the pyramid volume calculator. Each variable explained with a worked example.

Formulas Used

Volume

volume = (1/3) * pow(base_side, 2) * h

Base Area

base_area = pow(base_side, 2)

Lateral Sa

lateral_sa = 2 * base_side * slant_h

Total Sa

total_sa = pow(base_side, 2) + 2 * base_side * slant_h

Variables

VariableDescriptionDefault
base_sideBase Side Length6
hHeight8
slant_hDerived value= sqrt(pow(h, 2) + pow(base_side / 2, 2))calculated

How It Works

Square Pyramid Formulas

Volume

V = (1/3) × base² × h

Slant Height

l = sqrt(h² + (base/2)²)

The slant height runs from the apex to the midpoint of a base edge.

Surface Area

  • Base area = base²
  • Lateral area = 2 × base × slant height
  • Total area = base² + 2 × base × slant height
  • Worked Example

    Square pyramid with base side 6 and height 8.

    base_side = 6h = 8
    1. 01Volume = (1/3) × 36 × 8 = 96
    2. 02Slant height = √(64 + 9) = √73 ≈ 8.544
    3. 03Lateral SA = 2 × 6 × 8.544 ≈ 102.53
    4. 04Total SA = 36 + 102.53 ≈ 138.53

    Ready to run the numbers?

    Open Pyramid Volume Calculator