Math & Statistics

Triangle Calculator

Calculate area, perimeter, and altitude from three sides that form a valid triangle.

Private, in-browser calculationUpdated

Let’s work it out

Enter your numbers. We’ll show the working.

Use the same selected unit for every length. Area inputs use its square.

How to use this calculator

  1. Enter first side / altitude base and the remaining values.
  2. Check the selected units and the counting or calculation convention described below.
  3. Select Calculate to review the result and breakdown. Reset restores the example.

The formula

Area = sqrt[s(s−a)(s−b)(s−c)], s = (a+b+c)/2; altitude = 2 × area / a

All sides must satisfy the strict triangle inequality. The engine rearranges Heron’s formula after sorting side lengths for better stability in narrow triangles. Altitude is measured perpendicular to the first entered side.

PUTTING IT INTO PRACTICE

A worked example

Sides 3, 4, and 5 m have perimeter 12 m and area 6 m². The altitude to the 3 m side is 4 m.

How to interpret your result

A narrow triangle can have a large perimeter and small area; the first side controls which altitude is shown.

Assumptions and limitations

Use the units, timing, and bounds stated beside the inputs. Example values are hypothetical; replace them with your own.

Degenerate triangles are rejected. No angles, ambiguous side-angle cases, or construction tolerances.