
Triangle Calculator
Triangle calculator: enter any three sides or angles, including at least one side, to solve the sides, angles, area, perimeter, heights and medians.
Written by
Sophie Clipton
Updated
There was an error with your calculation.
| EQUILATERAL ACUTE TRIANGLE | |||
|---|---|---|---|
| Side a | 5 | Angle A | 60° = 1.047198 rad |
| Side b | 5 | Angle B | 60° = 1.047198 rad |
| Side c | 5 | Angle C | 60° = 1.047198 rad |
| Area | 10.82532 | Height ha | 4.330127 |
| Perimeter p | 15 | Height hb | 4.330127 |
| Semiperimeter s | 7.5 | Height hc | 4.330127 |
| Median ma | 4.330127 | Inradius r | 1.443376 |
| Median mb | 4.330127 | Circumradius R | 2.886751 |
| Median mc | 4.330127 | ||
Triangle calculator at a glance#
What can the triangle calculator solve?#
By entering any three values of a triangle, with at least one being a side, the calculator determines the rest. It provides all three sides, all three angles in degrees and radians, the area, the perimeter and semiperimeter, the three heights, the three medians, the inradius, and the circumradius. It also identifies the triangle type, such as scalene acute.
How do you find a missing side of a triangle?#
The method depends on the information you have. With two sides and the included angle, you can use the law of cosines. If you have two angles and a side, the law of sines is the tool to use. For a right triangle with two known sides, the Pythagorean theorem is faster. The calculator automatically selects the appropriate rule based on the values you input.
Can angles of 13°, 20°, and 147° make a triangle?#
Yes, they can. They sum to 180°, and since each angle is above 0°, they form a valid triangle. It is obtuse because 147° is wider than 90°. However, angles alone don't determine the size. Enter two of the angles plus one side.
How a triangle is labeled#
A triangle consists of three sides and three angles. Common labels pair each side with the opposite angle: side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C. The calculator follows these labeling conventions.
Two rules apply to every triangle. First, the sum of the three angles is 180°. Second, every two sides combined are longer than the third, which is known as the triangle inequality. The sides 3, 4, and 8 don't satisfy this, as 3 + 4 = 7 is shorter than 8, so no such triangle can exist, and the calculator will show an error.
The example on this page features a triangle with sides a = 13, b = 14, and c = 15. Its calculations are unusually neat, so every step is easy to check.
What three values do you need?#
To define a triangle, you need three values, with at least one being a side length. The combinations have concise names, where S stands for a side and A for an angle, and each one points to the rule that solves it.
| Case | What You Know | Rule | Triangles |
|---|---|---|---|
| SSS | Three sides | Law of cosines | One, if every two sides together are longer than the third |
| SAS | Two sides and the angle between them | Law of cosines | One |
| ASA | Two angles and the side between them | Law of sines | One, if the two angles add up to less than 180° |
| AAS | Two angles and a side not between them | Law of sines | One, if the two angles add up to less than 180° |
| SSA | Two sides and an angle not between them | Law of sines | Zero, one or two (the calculator returns one) |
| AAA | Three angles | None | The shape only, never the size |
Solving from three sides: the law of cosines#
The law of cosines connects all three sides with one angle. OpenStax Algebra and Trigonometry 2e states it as a² = b² + c² − 2bc × cos A, where A is the angle opposite side a. Rearranged for the angle:
cos A = (b² + c² − a²) ÷ (2bc)
For the 13, 14, 15 triangle:
- cos A = (14² + 15² − 13²) ÷ (2 × 14 × 15) = 252 ÷ 420 = 0.6, so A = arccos 0.6 ≈ 53.13°.
- cos B = (13² + 15² − 14²) ÷ (2 × 13 × 15) = 198 ÷ 390, so B ≈ 59.49°.
- C = 180° − 53.13° − 59.49° = 67.38°.

The same law handles two sides and the angle between them, the SAS case. With b = 14, c = 15 and A = 53.13°, a² = 196 + 225 − 2 × 14 × 15 × 0.6 = 421 − 252 = 169, so a = 13.
Solving with two angles: the law of sines#
When you know two angles, you can find the third by subtracting both from 180°. The law of sines helps in finding the missing sides. It states that each side divided by the sine of its opposite angle gives the same value:
a ÷ sin A = b ÷ sin B = c ÷ sin C
Let's say you have a = 13, A = 53.13°, and B = 59.49°. Then the calculation for C would be 180° minus 53.13° and 59.49°, giving you C = 67.38°. Using the equation a ÷ sin A = 13 ÷ 0.8, you get 16.25. To find b and c, multiply 16.25 by sin B and by sin C, which gives b ≈ 14.00 and c ≈ 15.00. The shared ratio, 16.25, is also the diameter of the circle that passes through all three vertices, implying that the circumradius is given by 16.25 ÷ 2, which equals 8.125.
The ambiguous case: two sides and an angle not between them#
When you have two sides and an angle that isn't between them, often referred to as the SSA case, you're dealing with what OpenStax calls the ambiguous case. This setup can give two different triangles, one triangle, or none at all. Consider a triangle with sides a = 13, b = 14, and angle A = 53.13°. Imagine side a starting at the vertex where sides b and a meet, then swinging down to intersect the third side. At a length of 13, side a can land in two distinct places:
- You might find c = 15, which gives a triangle with sides 13, 14, 15 and angle B approximately 59.49°.
- Alternatively, c could be 1.8, forming a narrow triangle with angles B approximately 120.51° and C approximately 6.36°.

