ForHosting KIT · Math

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
Use it from WebAPIEmailTelegramApp soon
If you enter
Base hexagon side s
2
Height
5
Decimal places
6
You get
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.

Teaching

Pinned goldens.

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.

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.

POSThttps://api.kit.forhosting.com/math/hexagonal-prism

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.

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}'
{
  "side": 2,
  "height": 5
}
{
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

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.

Quick check

Free widget.

Automation

Same JSON via API.

Free?

Yes tier A.

Network?

No.

Bad input?

invalid_input.

API?

Yes.

Locales?

EN-only; Nitro hydrates.

Read the full KIT documentation →