Home › Geometry › Square Pyramid Calculator
Square Pyramid Calculator
Computes the volume, slant height, lateral edge, base area, lateral and total surface area and face slope in degrees of a right square pyramid from its base side and height.
When to use
You need the volume or surface of a pyramid with a square base and the apex above the centre of the base.
Do not use when: The base is a circle (use cone), a non-square rectangle or triangle, or the apex is off-centre (oblique pyramid).
Formula
volume = base_side² · height / 3; slant_height = √(height² + (base_side/2)²); lateral_edge = √(height² + base_side²/2); lateral_area = 2 · base_side · slant_height; total_surface_area = base_side² + lateral_area; face_slope_deg = atan(2 · height / base_side)
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
base_side | number | units | yes | Length of one side of the square base. Range: > 0 |
height | number | units | yes | Perpendicular distance from the base to the apex. Range: > 0 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
volume | number | units³ | base_side² × height / 3. |
slant_height | number | units | √(height² + (base_side / 2)²), height of each triangular face. |
lateral_edge | number | units | √(height² + base_side² / 2), length of each edge from a base corner to the apex. |
base_area | number | units² | base_side². |
lateral_area | number | units² | 2 × base_side × slant_height (four triangular faces). |
total_surface_area | number | units² | base_side² + 2 × base_side × slant_height. |
face_slope_deg | number | degrees | Angle between a triangular face and the base = atan(height / (base_side / 2)). |
Example
Base 6, height 4: {"base_side":6,"height":4} → {"volume":48,"slant_height":5,"lateral_edge":5.831,"base_area":36,"lateral_area":60,"total_surface_area":96,"face_slope_deg":53.1301}
Great Pyramid of Giza (230.4 m base, 146.6 m original height): {"base_side":230.4,"height":146.6} → {"volume":2594046,"slant_height":186.4473,"lateral_area":85914.92,"face_slope_deg":51.8393}
GET https://tttkmbb.com/api/v1/calculate/pyramid?base_side=6&height=4
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/pyramid(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/pyramid · Markdown: https://tttkmbb.com/geometry/pyramid.md · JSON definition: https://tttkmbb.com/geometry/pyramid.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="pyramid" - OpenAPI operationId:
calculate_square_pyramid_properties - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Square pyramid (reference)
- Wolfram MathWorld – Square Pyramid (reference)
FAQ
Slant height or lateral edge?
The slant height runs from the apex to the midpoint of a base side (the height of a face); the lateral edge runs from the apex to a base corner and is longer.
What about a rectangular base?
Volume is length × width × height / 3, but the two pairs of faces have different slant heights; this calculator only handles square bases.
Related calculators
- Cone Calculator — Circular-based counterpart with the same volume formula (base area × height / 3).
- Rectangular Prism Calculator — A prism with the same base and height has three times the volume.
- Right Triangle Calculator — Slant height and lateral edge come from right triangles with the height as one leg.