The calculator defaults to the solution where the unknown angle B is acute. Here, that means c = 15. Should you need the other angle, you subtract the acute angle from 180° to get B around 120.51°, then solve again using the two resulting angles and one side. When side a is less than b multiplied by the sine of angle A (here this is 14 × 0.8 = 11.2), it can't reach the third side, and the calculator will display an error.
Area of a triangle, three ways#
You can calculate the area of a triangle in three different ways, all of which provide an area of 84 for the example triangle.
- One approach is using the base and height: area equals the base times height divided by 2. Here, the height related to side b is 12, so the area is 14 × 12 ÷ 2 = 84.
- Another method uses two sides and the angle between them: the formula here is a × b × sin C ÷ 2, which works out to 13 × 14 × sin 67.38° ÷ 2 ≈ 84. This is the formula the calculator uses.
- Heron's formula requires only the three sides. First, find the semiperimeter: s = (13 + 14 + 15) ÷ 2 = 21. Then apply the formula: area = √(s(s − a)(s − b)(s − c)) = √(21 × 8 × 7 × 6) = √7,056 = 84.
These calculations can also apply to land measurement. A triangular plot with sides measuring 130, 140, and 150 feet will have an area totaling 8,400 square feet. According to NIST, an acre measures 43,560 square feet, so this plot is 8,400 ÷ 43,560 ≈ 0.193 acre.
Heights, medians and the two circles#
The calculator also provides the lengths that are useful when you're building, drawing, or checking a triangle.
- Heights run from each corner to the line of the opposite side, perpendicular to that side. The formula is height = 2 × area ÷ that side. So, the height to side b is 2 × 84 ÷ 14 = 12. For side a, it's about 12.92, and for side c, it's 11.2.
- Medians extend from a corner to the midpoint of the opposite side. In this triangle, they measure approximately 12.97, 12.17, and 11.24.
- The incircle, the largest circle that can fit inside, has a radius r = area ÷ s = 84 ÷ 21 = 4.
- The circumcircle, the circle passing through all three corners, has a radius R = abc ÷ (4 × area) = 2,730 ÷ 336 = 8.125. This circle's area and circumference can be found using the circle calculator.
Triangle types#
The calculator labels the triangle based on its sides and its largest angle. When all three sides are equal, the triangle is equilateral. It's isosceles when two sides are equal, and scalene when none are equal. By angles, a triangle is acute when every angle is less than 90°, right when one angle is exactly 90°, and obtuse when one angle exceeds 90°.
You can determine the type without calculating angles. Square the longest side and compare it to the sum of the squares of the other two sides, the test the Pythagorean theorem calculator page walks through. When these values match, the triangle is right, and the right triangle calculator uses trigonometry to solve it.
Sources#
- OpenStax, Algebra and Trigonometry 2e, section 10.1: Non-right Triangles: Law of Sines
- OpenStax, Algebra and Trigonometry 2e, section 10.2: Non-right Triangles: Law of Cosines
- NIST, Revised Unit Conversion Factors (acre = 43,560 square feet)
Frequently asked questions#
Can a triangle have two right angles?#
No. Two right angles already add up to 180°, which leaves nothing for the third angle. Every triangle has at least two acute angles.
How do you find the third angle of a triangle?#
To find the third angle of a triangle, take the two angles you already know and subtract them from 180°. This is because the total of all three angles in a triangle is always 180°. So, if you have angles of 53.13° and 59.49°, the third angle can be calculated as 180° − 53.13° − 59.49° = 67.38°. Remember, knowing the angles only determines the shape. You'll still need at least one side length to calculate the sides themselves.
Why can't three angles solve a triangle?#
Three angles determine the shape of a triangle but not its size. A triangle with angles of 53.13°, 59.49°, and 67.38° can have sides of 13, 14, and 15, or 130, 140, and 150, or any other proportional values. This is the reason the calculator requires at least one side to be specified.
How do you find the height of a triangle?#
To find the height, divide twice the area by the base of the triangle: height = 2 × area ÷ base. For the triangle with sides 13, 14, 15, the height corresponding to the base of 14 is 2 × 84 ÷ 14 = 12. If the area isn't known yet, calculate it first using Heron's formula.
What's the difference between a median and a height?#
Height and median serve different purposes. A height intersects the opposite side at a right angle, while a median cuts it at its midpoint. These lines coincide only when the two sides adjacent to that angle are identical, as seen in isosceles or equilateral triangles.