Pyramid angle calculator
Give the base side and height of a square pyramid and get the angle its slant edges make with the base: a side of 6 and a height of 4 give just over 43 degrees, with an edge length of 5.8309518948. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base side
- 6
- Height
- 4
- Half diagonal
- 4.2426406871
- Slant edge
- 5.8309518948
- Angle rad
- 0.7559694104
- Angle deg
- 43.3138566583
A regular square pyramid rests on a square base and rises to an apex directly above the center. Its four slant edges run from that apex down to the four base corners. School problems, roof sketches, and CAD notes often list only the base side and the perpendicular height, then ask for the angle those edges make with the base plane. That inclination is not the face angle: a lateral face meets the midpoint of a side, while a slant edge meets a vertex farther from the center.
What the slant-edge angle means and why θ = arctan(h√2 / a)
In Euclidean solid geometry a regular square pyramid is determined by a square base of side a and a perpendicular height h measured from the apex to the center of that square. Place the base in the coordinate plane, center the square at the origin, and put the apex at height h on the vertical axis.
Each base corner then sits at a planar distance equal to half the diagonal of the square, which is a times the square root of two over two, or equivalently a over the square root of two. The slant edge is the straight line from the apex to that corner. The angle between a line and a plane is the complement of the angle between the line and the plane's normal, and it is also the angle whose tangent is the height over the in-plane run.
That run is the half-diagonal, so the inclination theta of the slant edge to the base satisfies tan of theta equals h times the square root of two divided by a, which is theta equals arctan of h root two over a. Search intent clusters around phrases such as pyramid angle calculator, angle between slant edge and base of a pyramid, inclination of a pyramid lateral edge, and how to find a pyramid edge angle from side and height.
People want a numeric degree answer they can check against a textbook key or a drawing, not only a reminder that a right triangle lives inside the solid. Units stay consistent: base side and height must share a length unit; the engine does not convert units and does not invent a preferred unit system. The formula depends only on the ratio of height to side, so the absolute scale of metres or centimetres does not change the angle.
Practical uses, limits, pricing, and delivery channels
Use the free browser tool when you want an immediate slant-edge inclination from a known square side and height while checking solid-geometry homework, verifying a roof hip or monument edge, reading a pyramid drawing, or confirming a workshop sketch without installing a computer-algebra system. Results are fully deterministic: the same side and height always yield the same angle in degrees. There is no language model, no external geometry service, and no randomness, so the capacity is safe to pin in continuous-integration checks and reproducible lesson materials.
Limits are intentional: the tool does not convert among unit systems, does not solve triangular or hexagonal pyramids, does not report the inclination of a lateral face — that angle uses the mid-side apothem a over two rather than the half-diagonal — and does not emit diagrams. It returns only the closed-form slant-edge-to-base angle of a regular square pyramid from its base side and height, which is the quantity this landing is built to answer.
What you can do with it
Homework and solid-geometry drills
Students and graders confirm the slant-edge inclination from base side and height, including a clear rejection when either measure is zero or negative.
FAQ
What happens if height or base side is zero or negative?
A non-positive height or base side leaves the slant-edge inclination undefined; validation failures are not billed.
Is this the face inclination or the edge inclination?
This calculator is the slant-edge angle to the base plane. Face inclination uses the mid-side apothem a/2 instead of the half-diagonal a/√2 and is a different quantity.
Does this compute pyramid volume or surface area?
No. This capacity is the slant-edge-to-base angle only. Use a pyramid volume calculator when you need volume, slant height of a face, or surface metrics.
How do I find the angle between a pyramid's slant edge and its base?
Multiply the height by the square root of two, divide by the base side, and take the angle whose tangent is that value. A base side of 6 and a height of 4 give an edge angle of just over 43 degrees.
Does the unit of length change the pyramid angle?
No, as long as the side and the height use the same unit. The angle depends only on the ratio between them, so metres or centimetres give the same answer. The tool does not convert units, so mixing them gives a wrong angle.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/pyramid-angle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base_side":6,"height":4}'const res = await fetch("https://api.kit.forhosting.com/math/pyramid-angle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_side": 6,
"height": 4
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/pyramid-angle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base_side": 6,
"height": 4
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/pyramid-angle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base_side":6,"height":4}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base_side":6,"height":4}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/pyramid-angle", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"base_side": 6,
"height": 4
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.pyramid_angle",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This pyramid angle calculator accepts a positive finite base side and height, rejects non-positive measures with invalid_input, and returns the edge-to-base angle in degrees as structured JSON.
What the slant-edge angle means and why θ = arctan(h√2 / a)
Returning the validated side and height, the half-diagonal, the slant-edge length, and the angle in degrees and radians as JSON makes the result easy to paste into notes, pin in automated tests, or feed into a lesson pipeline without reimplementing inverse tangents in every language you teach.
Input contract, formulas, validation, and response shape
Zero and negative measures are always rejected: a pyramid with a non-positive height or a non-positive base side has no defined slant-edge inclination, matching the product contract and the fact that the half-diagonal would vanish or the apex would not rise above the plane. Worked example: base side six and height four give half-diagonal three times root two and an inclination of arctan of two root two over three, a little over forty-three degrees. Another check: when the side equals the height times root two, the tangent is one and the angle is exactly forty-five degrees. Edge cases that fail before any angle is returned include height zero, negative height, non-positive side, non-numeric strings, infinity, and missing fields. Failed validation is not billed. POST a JSON body with the required fields base_side and height, each a positive finite number. Either field may arrive as a JSON number or as a numeric string. Missing, empty, or non-finite values fail with invalid_input naming the field. On success the engine computes the half-diagonal as base_side over the square root of two, the slant-edge length as the square root of height squared plus half the squared side, and the angle as the arctangent of height over that half-diagonal, then converts radians to degrees with the usual one-hundred-eighty over pi factor. Derived quantities are rounded to a stable decimal precision so the same input always yields the same JSON across JavaScript engines. The response echoes base_side and height, exposes half_diagonal, slant_edge, angle_rad, angle_deg, a short formula string restating theta equals arctan of h root two over a, and method set to square_pyramid_slant_edge_base_angle. This endpoint does not return volume or surface area; those belong to a different SEO landing and a different capacity.
Practical uses, limits, pricing, and delivery channels
Each successful request is one billable item at $0.002; failed validation does not consume balance. Accepted inputs must be strictly positive; a zero or negative height or base side is always rejected with invalid_input. Wire the endpoint into solid-geometry drills, contest answer checkers, architecture worksheets that list only side and height, or preprocessing steps where you already prefer explicit domain errors over opaque widgets that cannot show why a non-positive height is rejected.
Integration use cases
Architecture and roof-hip checks
Drawings that list a square base and a rise recover the edge-to-base angle as structured JSON for hips, monuments, and pyramidal roofs.
CAD and manufacturing notes
Notebooks that need the inclination of a regular square pyramid edge from measured side and height call a deterministic parse API instead of reimplementing arctan.
Technical questions
How do I calculate the angle between a pyramid's slant edge and its base?
Send a positive finite base_side and height. The API returns θ = arctan(h√2 / a) as angle_deg (and angle_rad), plus the half-diagonal and slant-edge length.
What does the pyramid angle calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.