Math
Triangle Calculator
Enter the measurements you know and get every missing side and angle, plus area, perimeter and the triangle's type.
Calculation inputs
Angles are in degrees. Only the fields used by the chosen method are read.
Results
No result yet
Complete the fields and select Calculate to show results here.
About this calculator
This calculator solves a triangle from the measurements you already have, filling in every missing side and angle and then reporting area, perimeter and the triangle's type. It is useful for geometry coursework, trigonometry practice and practical layout work.
How the calculation works
- Law of cosines: c² = a² + b² − 2ab·cos C
- Law of sines: a / sin A = b / sin B = c / sin C
- Heron's area: √(s(s−a)(s−b)(s−c)), s = half the perimeter
Notes and assumptions
Units are whatever you enter — area comes out in the same unit squared.
How it works in plain English
A triangle is fully determined by three suitable pieces of information. The tool supports three common starting points: all three sides, two sides with the angle between them, or two angles with the side between them. Sides are labeled a, b and c, and each angle takes the capital letter of the side opposite it.
With three sides, the law of cosines rearranges to give each angle from the side lengths. With two sides and the included angle, the law of cosines first finds the third side, and the remaining angles follow. With two angles and the side between them, the third angle is simply 180 degrees minus the other two, and the law of sines scales the known side to find the others.
Once all sides are known, Heron's formula gives the area from half the perimeter. The tool also classifies the triangle by its sides, as equilateral, isosceles or scalene, and by its largest angle, as acute, right or obtuse. It lists the height to side c and the radii of the inscribed and circumscribed circles too. If three sides cannot physically close into a triangle, the tool explains why rather than returning a meaningless answer.
The formula
- Law of cosines: c² = a² + b² − 2ab·cos(C)
- Law of sines: a ÷ sin(A) = b ÷ sin(B) = c ÷ sin(C)
- Heron's area = √(s(s − a)(s − b)(s − c)), where s = (a + b + c) ÷ 2
Worked example
Suppose a triangle has sides of 5, 6 and 7 units. First check that it can exist: each pair of sides adds to more than the third, so it does.
Half the perimeter, s, is (5 + 6 + 7) ÷ 2 = 9. Heron's formula gives the area as the square root of 9 × 4 × 3 × 2, which is the square root of 216, or about 14.70 square units. The perimeter is 18 units.
For angle A, the law of cosines gives cos(A) = (36 + 49 − 25) ÷ (2 × 6 × 7) = 60 ÷ 84 ≈ 0.714, so A ≈ 44.42°. The same method gives B ≈ 57.12°, and C = 180 − 44.42 − 57.12 ≈ 78.46°. All sides differ and the largest angle is under 90°, so the triangle is scalene and acute.
Triangle types at a glance
| Type | Defining property |
|---|---|
| Equilateral | All three sides equal; every angle is 60° |
| Isosceles | Two sides equal; the angles opposite them are equal |
| Scalene | No sides equal |
| Right | One angle is exactly 90° |
| Acute | All angles are less than 90° |
| Obtuse | One angle is greater than 90° |
Standard Euclidean geometry definitions.
Frequently asked questions
Which measurements do I need?
You need three pieces of information, and at least one must be a side so the size is fixed. This tool accepts three sides, two sides with the angle between them, or two angles with the side between them. Three angles alone describe a shape but not its size, so they cannot produce lengths or area.
Why does it say my sides cannot form a triangle?
For three lengths to close into a triangle, any two of them must add up to more than the third. This is called the triangle inequality. Lengths such as 2, 3 and 6 fail because 2 plus 3 is less than 6, so the short sides could never meet. Recheck the measurements and try again.
What units does the calculator use?
It works with any unit you choose, as long as all sides use the same one. Enter feet, meters or centimeters, and the perimeter comes out in that unit while the area comes out in that unit squared. Angles are always entered and shown in degrees rather than radians.
What is Heron's formula?
Heron's formula calculates a triangle's area using only its three side lengths, without needing a height. You first find s, half of the perimeter, then multiply s by its difference from each side and take the square root. It is named after Hero of Alexandria, who described it nearly two thousand years ago.
How is a right triangle detected?
After solving all three angles, the tool checks whether the largest one equals 90 degrees within a tiny rounding tolerance. If so, the triangle is labeled right, and its sides will satisfy the Pythagorean relationship. A largest angle above 90 degrees is labeled obtuse, and anything smaller is acute.
Helpful next steps
- Angle Converter — Convert angles between degrees, radians and gradians.
- Length Converter — Convert side lengths between units.
Related tools
Volume and surface area of a cube, box, cylinder, sphere, cone, or triangular prism.
Solve log base b of x, common log, natural log, and change of base.
Trig, logs, powers, roots, factorials, and memory.
Add, subtract, multiply, and divide fractions.