HomeGeometry › Triangle Area Calculator

Triangle Area Calculator

Computes the area of any triangle from base and height, from three sides (Heron's formula) or from two sides and their included angle in degrees, and reports which method was used.

When to use

You need the area of a triangle and know either its base and height, all three sides, or two sides and the angle between them.

Do not use when: You need the missing sides or angles as well (use triangle-solver), or the triangle is right-angled and you want all its parts (use right-triangle).

Formula

Method 1: area = base × height / 2. Method 2 (Heron): s = (side_a + side_b + side_c) / 2, area = √(s·(s − side_a)·(s − side_b)·(s − side_c)). Method 3: area = ½ · side_a · side_b · sin(included_angle_deg).

Inputs are checked in that order: base and height first, then three sides, then two sides with the included angle. Three sides must satisfy the triangle inequality.

Inputs

ParameterTypeUnitRequiredDescription
basenumberunitsnoLength of one side chosen as the base (method 1, with height). Range: > 0
heightnumberunitsnoPerpendicular distance from the base to the opposite vertex (method 1). Range: > 0
side_anumberunitsnoFirst side (methods 2 and 3). Range: > 0
side_bnumberunitsnoSecond side (methods 2 and 3). Range: > 0
side_cnumberunitsnoThird side (method 2, Heron's formula). Range: > 0
included_angle_degnumberdegreesnoAngle between side_a and side_b in degrees (method 3). Range: > 0

Outputs

OutputTypeUnitDescription
areanumberunits²Triangle area in the square of the input unit.
perimeternumberunitsSum of the three sides (only for the three-side and two-sides-plus-angle methods).
methodstringWhich of the three formulas was applied.

Example

Base 10, height 4: {"base":10,"height":4}{"area":20,"method":"Base × height / 2"}

Sides 7, 8, 9 (Heron): {"side_a":7,"side_b":8,"side_c":9}{"area":26.8328,"perimeter":24,"method":"Heron's formula (three sides)"}

Sides 5 and 7 with 60° between them: {"side_a":5,"side_b":7,"included_angle_deg":60}{"area":15.1554,"perimeter":18.245,"method":"Two sides and included angle (½·a·b·sin C)"}

GET https://tttkmbb.com/api/v1/calculate/triangle-area?base=10&height=4

Machine access

Sources

FAQ

Which height do I use?

The perpendicular distance from the chosen base to the opposite vertex, not the length of another side. For an obtuse triangle the foot of the height can lie outside the base.

Is the angle in degrees or radians?

Degrees. Convert radians with degrees = radians × 180 / π before entering them.

Why does Heron's formula return an error?

The three sides must satisfy the triangle inequality (each side shorter than the sum of the other two); otherwise no triangle exists.

Related calculators