Skip to main content

Triangle

Calculate area of a triangle.

a = ?h = ?

Triangle Guide

A triangle is one of the basic polygons in geometry, defined by three sides and three interior angles.The sum of interior angles in any triangle always equals 180 degrees. Triangles can be classified in different ways: by side length (equilateral, isosceles, scalene) or by angle measure (acute, right, obtuse).

The area of a triangle is calculated by multiplying the base by the height and dividing by two.The formula P = (a × h) / 2 is the most commonly used in practice.Height is the distance from the opposite vertex to the base, measured at a right angle to the base.In an equilateral triangle, all sides are equal, and height can be calculated as h = (a√3) / 2.

The Pythagorean theorem applies to right triangles.In a right triangle, the sum of the squares of the legs equals the square of the hypotenuse: a² + b² = c².This is one of the most important theorems in geometry, applied in construction, navigation,physics, and many other fields. The legs are the sides adjacent to the right angle,and the hypotenuse is the longest side opposite the right angle.

Types of triangles. An equilateral triangle has three equal sides and three 60-degree angles.An isosceles triangle has two equal sides (legs) and two equal angles at those sides.A scalene triangle has all sides of different lengths.An acute triangle has all angles less than 90 degrees,a right triangle has one angle equal to 90 degrees,and an obtuse triangle has one angle greater than 90 degrees.

The same 12 cm of perimeter can enclose 6.93 cm² or 0.59 cm²

Perimeter does not determine area. Three sides adding to 12 can enclose almost seven square centimetres or almost nothing, depending only on how evenly the length is shared out. The equilateral triangle is the maximum, and every step away from it costs area — quickly, and then catastrophically.

How it works

  • Finds the area from three sides using Heron's formula, with no need for a height.
  • Checks the triangle inequality first, since three arbitrary lengths often cannot form a triangle at all.
  • Handles the base-and-height case too, which is the easier input when you have it.
Heron:  s = (a + b + c) ÷ 2
        area = √(s(s−a)(s−b)(s−c))

base and height:  area = ½ × base × height

triangle inequality: each side must be shorter than the other two combined
otherwise no triangle exists and Heron returns a negative under the root

Worked example

Five triangles, all with a perimeter of exactly 12.

  1. 4, 4, 4 → area 6.928 (equilateral, the maximum)
  2. 3, 4, 5 → area 6.000 (right-angled)
  3. 5, 5, 2 → area 4.899
  4. 5.5, 5.5, 1 → area 2.739
  5. 5.9, 5.9, 0.2 → area 0.590

Identical perimeter throughout, and the area falls by more than 90% from first to last. As one side shrinks toward zero the triangle flattens into a line, and the enclosed area goes with it.

Reading the result

  • The equilateral case being the maximum is a general result, not a coincidence of these numbers. For any fixed perimeter the most even division of length encloses the most area, which is the same principle that makes a circle the best shape of all.
  • Heron's formula is worth knowing because it needs no angle and no height. Three tape-measure readings are enough, which is why it survives in surveying and construction where measuring a perpendicular height is awkward.
  • The triangle inequality is a real constraint, not a formality. Sides of 3, 4 and 8 cannot form a triangle because 3 + 4 is less than 8, and Heron signals this by producing a negative value under the square root.
  • Near-degenerate triangles are numerically unstable. When one side approaches the sum of the other two, small measurement errors swing the computed area wildly, so treat a very thin triangle's area as approximate however many decimals appear.

Common questions

Can I find the area from the perimeter alone?
No, and this guide is the reason why. A perimeter of 12 admits areas from 6.928 down to arbitrarily close to zero. You need the three sides individually, or a base and a height.
Why does my calculation fail for 3, 4 and 8?
Because those lengths cannot close into a triangle. Two sides must always exceed the third, and 3 + 4 = 7 is less than 8. Laid out physically the short sides cannot reach across, and Heron's formula reports it as a negative under the root.