ForHosting KIT · Math

Triangle altitude lengths calculator

Get all three heights of a triangle from its sides alone: for sides 3, 4 and 5 the area is 6 and the heights are 4, 3 and 2.4. No angles or corner coordinates needed. 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
A
3
B
4
C
5
You get
Perimeter
12
Semiperimeter
6
Area
6
Altitude a
4

A triangle altitude is the perpendicular distance from a vertex to the line of the opposite side. When you know only the three side lengths—SSS data from a worksheet, paced edges of a triangular lot, or edge lengths in a mesh—you can still recover all three altitude lengths without measuring angles or constructing the orthocenter. This capability checks the strict triangle inequality so the figure is non-degenerate, computes area with Heron's formula from the semiperimeter, and returns each altitude as twice the area divided by the corresponding base.

What triangle altitudes are and how the lengths are derived

An altitude of a triangle is a perpendicular segment from a vertex to the line containing the opposite side. Its length is the height when that opposite side is taken as the base. Label the sides a, b, and c.

When only sides are known, Heron's formula supplies the area without angles: form the semiperimeter s equals (a plus b plus c) divided by two, then A equals the positive square root of s times (s minus a) times (s minus b) times (s minus c). The product under the radical is zero precisely when the sides are collinear, so a strict triangle inequality is required: a plus b must exceed c, a plus c must exceed b, and b plus c must exceed a.

A classic sanity check is the three-four-five right triangle: semiperimeter six, area six, so the altitude to side three is four, to side four is three, and to side five is two point four—matching half-base-times-height with legs three and four for the hypotenuse base. Every step is elementary arithmetic and square roots on three scalars, so there is no iteration, no sampling, no dependence on wall-clock time, and no need for angles or vertex coordinates in the input contract.

Surveying and plot heights relative to each edge

Turn paced edge lengths of a triangular lot into perpendicular heights to each boundary without measuring angles or staking an orthocenter.

Game, CAD, and mesh height from three edge lengths

Validate a triangle face or derive altitude lengths when only the three edge lengths are known in the scene graph or mesh data.

How do you find triangle altitude lengths from three sides?

Compute area A with Heron's formula from sides a, b, c. Each altitude is the height when that side is the base.

What is the triangle inequality?

Each side must be strictly shorter than the sum of the other two: a+b>c, a+c>b, and b+c>a. If any fails, the lengths do not form a non-degenerate triangle.

Why are collinear sides rejected instead of returning zero heights?

When a+b=c the figure is a line segment, not a triangle.

Does this need angles or vertex coordinates?

No. Only the three side lengths are required. For orthocenter location from coordinates, use a dedicated orthocenter calculator instead.

Is the triangle altitude lengths calculator free?

The browser tool is free and runs locally.

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/triangle-altitudes

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/triangle-altitudes \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":3,"b":4,"c":5}'
{
  "a": 3,
  "b": 4,
  "c": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.triangle_altitudes",
  "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.

Results are deterministic JSON: no computer-algebra system, no random seeds, and the same pure solve function in the free browser tool and the prepaid API path, so homework checks, grading scripts, and production pipelines all see the same numbers every time.

What triangle altitudes are and how the lengths are derived

The altitude to side a (often written h_a) is the perpendicular distance from the opposite vertex to side a; similarly h_b and h_c go to sides b and c. Because area equals one-half times base times height, rearranging gives h equals two times area over the base: h_a equals two A over a, h_b equals two A over b, and h_c equals two A over c. When any of those fails, no non-degenerate triangle exists and this tool returns invalid_input rather than a zero or imaginary height.

How to call the API and what comes back

Use it from geometry homework pipelines, construction takeoff scripts that need heights relative to each edge, game-level tooling, interview-prep sandboxes, or any workflow that needs reproducible SSS altitude lengths without installing a computer-algebra package on every machine. Send a JSON body with three fields. Field a is the first positive side length; aliases side_a and side1 are accepted. Field b is the second positive side; aliases side_b and side2 map to the same meaning. Field c is the third positive side; aliases side_c and side3 are accepted. On success the response echoes a, b, and c, adds perimeter, semiperimeter, area, altitude_a, altitude_b, altitude_c, method set to heron_altitudes, and a short formula block documenting the closed forms for s, area, and each altitude. Failed validation—missing a required field, a non-finite number, a non-positive side, a side outside published limits, or a triple that breaks the strict triangle inequality—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item. Round-trip checks are easy: after solving, confirm that area equals one half times a times altitude_a (and cyclic) within floating tolerance, and that perimeter equals a plus b plus c.

Practical tips, limits, and related searches

When teaching, prefer paired examples: three-four-five for a right triangle with integer area and clean altitudes four, three, and two point four; five-five-five for equilateral heights all equal to (square root of three over two) times side; and one-two-ten to demonstrate the hard rejection path that protects callers from a non-triangle. Prefer this tool when you measured or were given all three edges and need the three heights relative to those edges. Prefer Heron-based altitudes over constructing a diagram when only SSS data is available and you do not need the foot of each altitude as a point in the plane. Keep side lengths inside the published positive range up to one trillion so intermediate products stay finite in IEEE double precision on the Worker and in the browser. Units are whatever you pass—metres, feet, or game units—as long as all three sides share the same unit; the API does not convert units for you, and the returned altitudes use that same unit. Because the formulas only need sides, students can recompute s, area, and each two-A-over-side quotient by hand for small integers and match the API line by line. This landing targets people searching for a triangle altitude lengths calculator or heights from three sides; it is not an orthocenter-from-coordinates tool—use the dedicated orthocenter capability when you have vertex coordinates instead of side lengths. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when users type impossible triples while learning the contract.

Homework and exam checks for SSS height problems

Give students three side lengths; compare their hand-computed Heron area and three altitudes against a deterministic API or free browser result.

Read the full KIT documentation →