acalculator

What is the area of a triangle?

Pick what you know about the triangle and type it. The area of a triangle calculator shows the area as you type, with the perimeter and a drawing when the shape is fixed.

Your numbers

Units
Area
14.696938

The triangle has an area of 14.696938.

Perimeter
18
Side a
5
Side b
6
Side c
7

Area: 14.696938. The triangle has an area of 14.696938.

What does the triangle look like?

How to calculate

Finds the area of a triangle from its base and height, three sides (Heron’s formula), two sides and the angle between them, two angles and a side, or three corner points.

Example with the default inputs (What do you know? Three sides, Side a 5, Side b 6, Side c 7): The triangle has an area of 14.696938.

Method: A = ½ × base × height; from three sides, Heron’s formula √(s(s − a)(s − b)(s − c)); from two sides and the angle between them, ½ab sin C.

  • Lengths are positive numbers in any one unit; the area is in that unit squared.
  • Angles are more than 0° and less than 180°, in degrees or radians.
  • Corner points are read exactly as typed (0.1 is 1/10), so their area is exact before rounding.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. What do you know? Base and height, Base 10, Height 8 gives Area 40.Source: OpenStax, Prealgebra 2e, §9.4, area of a triangle (https://openstax.org/books/prealgebra-2e/pages/9-4-use-properties-of-rectangles-triangles-and-trapezoids)
  2. What do you know? Three sides, Side a 5, Side b 6, Side c 7 gives Area 14.696938, Perimeter 18.
  3. What do you know? Sides a, b and angle C, Side a 5, Side b 6, Angle C 60° gives Area 12.990381, Side c 5.567764.
  4. What do you know? Angles A, B and side c, Angle A 45°, Angle B 60°, Side c 7 gives Area 15.532378.
  5. What do you know? Three corner points, x₁ 0, y₁ 0, x₂ 4, y₂ 0, x₃ 0, y₃ 3 gives Area 6, Perimeter 12, Side a 5.
  6. What do you know? Three corner points, x₁ 0.1, y₁ 0.2, x₂ 0.4, y₂ 0.2, x₃ 0.1, y₃ 0.6 gives Area 0.06.

How it works

Pick what you know:

What you knowYou typeArea
Base and heightbase b, height hA = ½ × b × h
Three sidesa, b, cHeron: A = √(s(s − a)(s − b)(s − c)), s = (a + b + c) ÷ 2
Two sides and the angle between thema, b, and angle CA = ½ab sin C
Two angles and the side between themangles A and B, side cC = 180° − A − B, then A = c² sin A sin B ÷ (2 sin C)
Three corner points(x₁, y₁), (x₂, y₂), (x₃, y₃)A = ½ |(x₂ − x₁)(y₃ − y₁) − (x₃ − x₁)(y₂ − y₁)|

For every method except base and height, the calculator also shows the three sides and the perimeter a + b + c, and draws the triangle:

  • Two sides and an angle: the third side by the law of cosines, c² = a² + b² − 2ab cos C.
  • Two angles and a side: the other sides by the law of sines, a = c sin A ÷ sin C and b = c sin B ÷ sin C.
  • Corner points: side a runs from corner 2 to corner 3, b from corner 1 to corner 3, and c from corner 1 to corner 2, each by the distance formula √(Δx² + Δy²).

Accuracy

  • Heron's formula runs in Kahan's rearranged form (the sides sorted a ≥ b ≥ c, then ¼√((a + (b + c))(c − (a − b))(c + (a − b))(a + (b − c)))), which keeps its accuracy for thin triangles. The third side from two sides and an angle uses √((a − b)² + 4ab sin²(C/2)), equal to the law of cosines. The third angle from two angles uses π to more digits than a 64-bit float. These are the same values as the textbook formulas, computed with less rounding.
  • For three sides, two sides and an angle, or two angles and a side, the sides are first divided by an exact power of two, so a triangle is worked out whenever its values fit a 64-bit float, however large or small.
  • Corner points are read exactly as their decimals (0.1 is 1/10), and the shoelace sum is exact, so the area is exact before it is rounded to show.

Rules and messages

  • Three sides where one is as long as the other two together, or longer: "The three sides cannot make a triangle: each side must be shorter than the other two together."
  • Two angles that add up to 180° or more, or to within one part in 10¹² of 180°: "These two angles add up to 180° or more, so they cannot be in one triangle."
  • Three points on one straight line (a shoelace sum of exactly 0): "The three points are on one straight line, so they do not make a triangle."
  • A triangle with a value beyond what a 64-bit float can hold (above about 1.8 × 10³⁰⁸), or an area below 2.2250738585072014 × 10⁻³⁰⁸: "This triangle is too large or too small to work out."

Assumptions

  • Lengths and coordinates are in any one unit; the area is in that unit squared.
  • Angles are more than 0° and less than 180°, typed in degrees or radians.
  • Answers show at most 6 decimals, or 6 significant figures below 0.0001, rounded half up on the decimal value.
  • With base and height, the shape of the triangle is not fixed (the top corner can be anywhere along a line), so there is no drawing, sides, or perimeter.

Worked examples by hand

Base 10, height 8. A = ½ × 10 × 8 = 40.

Sides 5, 6, 7. s = (5 + 6 + 7) ÷ 2 = 9. A = √(9 × 4 × 3 × 2) = √216 = 6√6 = 14.696938. The perimeter is 18.

Sides 5 and 6 with 60° between them. A = ½ × 5 × 6 × sin 60° = 15 × 0.866025 = 12.990381. The third side is √(25 + 36 − 60 × 0.5) = √31 = 5.567764.

Angles 45° and 60° with side 7 between them. C = 180° − 45° − 60° = 75°. A = 7² × sin 45° × sin 60° ÷ (2 × sin 75°) = 49 × 0.707107 × 0.866025 ÷ 1.931852 = 15.532378.

Corners (0, 0), (4, 0), (0, 3). A = ½ × |(4 − 0)(3 − 0) − (0 − 0)(0 − 0)| = ½ × 12 = 6. The sides are 5, 3, and 4, so the perimeter is 12.

Corners (0.1, 0.2), (0.4, 0.2), (0.1, 0.6). Read exactly: A = ½ × |0.3 × 0.4 − 0 × 0| = 0.06.

Other questions people ask

What is the formula for the area of a triangle?

Area = ½ × base × height. The height is the distance from the base to the opposite corner, measured at a right angle to the base. A triangle with a base of 10 and a height of 8 has an area of ½ × 10 × 8 = 40.

How do I find the area of a triangle with three sides?

Use Heron’s formula. Work out half the perimeter, s = (a + b + c) ÷ 2, then area = √(s(s − a)(s − b)(s − c)). For sides 5, 6, and 7: s = 9, and the area is √(9 × 4 × 3 × 2) = √216 = 14.70.

How do I find the area from two sides and an angle?

When the angle is between the two sides, area = ½ab sin C. Sides 5 and 6 with 60° between them give ½ × 5 × 6 × sin 60° = 12.99.

How do I find the area of a triangle from coordinates?

Use the shoelace formula: area = ½ |(x₂ − x₁)(y₃ − y₁) − (x₃ − x₁)(y₂ − y₁)|. The corners (0, 0), (4, 0), and (0, 3) give ½ × |4 × 3 − 0 × 0| = 6.

Does it matter which side I call the base?

No. Any side can be the base, as long as the height is measured to that side. A long base goes with a short height and a short base with a tall height, and the product is the same.

Why do my three sides give no area?

They do not make a triangle. Each side must be shorter than the other two together. Sides 3, 4, and 8 cannot meet, and 3, 4, and 7 lie flat with no area.

What units is the area in?

The square of the unit of the lengths: sides in centimetres give an area in square centimetres (cm²), and sides in feet give square feet. Use one unit for every length.