Triangle altitude from area and base calculator
The triangle altitude from area and base calculator finds the perpendicular height associated with a chosen base.
Run — free
Enter the triangle's positive area and the length of that base, and it applies the rearranged area formula h = 2A/b. The result uses the length unit implied by your inputs: square meters with meters gives meters, square inches with inches gives inches, and so on. This is useful when the area is known but a direct height measurement is unavailable or inconvenient.
Choose the base that matches the altitude you need
A triangle has three possible bases, and each base has its own corresponding altitude. The altitude is not necessarily an edge of the triangle: it is the perpendicular distance from the selected base line to the opposite vertex. Begin by deciding which side is serving as the base, then use the area measured for the whole triangle and the length of that exact side. This pairing matters because changing the base changes the height needed to preserve the same area. For an obtuse triangle, the perpendicular may meet an extension of the base outside the triangle, but the positive distance is still computed by the same formula. Keep the units consistent before entering values. If the area is in square centimeters, the base must be in centimeters to obtain an altitude in centimeters. Do not mix square meters with a base in feet unless you convert one of them first. The calculator treats the values as unitless numbers, so unit consistency is what gives the numerical result its correct physical meaning.
Understand why twice the area is divided by the base
The familiar triangle area equation is A = bh/2, where A is area, b is the selected base length, and h is the perpendicular altitude to that base. Solving this equation for height takes two direct algebraic steps. Multiply both sides by two to obtain 2A = bh, then divide both sides by b to obtain h = 2A/b. The calculator performs precisely those operations, without approximation beyond ordinary numeric representation. Both area and base must be positive and finite. A zero base cannot define this division, while a negative base or negative geometric area has no meaning for this length calculation. The returned altitude is also checked to ensure it remains positive and finite. You can verify the answer by substituting it into the original area equation: multiply the reported altitude by the base and divide by two. The result should reproduce the entered area. This reverse check is especially helpful when copying measurements from drawings, survey notes, worksheets, or construction estimates where a misplaced unit can otherwise look like a plausible number.
Interpret and use the perpendicular height correctly
The result is the perpendicular height relative to the base you supplied, not a sloping side length and not automatically the greatest vertical dimension in a drawing. Orientation does not affect the calculation: rotating the triangle leaves its area, base length, and corresponding perpendicular distance unchanged. This makes the formula useful in geometry exercises, land and roof sketches, fabrication layouts, and any workflow where area and one side are known. For automated use, send the area and base fields to the API and read the altitude field from the response. Each request costs $0.002; the same deterministic calculation can run free in the browser. Preserve enough precision for the job instead of rounding the inputs too early. If an area was itself estimated, extra decimal places in the output do not make that source measurement more accurate. Round only at the reporting stage, and state the resulting length unit alongside the value. When comparing different candidate bases for the same triangle, calculate each corresponding altitude separately; the product of base and altitude should always equal twice the fixed area.
What you can do with it
Complete a geometry exercise
Find the missing perpendicular height when a worksheet or proof gives the triangle's area and one base length.
Recover a drawing dimension
Calculate the required offset from a known triangular area and a measured baseline in a plan or fabrication sketch.
Check survey or construction figures
Reconstruct the altitude and substitute it into A = bh/2 to validate recorded area and base measurements.
FAQ
What formula does the calculator use?
It uses altitude = 2 × area / base, obtained by rearranging the triangle area formula A = bh/2.
Which unit will the altitude use?
The altitude uses the linear unit paired with the area unit. For example, square centimeters divided by centimeters produces centimeters.
Can I use any side as the base?
Yes. Use the chosen side's length as the base; the result is the perpendicular altitude from that base line to the opposite vertex.
Why must the base be greater than zero?
A zero base makes division undefined, and a negative base is not a valid geometric length. The calculator therefore requires a positive finite value.
Does the formula work for obtuse triangles?
Yes. The perpendicular may meet the extension of the chosen base outside the triangle, but its positive distance still satisfies A = bh/2.
What does an API request cost?
An API request costs $0.002. You can also run the same calculation free in your browser on this page.
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/trig/altitude-from-area \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"area":30,"base":12}'const res = await fetch("https://api.kit.forhosting.com/trig/altitude-from-area", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"area": 30,
"base": 12
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/altitude-from-area",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"area": 30,
"base": 12
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/altitude-from-area", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"area":30,"base":12}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"area":30,"base":12}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/altitude-from-area", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"area": 30,
"base": 12
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.altitude_from_area",
"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. |