Hexagonal pyramid calculator
Get a regular hexagonal pyramid's volume and surfaces from its base edge and height, so edge 2 with height 3 gives a volume of 6√3, a lateral area of 12√3 and a total surface of 18√3. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base edge
- 2
- Height
- 3
- Base area
- 10.3923048454
- Volume
- 10.3923048454
- Lateral surface area
- 20.7846096908
- Surface area
- 31.1769145362
A regular hexagonal pyramid has a regular hexagon as its base and six congruent isosceles triangular faces that meet at an apex directly above the center of that base. Given the common base edge length and the perpendicular height from apex to base plane, this calculator returns the enclosed volume, the hexagonal base area, the mid-edge face slant height, the lateral surface area of the six triangles, and the total surface area (base plus lateral) with the classic closed-form formulas used in solid-geometry textbooks.
Where hexagonal pyramid calculations show up in real work
Secondary-school and college solid-geometry courses constantly ask students for the volume and surface area of a regular hexagonal pyramid given edge and height; a trusted calculator with a strict positive-input gate speeds homework grading and removes spreadsheet mistakes where someone uses a square base formula or forgets the geometric base area of the hexagon.
Architecture, roofing and fabrication workflows size hexagonal tent peaks, pavilion roofs, monument caps, and decorative planters from plan edge length and cut height; volume feeds fill and concrete estimates while total surface area feeds cladding and paint takeoffs before lateral faces are detailed. Packaging, display stands and product design often use regular hexagonal pyramids for point-of-sale geometry; deterministic metrics support quotes without a full mesh library.
Game, graphics and CAD libraries store regular pyramid primitives for collision proxies and lighting volumes; echoing method plus the two inputs makes debug property panels self-describing. If you later need a pyramid frustum, a square or triangular pyramid, or only base area without the solid, treat those as separate search intents rather than overloading this hexagonal-pyramid landing.
What you can do with it
Homework and exam checks
Compute regular hexagonal pyramid volume and surface area from edge and height, and reject non-positive inputs with a clear error.
Roofs, tents and fabrication
From plan edge and apex height, recover fill volume and cladding area for hexagonal peaks, planters and monument caps.
CAD and game pyramid metrics
Turn base edge and height into stable volume and surface figures for layout, material estimates and property panels.
FAQ
Is the apex assumed to be centered above the base?
Yes. This is a regular hexagonal pyramid: the base is a regular hexagon and the apex lies on the axis through the center of that base, perpendicular to the base plane.
What does it cost?
The browser tool is free and runs locally.
How do I find the volume of a hexagonal pyramid?
Take one third of the hexagonal base area times the height. For a regular hexagon that simplifies to the square root of three over two, times the edge squared, times the height.
What is the slant height of a hexagonal pyramid?
It is the height of each triangular face, measured from the middle of a base edge up to the apex. It equals the square root of the height squared plus the base apothem squared.
What is the difference between lateral and total surface area?
The lateral area covers only the six triangular faces and equals half the base perimeter times the slant height. The total surface adds the hexagonal base on top of that.
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/geom/hexagonal-pyramid \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base_edge":2,"height":3}'const res = await fetch("https://api.kit.forhosting.com/geom/hexagonal-pyramid", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_edge": 2,
"height": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/hexagonal-pyramid",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base_edge": 2,
"height": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/hexagonal-pyramid", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base_edge":2,"height":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base_edge":2,"height":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/hexagonal-pyramid", 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_edge": 2,
"height": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.hexagonal_pyramid",
"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
Any non-positive edge or height is rejected with a clear invalid_input error instead of a silent nonsense volume. No network calls, no random sampling, and no floating-point surprises beyond ordinary IEEE-754 arithmetic on the numbers you provide.
How volume and surface area are computed
Pyramid volume is one-third of base area times height, which simplifies for this base to volume equals (√3/2) a² h. For surface area, first form the base apothem (inradius of the hexagon) r equals (√3/2) a; the face slant height measured from the midpoint of a base edge up the altitude of a lateral face is m equals the square root of h squared plus r squared, which is √(h² + 3a²/4). Lateral surface area is half the base perimeter times that slant: (1/2)×6a×m equals 3 a m. Because the path uses only multiplication, division, and square roots of three and of a sum of squares, it is deterministic, O(1), and free of iterative solvers. Label the side length of the regular hexagonal base as base_edge a and the perpendicular distance from the apex to the base plane as height h. The area of a regular hexagon is three-halves times the square root of three times a squared: base_area equals (3√3/2) a². Total surface area is base_area plus lateral_surface_area. Classic checks include a equals two and h equals three: base_area equals 6√3, volume equals 6√3, slant_height equals 2√3, lateral equals 12√3, and total surface equals 18√3. Huge magnitudes can still overflow IEEE-754 double range; when any result is non-finite the request fails with a clear overflow message instead of returning Infinity in JSON. That closed form matches solid-geometry textbooks and keeps automated graders aligned with hand computation on the same inputs.
What you send and what you get back
There is no optional circumradius, lateral edge, or apex offset—this landing is the regular centered hexagonal pyramid from edge and height only. Example checks: edge two and height three recover the √3 multiples above; edge one and height one yield volume √3/2 and a surface area that includes both the hexagonal base and six isosceles triangles. Wire the free browser tool for quick sanity checks, then call the identical contract from scripts for bulk evaluation without reimplementing hexagonal-pyramid formulas in every language. Provide two required finite numbers: base_edge is the side length of the regular hexagonal base and must be strictly positive; height is the perpendicular apex-to-base distance and must also be strictly positive. Zero, negative, missing, empty, non-numeric, NaN, and Infinity values are rejected with invalid_input and are not charged. On success the JSON response returns base_edge, height, base_area, volume, lateral_surface_area, surface_area, slant_height, and method set to regular_hexagonal_pyramid_volume_surface so logs and teaching UIs can document the algorithm. API pricing is the published base of $0.002 per successful item.
Where hexagonal pyramid calculations show up in real work
Because this capability is a pure parse engine, failed validation does not consume balance and successful runs stay at $0.002 per item.
Technical questions
What formulas does this calculator use?
Base area = (3√3/2) a²; volume = (√3/2) a² h; slant height m = √(h² + 3a²/4); lateral surface = 3 a m; total surface = base + lateral. The response includes method: "regular_hexagonal_pyramid_volume_surface".
What happens if base_edge or height is zero or negative?
The request fails with invalid_input. Both values must be strictly greater than zero; the error message names the field (base_edge or height).
Does surface_area include the base?
Yes. surface_area is the total surface area (hexagonal base plus six lateral triangular faces). lateral_surface_area is the six triangles alone if you need only the sides.