Hexagonal prism calculator
A hexagonal prism with a side of 2 and a height of 5 holds about 51.961524 cubic units. Enter both lengths and get the volume, the base area, the lateral area and the total surface together. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base hexagon side s
- 2
- Height
- 5
- Decimal places
- 6
- Base area
- 10.392305
- Volume
- 51.961524
- Lateral area
- 60
- Surface area
- 80.78461
Right regular hexagonal prism volume and areas. Search intent: hexagonal prism volume. No network calls or random seeds are required. Failed jobs are not billed.
Four measures of one hexagonal prism
A right regular hexagonal prism has two identical regular hexagons as its ends and six rectangular faces standing straight up between them. Two lengths describe it completely: the side of the hexagon and the height of the prism. From those two numbers you get four results at once: the area of one hexagonal base, the volume, the lateral area of the six rectangles and the total surface area. With a side of 2 and a height of 5, the base covers about 10.392305, the volume is about 51.961524, the sides add up to 60 and the whole surface to 80.78461.
How each figure is worked out, and what to watch
The base area is the side squared times three times the square root of three, divided by two. The volume is that base area multiplied by the height. The lateral area is six rectangles of side by height, and the total surface adds the two hexagonal ends to it. The most common slip is to take the lateral area for the total surface, which leaves out both bases. Another is to round the base area first and then multiply, which lets small errors grow. Here the rounding to the decimals you choose happens only once, on the final unrounded values.
What you can do with it
Teaching
Pinned goldens.
FAQ
How do I calculate the volume of a hexagonal prism?
Multiply the area of the hexagonal base by the height of the prism. With a side of 2 and a height of 5, the base covers about 10.392305 and the volume comes to about 51.961524 cubic units.
What is the difference between lateral area and total surface area?
The lateral area counts only the six rectangular faces, while the total surface area adds the two hexagonal ends. With a side of 2 and a height of 5, the lateral area is 60 and the total is about 80.78461.
How do I find the area of the hexagonal base?
Square the side, multiply it by three times the square root of three and divide by two. For a side of 2 that gives about 10.392305, which is the base later multiplied by the height.
Can I choose how many decimals the results have?
Yes, you can set the number of decimals you want; without it you get the unrounded values. Rounding is applied only once, halves going up, on the exact calculation, so the figures do not drift.
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/hexagonal-prism \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"side":2,"height":5}'const res = await fetch("https://api.kit.forhosting.com/math/hexagonal-prism", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"side": 2,
"height": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/hexagonal-prism",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"side": 2,
"height": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/hexagonal-prism", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"side":2,"height":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"side":2,"height":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/hexagonal-prism", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"side": 2,
"height": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.hexagonal_prism",
"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
The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
How it works
Right regular hexagonal prism volume and areas. base=(3√3/2)s²; V=base×h. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
Inputs, limits and rounding
Optional decimals use half-up once. Outputs echo inputs. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. Provide required JSON fields. Invalid types raise invalid_input. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
When to use it
Use when search intent matches. Right regular hexagonal prism volume and areas. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
Integration use cases
Quick check
Free widget.
Automation
Same JSON via API.
Technical questions
Free?
Yes tier A.
Network?
No.
Bad input?
invalid_input.
API?
Yes.
Locales?
EN-only; Nitro hydrates.