ForHosting KIT · Math

Triangular prism calculator

Enter the three sides of the triangular base and the length to get volume and surface: a 3-4-5 base stretched to a length of 10 holds a volume of 60 with a total surface area of 132. Useful for ducts, tents and roof volumes. 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
Side a
3
Side b
4
Side c
5
Prism length
10
You get
Base area
6
Perimeter
12
Volume
60
Surface area
132

A triangular prism is a three-dimensional solid with two parallel congruent triangular bases joined by three rectangular lateral faces. Given the three side lengths of the triangular base and the prism length (the distance between the bases along the edges that join corresponding vertices), this calculator returns the base area via Heron's formula, the enclosed volume, the base perimeter, and the total surface area of all five faces.

Where triangular prism calculations show up in real work

Secondary-school and college solid-geometry courses constantly ask students for the volume and surface area of a triangular prism given base edges and length; a trusted calculator with a strict non-negative gate and triangle-inequality check speeds homework grading and removes spreadsheet mistakes where someone multiplies only two faces or forgets the two triangular ends. Packaging, HVAC and fabrication workflows size triangular ducts, tent volumes, bar stock, and prismatic voids from outer edge lengths; volume feeds capacity and material estimates while total surface area informs wrap, paint and sheet-metal area.

Architecture, interior design and landscape shops estimate triangular volumes for roofs, ramps and planters and need surface for cladding. Game, graphics and CAD libraries store prism primitives for collision proxies and layout; deterministic volume and surface support debug readouts and property panels without a full mesh library. If you later need a rectangular prism, cylinder, sphere, or oblique prism formulas, packing density of multiple solids, or net layouts, treat those as separate search intents rather than overloading this triangular-prism landing.

Homework and exam checks

Compute triangular-prism volume and total surface area from three base sides and length, and reject negatives or invalid triangles with a clear error.

Ducts, tents and bar stock

From three base edges and extrusion length, recover capacity volume and wrap surface for triangular ducts, tents and prismatic stock.

CAD and game prism metrics

Turn base edges and length into base area, volume and total surface for layout, collision proxies and property panels.

What happens if a side or the length is negative?

Dimensions must not be negative; the error message names the field.

What if the three base sides do not form a triangle?

Degenerate equality (flat base, zero area) is allowed.

Is a zero dimension allowed?

Yes. Zero is non-negative and yields a defined (possibly degenerate) volume and surface—for example zero length collapses the prism to a single triangular face with volume zero.

What does it cost?

The browser tool is free and runs locally.

How is the total surface area of a triangular prism worked out?

Add the two triangular ends to the three rectangular sides, whose areas together equal the base perimeter times the length. An equilateral base of side 2 with a length of 3 gives 2 times √3 plus 18.

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/geom/triangular-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/geom/triangular-prism \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"side_a":3,"side_b":4,"side_c":5,"length":10}'
{
  "side_a": 3,
  "side_b": 4,
  "side_c": 5,
  "length": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.triangular_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.

Any negative side or length is rejected with a clear invalid_input error, and base sides that cannot form a triangle fail the triangle-inequality gate instead of producing a silent NaN. No network calls, no random sampling, and no floating-point surprises beyond ordinary IEEE-754 arithmetic on the numbers you provide.

How volume and total surface area are computed

The factor of two covers both triangular ends; each lateral face is a rectangle of width equal to one base edge and height equal to the prism length, so their areas sum to perimeter times length. Classic checks include a three-four-five right triangle extruded by ten: base area six, volume sixty, perimeter twelve, surface area one hundred thirty-two. An equilateral base of side two with length three yields base area root three, volume three root three, and surface area two root three plus eighteen. Because the path uses only addition, multiplication, a factor of one half, and one square root, it is deterministic, O(1), and free of iterative solvers. Label the three side lengths of the triangular base as side_a, side_b and side_c, and the prism length (extrusion height between the two parallel bases) as length. First form the semi-perimeter s equals half of side_a plus side_b plus side_c. The area of the triangular base follows Heron's formula: base_area equals the square root of s times (s minus side_a) times (s minus side_b) times (s minus side_c). That closed form needs only the three edges and avoids an extra altitude measurement. The volume of the right triangular prism is then base_area times length, the cubic capacity of the solid. The perimeter of the base is side_a plus side_b plus side_c. Total surface area is twice the base area plus the lateral area: surface_area equals two times base_area plus perimeter times length. Huge magnitudes can still overflow IEEE-754 double range; when intermediates are 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 four numbers.

What you send and what you get back

None of the four may be negative; zero is allowed and produces a mathematically defined (possibly degenerate) volume and surface. The three base sides must also satisfy the triangle inequality—each side no longer than the sum of the other two—so that Heron's radicand is non-negative; equality is allowed and yields a zero-area flat base. Example checks: sides three, four, five with length ten yield base area six, volume sixty, perimeter twelve and surface area one hundred thirty-two; a negative length fails naming the field; sides one, two, nine fail the triangle inequality. Wire the free browser tool for quick sanity checks, then call the identical contract from scripts for bulk evaluation without reimplementing Heron and prism formulas in every language. Provide four required finite numbers: side_a, side_b and side_c are the three edge lengths of the triangular base, and length is the prism extrusion distance between the two bases. Missing fields, empty strings, non-numeric text, NaN, Infinity, any negative dimension, and sides that break the triangle inequality are rejected with invalid_input and are not charged. On success the JSON response returns side_a, side_b, side_c, length, base_area, perimeter, volume, surface_area, and method set to heron_triangular_prism_volume_surface so logs and teaching UIs can document the algorithm. API pricing is the published base of $0.002 per successful item.

Where triangular prism 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.

What formulas does this calculator use?

Semi-perimeter s = (side_a + side_b + side_c) / 2; base_area = √(s(s−a)(s−b)(s−c)) (Heron); volume = base_area × length; surface_area = 2 × base_area + (side_a + side_b + side_c) × length. The response includes method: "heron_triangular_prism_volume_surface".

Read the full KIT documentation →