Volume of a triangular prism
Find a triangular prism's volume from three measurements: a triangle with base 3 and height 4, stretched over a length of 10, gives a base area of 6 and a volume of 60. Half the base is multiplied by the height and the prism length. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base
- 3
- Triangle height
- 4
- Length
- 10
- Base area
- 6
- Volume
- 60
A right triangular prism is the solid formed when a triangle is extruded along a perpendicular axis, leaving two congruent triangular bases and three rectangular lateral faces. Its volume is the amount of three-dimensional space inside that solid, and the school identity is always one-half times the triangle base times the triangle height times the prism length, reported in cubic units that match the linear units you entered. This volume of a triangular prism calculator accepts those three positive finite dimensions, multiplies them through that closed form, and returns the volume together with the intermediate triangular base area so a worksheet, LMS check, packing script, or construction estimate can display the same number the student or estimator just computed by hand. No network, no random seed, and no wall clock enter the result.
What triangular prism volume actually computes
A right triangular prism has two parallel congruent triangular bases joined by three rectangular sides. Cavalieri’s principle says the enclosed volume is the area of one triangular end times the perpendicular distance between the two ends. Classroom language almost always gives that triangular area as one-half times a chosen base times the altitude measured to that base, then multiplies by the prism length, so the closed identity is V equals one-half times base times triangle height times length.
That identity is not a search, a mesh, or a numerical iteration — it is one multiplication of three finite numbers after the factor of one-half, and this capability encodes that closed form end to end.
Classic textbook triples appear immediately: a triangle of base three and altitude four extruded by ten has base area six and volume sixty; a triangle of base six and altitude four extruded by twelve has base area twelve and volume one hundred forty-four; a unit-base triangle of altitude two extruded by one has volume one. Decimal and scientific-notation edges such as two point five, four, and six yield thirty, returned as a floating-point value rounded for stable comparison across runtimes.
Because volume is a product of independent positive lengths, swapping which edge you call the triangle base does not change the number provided you also swap the matching altitude; the labels you echo still follow the names you sent. Units stay consistent: if every length is in centimetres the volume is in cubic centimetres; if they are in inches the volume is in cubic inches.
This landing does not convert units, does not return surface area, and does not recompute the altitude from Heron’s formula — you supply the base and the altitude you already measured or were given, and the calculator uses those two numbers for the triangular end and the third number for the extrusion.
Where this volume calculation is useful
Classrooms and tutoring platforms use a volume of a triangular prism calculator so learners can verify V equals one-half times base times height times length without mixing it up with surface area or with a rectangular-prism product. Warehouse, packing, and last-mile tools convert a triangular mailer, a prism bar of stock, or a wedge crate into cubic capacity before quoting freight class or checking a dimensional-weight band.
Construction and interior estimates turn a triangular prism roof void, a ramp, a trench with a triangular cut, or a planter into cubic metres or cubic yards of fill, insulation, or concrete. Game engines and CAD scripts spawn right triangular prisms from three extents and need the enclosed volume without pulling a full solid-geometry library. Exam generators and LMS plugins need a deterministic oracle that rejects a zero or negative dimension instead of returning a hollow zero that a buggy grader might treat as success.
Keep requests small, pin the rounded volume in tests, and you get reproducible triangular-prism volume for homework, edge workers, and design scripts without standing up symbolic math infrastructure of your own. If you later need surface area from three sides plus length, a generic prism from a precomputed base area, or a rectangular box, those are different search intents and different landings — this one stays focused on the three-number school formula for enclosed volume.
What you can do with it
Classroom volume checks
Students enter the triangle base, the triangle altitude, and the prism length to verify V = (1/2) × b × h × l against textbook exercises with a deterministic oracle that rejects non-positive dimensions.
Packing, stock, and freight cubes
Convert a triangular mailer, a prism bar of stock, or a wedge crate into cubic capacity from the given triangular base, its altitude, and the run length.
Roofs, ramps, and fill
Turn a triangular prism roof void, a ramp, or a trench with a triangular cut into cubic metres or cubic yards of material without a full CAD takeoff.
FAQ
Which measurement is the triangle height versus the prism length?
Worksheets that call the extrusion the “height of the prism” should send that number as length.
Does this calculator return surface area as well?
No. This landing returns volume (and the intermediate triangular base area). Surface area is a different search intent.
Why is there a one-half in the triangular prism formula?
Because a triangle covers half of the rectangle with the same base and height. Its area is half the base times the height, and the volume is that area times the prism length.
What units is the volume given in?
In cubic units of the lengths you entered: centimetres give cubic centimetres and inches give cubic inches. All three measurements must use the same unit, since the calculator does not convert.
What happens if a measurement is zero or negative?
It is rejected. A real prism cannot have an edge or a height of zero or less, so the calculator refuses the value instead of showing an empty or flipped-sign volume.
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/volume-of-a-triangular-prism \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base":3,"triangle_height":4,"length":10}'const res = await fetch("https://api.kit.forhosting.com/math/volume-of-a-triangular-prism", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base": 3,
"triangle_height": 4,
"length": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/volume-of-a-triangular-prism",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base": 3,
"triangle_height": 4,
"length": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/volume-of-a-triangular-prism", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base":3,"triangle_height":4,"length":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base":3,"triangle_height":4,"length":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/volume-of-a-triangular-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
{
"base": 3,
"triangle_height": 4,
"length": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.volume_of_a_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.
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
Zero and negative lengths are rejected as invalid_input because a real solid cannot have a non-positive edge or altitude; missing or non-finite values fail the same way and are not billed.
Input contract, response shape, and error behaviour
Dimensions that are absurdly small or large for stable floating-point work are rejected rather than returning a nonsense overflow. Failed validation is not billed. POST a JSON body with three required finite numbers. base is the triangle side that triangle_height is perpendicular to and also accepts the aliases a, side_a, base_length, and b. triangle_height is the altitude of the triangle measured to that base and accepts height, h, base_height, altitude, and h_triangle. length is the prism extrusion, the perpendicular distance between the two triangular bases, and accepts l, prism_length, and depth. Each field may arrive as a JSON number or as a numeric string. Missing fields, empty strings, non-finite values, zero, and negative values fail with invalid_input naming the problem so a degenerate or flipped-sign measurement never looks like a successful volume. On success the body echoes the three inputs, returns base_area as one-half times base times triangle_height, and returns volume as that area times length. The formula field restates the identity and method is set to triangular_prism_volume so clients can distinguish this landing from a surface-area or Heron-from-three-sides calculator. Example: base equals three, triangle_height equals four, and length equals ten yields base area six and volume sixty. Pair the structured JSON with your own drawing code if you need a net or a three-dimensional sketch; this endpoint returns numbers only and does not emit SVG, step-by-step prose beyond the field names, or a conversion between cubic metres and cubic feet — you supply all three lengths already in one consistent unit and interpret the cubic result in that same system.
Technical questions
How do I find the volume of a triangular prism?
Send positive finite base, triangle_height (the altitude to that base), and length. The API returns volume = (1/2) × base × triangle_height × length in the cubic unit that matches those linear edges.
What happens if a dimension is zero or negative?
The task fails with invalid_input. A real triangular prism cannot have a non-positive edge or altitude, so the request is rejected and is not billed.
What does the triangular prism volume calculator cost?
The browser tool is free. API requests use prepaid balance at $0.002 per successful call; invalid input is not billed.