Triangle Calculator

Math

Choose what you know: three sides, two sides and the angle between them, or two angles and the side between them. The calculator fills in every missing side and angle and shows the area, the perimeter and the three heights.

What do you know?

The side opposite angle A. Use any unit; the area comes out in that unit squared.

The side opposite angle B.

The side opposite angle C. In ASA it is the side between angles A and B.

Use a period for decimals, like 12.5. Commas for thousands are fine. The result updates as you type.Decimals with a period, like 12.5

Your entries stay on your device. The math runs right in your browser.

Result: Area

6

The triangle with sides 3, 4 and 5 has an area of 6 and is a right triangle.

  • Side a: 3
  • Side b: 4
  • Side c: 5
  • Angle A: 36.8699°
  • Angle B: 53.1301°
  • Angle C: 90°
  • Perimeter: 12
  • Height to side a: 4
  • Height to side b: 3
  • Height to side c: 2.4
  • Type of triangle: a right triangle

Step by step

Area = ½ · 4 · 5 · sin 36.8699° = 6

  1. Angles from the law of cosines, for example cos A = (b² + c² − a²) / (2bc): A = 36.8699°, B = 53.1301° and C = 90°. The triangle is a right triangle.
  2. Area: ½ · 4 · 5 · sin 36.8699° = 6. Perimeter: 3 + 4 + 5 = 12.
  3. Heights from h = 2 · Area / side: to side a 4, to side b 3, to side c 2.4.

Formula

a² = b² + c² − 2bc · cos A
Area = ½ · b · c · sin A
ha = 2 · Area / a
a, b, c
the sides of the triangle, all in the same unit
A, B, C
the angles opposite sides a, b and c, adding up to 180°
Area
the area of the triangle, in the unit of the sides squared
ha
the height to side a: the perpendicular distance from the opposite corner

How it works

A triangle is fixed once you know three suitable pieces. This calculator handles the three cases you meet most often. With SSS you know all three sides. With SAS you know two sides and the angle between them. With ASA you know two angles and the side between them. The labels follow the usual convention: side a is opposite angle A, side b is opposite angle B and side c is opposite angle C. The three angles always add up to 180 degrees.

From three sides, the law of cosines gives each angle. With SAS, the calculator first finds the third side with the law of cosines and then the other angles. With ASA, the third angle is 180 degrees minus the other two, and the law of sines gives the two missing sides. Then it works out the area, the perimeter and the three heights. For a right triangle, choose SAS, enter the two legs as sides b and c and set angle A to 90 degrees; side a is then the hypotenuse. The 45-45-90 and 30-60-90 triangles work in ASA mode.

Not every set of numbers makes a triangle. Three sides fit together only when each one is shorter than the other two added up, and two angles must total less than 180 degrees. Otherwise the calculator shows a message instead of a result. The sides can be in any unit, such as feet, inches or meters, as long as they all use the same one. The area is then in that unit squared, so sides in feet give square feet. The case of two sides and an angle that is not between them (SSA) can have two answers, one or none, so it is not included. For circles use the circumference calculator, and for rectangles the square footage calculator.

The formula

The law of cosines extends the Pythagorean theorem. When angle A is a right angle, cos A is zero and a² = b² + c². The law of sines says that the ratio of a side to the sine of its opposite angle is the same for all three sides.

The area comes from two sides and the angle between them. It matches the familiar base times height divided by 2, because the height to side c is b · sin A. The other heights follow from h = 2 · Area / side. Angles are entered and shown in degrees, and results are rounded to four decimals for display.

Example

A triangular flower bed has sides of 6 ft, 8 ft and 10 ft. What are its angles and area?

  1. Angle C from the law of cosines: cos C = (6² + 8² − 10²) / (2 · 6 · 8) = 0, so C = 90° and the triangle is a right triangle.
  2. The other angles: A = 36.8699° and B = 53.1301°.
  3. Area: ½ · 8 · 10 · sin A = 24 square feet. Perimeter: 24 feet. Height to the longest side: 4.8 feet.

The triangle with sides 6, 8 and 10 has an area of 24 and is a right triangle.

Load this example into the calculator

Frequently asked questions

How do you find the area of a triangle?

Multiply the base by the height and divide by 2. A triangle with a base of 6 ft and a height of 4 ft has an area of 12 square feet. If you only know the three sides, use Heron's formula or this calculator in SSS mode: sides 13, 14 and 15 give an area of 84.

How do you find an angle of a triangle?

If two angles are known, subtract their sum from 180 degrees to get the third. If you know all three sides, the law of cosines gives any angle: cos A = (b² + c² − a²) / (2bc). The SSS mode of the calculator does this for all three angles at once.

How do you calculate the perimeter of a triangle?

Add the three sides: perimeter = a + b + c. A triangle with sides 3, 4 and 5 has a perimeter of 12. If a side is missing, the calculator first finds it from the angles you entered and then adds all three.

How do you calculate the height of a triangle?

Divide twice the area by the side the height stands on: h = 2 · Area / side. For sides 6, 8 and 10 the area is 24, so the height to the side of 10 is 2 · 24 / 10 = 4.8. The calculator shows the height to all three sides.

How do I solve a right triangle with this calculator?

Choose SAS, enter the two legs as sides b and c, and set angle A to 90 degrees. Side a is the hypotenuse: legs 5 and 12 give a hypotenuse of 13. If you know the hypotenuse and the two acute angles instead, use ASA, where side c is the hypotenuse. If you know the hypotenuse and one leg, the other leg is √(hypotenuse² − leg²), for example √(13² − 5²) = 12; then enter the two legs in SAS mode.

How do 45-45-90 and 30-60-90 triangles work here?

Use ASA mode and enter the hypotenuse as side c. With angles of 45 and 45 degrees and c = 10, each leg is 7.0711 and the area is 25. With 30 and 60 degrees and c = 10, the legs are 5 and 8.6603. The sides follow the ratios 1 : 1 : √2 and 1 : √3 : 2.

Why do the sides 1, 2 and 3 not make a triangle?

Each side must be shorter than the other two added together. Here 1 + 2 is exactly 3, so the three corners fall on one straight line. This rule is called the triangle inequality, and the calculator shows a message when your sides break it.

What unit does the calculator use?

Any unit you like, as long as all sides use the same one. The area comes out in that unit squared: sides in feet give square feet. To change square feet to acres, divide by 43,560. Angles are always in degrees.

Why is there no mode for two sides and an angle that is not between them?

That case, called SSA, can have two different triangles, exactly one or none, depending on the numbers, so a single answer would be misleading. Add the missing information, or use SAS when the angle sits between the two sides.

What is the difference between an acute, a right and an obtuse triangle?

An acute triangle has three angles below 90 degrees, a right triangle has one angle of exactly 90 degrees and an obtuse triangle has one angle above 90 degrees. The calculator names the type from the largest angle.

How do I use the calculator for an isosceles or equilateral triangle?

Enter the equal sides twice in SSS mode. An isosceles triangle has two equal sides, and the angles opposite them are equal too: sides 5, 5 and 6 give angles of about 53.13, 53.13 and 73.74 degrees and an area of 12. An equilateral triangle has three equal sides and three angles of 60 degrees: sides of 10 give an area of about 43.3013 (√3 / 4 × 10²) and a height of about 8.6603 to each side.

Last updated: Responsible editor: Jared Alan
Checked against 24 test cases · How we test