△ Triangle Calculator
Solve SSS, SAS, ASA, AAS, and SSA triangles, including both ambiguous-case solutions.
Law of Cosines
a² = b² + c² − 2bc cos(A)
b² = a² + c² − 2ac cos(B)
Law of Sines
a/sin(A) = b/sin(B) = c/sin(C)
Area
K = ½bh
K = ½ab sin(C)
K = √(s(s−a)(s−b)(s−c))
Radii and medians
r = K/s
R = abc/(4K)
mₐ = ½√(2b² + 2c² − a²)
Angle sum
A + B + C = 180°
This triangle calculator solves any triangle when you enter three known values, at least one of which must be a side. Enter what you know, select the solve mode, and get all six values instantly: sides a, b, and c, and angles A, B, and C, along with area, perimeter, height, medians, inradius, and circumradius.
The calculator works with all five input combinations: SSS, SAS, ASA, AAS, and SSA. Each mode uses the correct law automatically and shows a step-by-step solution so you can follow the working, not just read the answer.
Below the tool you will find every formula used in the calculations, all five solve modes explained with worked examples, the SSA ambiguous case covered in full, a guide on when to use Law of Sines versus Law of Cosines, all four triangle centers, triangle inequality, congruence, and similarity. For hypotenuse and SOHCAHTOA calculations, see the right triangle calculator.
What Is a Triangle?
A triangle is a polygon with three sides and three interior angles. The three interior angles always add up to 180 degrees, no matter the shape or size of the triangle.
The six primary properties are sides a, b, and c, and angles A, B, and C. Each angle is opposite its matching side: angle A sits opposite side a, angle B opposite side b, and angle C opposite side c. A triangle with vertices at points A, B, and C is written as triangle ABC.
Types of Triangles by Side Length
Triangles are grouped into three types based on how their side lengths relate to each other.
- Equilateral triangle: All three sides are equal. All three angles are 60 degrees. It is the only triangle where every side and every angle is identical.
- Isosceles triangle: Exactly two sides are equal. The two angles opposite those equal sides, called the base angles, are also equal.
- Scalene triangle: All three sides are different lengths. All three angles are different. No sides or angles repeat.
On diagrams, tick marks on the sides indicate equal lengths. Matching arc marks at the vertices indicate equal angles.
Types of Triangles by Angle
The same triangle can be classified by its largest interior angle.
- Acute triangle: All three interior angles are less than 90 degrees.
- Obtuse triangle: One interior angle is greater than 90 degrees. The other two must both be acute.
- Right triangle: One interior angle is exactly 90 degrees. The side opposite the right angle is the hypotenuse.
A triangle cannot have more than one obtuse angle. If two angles were both greater than 90 degrees, their sum would already exceed 180 degrees, leaving nothing for the third.
Exterior Angles of a Triangle
An exterior angle is formed when one side of the triangle is extended beyond its vertex. The exterior angle and the interior angle at that vertex are supplementary: they add up to 180 degrees.
The exterior angle theorem states that any exterior angle of a triangle equals the sum of the two non-adjacent interior angles.
Formula: if the exterior angle is at vertex C, then exterior angle = A + B.
Worked example: if A = 40° and B = 65°, the exterior angle at C = 40 + 65 = 105°. You can verify this: the interior angle at C = 180 – 105 = 75°, and A + B + C = 40 + 65 + 75 = 180°. Everything checks out.
All three exterior angles of any triangle add up to 360 degrees.
How to Solve a Triangle
Solving a triangle means finding all three sides and all three angles from a given set of known values. You need at least three values, and at least one must be a side. Three angles alone are not enough because they only define the shape, not the size.
The five solve modes are SSS, SAS, ASA, AAS, and SSA. The right mode depends on which values you already have.
Which Solve Mode to Use
This is the question every textbook skips. Here is the answer in plain terms.
- SSS (three sides known): Use the Law of Cosines to find all angles.
- SAS (two sides, included angle): The angle sits between the two known sides. Use the Law of Cosines to find the third side, then Law of Sines for the remaining angles.
- ASA (two angles, included side): The side sits between the two known angles. Find the third angle first (180 minus the other two), then use Law of Sines for both remaining sides.
- AAS (two angles, non-included side): The side is not between the two known angles. Same process as ASA: third angle first, then Law of Sines.
- SSA (two sides, non-included angle): The angle is opposite one of the known sides. Use Law of Sines, but check carefully for the ambiguous case.
Rule of thumb: when sides dominate your known values, start with the Law of Cosines. When angles dominate, start with the Law of Sines.
SSS: Three Sides Known
When all three sides are known, use the Law of Cosines to find each angle.
- A = arccos((b² + c² – a²) / (2bc))
- B = arccos((a² + c² – b²) / (2ac))
- C = 180° – A – B
Worked example: a = 3, b = 4, c = 5.
- A = arccos((16 + 25 – 9) / 40) = arccos(0.8) = 36.87°
- B = arccos((9 + 25 – 16) / 30) = arccos(0.6) = 53.13°
- C = 180 – 36.87 – 53.13 = 90°
This is the 3-4-5 triangle, a Pythagorean triple. The SSS mode confirms it is a right triangle.
SAS: Two Sides and the Included Angle
The included angle sits directly between the two known sides. Use the Law of Cosines to find the missing side, then Law of Sines for the remaining angles.
Formula: c = √(a² + b² – 2ab·cos(C))
Worked example: a = 9, b = 7, C = 30°.
- c = √(81 + 49 – 2 × 9 × 7 × cos(30°)) = √(130 – 109.1) = √20.9 = 4.57
- A = arccos((b² + c² – a²) / (2bc)) = arccos((49 + 20.9 – 81) / (2 × 7 × 4.57)) = 83.6°
- B = 180 – 30 – 83.6 = 66.4°
ASA: Two Angles and the Included Side
Find the third angle first by subtracting the two known angles from 180. Then use the Law of Sines to find both remaining sides.
Worked example: A = 45°, B = 75°, b = 10.
- C = 180 – 45 – 75 = 60°
- a = b × sin(A) / sin(B) = 10 × sin(45°) / sin(75°) = 10 × 0.707 / 0.966 = 7.32
- c = b × sin(C) / sin(B) = 10 × sin(60°) / sin(75°) = 10 × 0.866 / 0.966 = 8.97
AAS: Two Angles and a Non-Included Side
The process is the same as ASA. Find the third angle from the angle sum, then apply the Law of Sines. The difference is that the known side is not between the two known angles.
Worked example: A = 45°, B = 60°, a = 8 (side a is opposite angle A, not between A and B).
- C = 180 – 45 – 60 = 75°
- b = a × sin(B) / sin(A) = 8 × sin(60°) / sin(45°) = 8 × 0.866 / 0.707 = 9.8
- c = a × sin(C) / sin(A) = 8 × sin(75°) / sin(45°) = 8 × 0.966 / 0.707 = 10.93
SSA: The Ambiguous Case
SSA is the most misunderstood solve mode. You know two sides and an angle that is not between them. Depending on the values, this can produce no triangle, one triangle, or two completely different triangles.
Let side a be opposite the known angle A, and side b be the other known side. Calculate sin(B) = b × sin(A) / a, then check:
- sin(B) greater than 1: No triangle exists. The given values are geometrically impossible.
- sin(B) equals 1: Exactly one triangle exists. Angle B = 90°.
- sin(B) less than 1 and angle A is acute: Two triangles may exist. The first uses B = arcsin(sin(B)). The second uses B’ = 180° – B. Check that A + B’ is less than 180° before accepting the second solution.
- sin(B) less than 1 and angle A is obtuse: One triangle exists if a is greater than b. No triangle if a is less than or equal to b.
Worked example: a = 6, b = 8, A = 35°.
- sin(B) = 8 × sin(35°) / 6 = 8 × 0.574 / 6 = 0.765
- B = arcsin(0.765) = 49.9° (first solution)
- B’ = 180 – 49.9 = 130.1°. Check: A + B’ = 35 + 130.1 = 165.1°, which is less than 180°. Second solution is valid.
- Two triangles exist. The calculator above shows the acute solution first and flags when a second solution is possible.
The Laws Behind Triangle Calculations
Every triangle calculation in this tool relies on two laws and one theorem. Understanding what each one does, and when to reach for it, makes triangle problems much faster to work through by hand.
Law of Sines
The Law of Sines states that the ratio of each side to the sine of its opposite angle is constant across the whole triangle.
Formula: a / sin(A) = b / sin(B) = c / sin(C)
This ratio also equals 2R, where R is the circumradius of the triangle.
Use the Law of Sines when:
- You know two angles and any side (ASA or AAS).
- You know two sides and a non-included angle (SSA), keeping in mind the ambiguous case.
The formula can be rearranged to find an unknown angle: sin(A) = a × sin(B) / b. Take the arcsine of the result to get the angle.
Worked example: b = 2, B = 90°, C = 45°.
- c = b × sin(C) / sin(B) = 2 × sin(45°) / sin(90°) = 2 × 0.707 / 1 = 1.414
- A = 180 – 90 – 45 = 45°
- a = b × sin(A) / sin(B) = 2 × sin(45°) / 1 = 1.414
Law of Cosines
The Law of Cosines relates all three sides of a triangle to one of its angles. It is a generalization of the Pythagorean theorem that works for any triangle, not just right triangles.
The three forms of the formula:
- a² = b² + c² – 2bc·cos(A)
- b² = a² + c² – 2ac·cos(B)
- c² = a² + b² – 2ab·cos(C)
When the angle is 90°, cos(90°) = 0, so the formula simplifies to a² + b² = c². That is the Pythagorean theorem as a special case.
Use the Law of Cosines when:
- You know all three sides (SSS) and need to find the angles.
- You know two sides and the included angle (SAS) and need the third side.
Worked example: a = 8, b = 6, c = 10, find angle B.
- cos(B) = (a² + c² – b²) / (2ac) = (64 + 100 – 36) / 160 = 128 / 160 = 0.8
- B = arccos(0.8) = 36.87°
When to Use Law of Sines vs. Law of Cosines
This is the question that causes most confusion, and it has a clean answer.
- SSS (three sides): Law of Cosines. No angles known, so sines cannot help yet.
- SAS (two sides, included angle): Law of Cosines. The included angle is between the two sides.
- ASA (two angles, included side): Law of Sines. Two angles are already known.
- AAS (two angles, non-included side): Law of Sines. Same reason as ASA.
- SSA (two sides, non-included angle): Law of Sines, with a check for the ambiguous case.
Practical rule: if you have two sides and the angle between them, or three sides and no angles, reach for the Law of Cosines. In every other case, the Law of Sines is the faster route.
How to Calculate the Area of a Triangle
Three formulas cover every situation. Which one to use depends entirely on what values you already know.
Base and Height Formula
This is the most widely taught formula and the fastest to apply when the height is known.
Formula: Area = (1/2) × base × height
The base can be any of the three sides. The height is the perpendicular distance from the opposite vertex down to that base, not the length of the side itself. For a non-right triangle, the height line often falls outside the triangle when drawn to an obtuse angle’s base.
Worked example: base = 10, height = 6.
- Area = (1/2) × 10 × 6 = 30
If you know the area and the base, you can rearrange to find the height: h = 2 × Area / base.
SAS Area Formula
Use this when you know two sides and the angle between them, but not the height.
The formula uses the sine of the included angle to calculate the area directly, without needing the height.
All three versions of the formula:
- Area = (1/2) × a × b × sin(C)
- Area = (1/2) × b × c × sin(A)
- Area = (1/2) × a × c × sin(B)
Worked example: a = 9, b = 7, C = 30°.
- Area = (1/2) × 9 × 7 × sin(30°) = (1/2) × 9 × 7 × 0.5 = 15.75
When C = 90°, sin(90°) = 1, so the formula becomes Area = (1/2) × a × b, which is the standard right triangle area formula.
Heron’s Formula
Use Heron’s formula when you know all three side lengths but no angles and no height. It produces the area from sides alone.
Step 1: Calculate the semiperimeter.
- s = (a + b + c) / 2
Step 2: Apply the formula.
- Area = √(s × (s – a) × (s – b) × (s – c))
Worked example: a = 3, b = 4, c = 5.
- s = (3 + 4 + 5) / 2 = 6
- Area = √(6 × 3 × 2 × 1) = √36 = 6
Heron’s formula does not require knowing a single angle. It is the method to reach for when your starting point is three side lengths from a measurement or a SSS problem.
Triangle Perimeter and Height
Perimeter of a Triangle
The perimeter is the total length around the triangle. Add all three side lengths.
Formula: p = a + b + c
Worked example: a = 5, b = 7, c = 9.
- Perimeter = 5 + 7 + 9 = 21
- Semiperimeter s = 21 / 2 = 10.5
The semiperimeter, half the perimeter, appears in Heron’s formula and in the inradius calculation. It is denoted s throughout this page.
Height of a Triangle
Every triangle has three heights, one from each vertex down to the opposite side. Each height is the perpendicular distance from a vertex to the base it corresponds to.
Once the area is known, all three heights follow directly.
- h_a = 2 × Area / a
- h_b = 2 × Area / b
- h_c = 2 × Area / c
Worked example: Area = 30, a = 10, b = 12, c = 15.
- h_a = 2 × 30 / 10 = 6
- h_b = 2 × 30 / 12 = 5
- h_c = 2 × 30 / 15 = 4
A common mistake is confusing the height with a side length. The height is always perpendicular to the base. For an obtuse triangle, one or two of the heights fall outside the triangle when extended to meet the base line.
Median, Inradius, and Circumradius
Median of a Triangle
A median connects a vertex to the midpoint of the opposite side. Every triangle has three medians, one from each vertex. All three meet at a single point called the centroid.
Formula for each median:
- m_a = (1/2) × √(2b² + 2c² – a²)
- m_b = (1/2) × √(2a² + 2c² – b²)
- m_c = (1/2) × √(2a² + 2b² – c²)
Worked example: a = 3, b = 4, c = 5.
- m_a = (1/2) × √(2 × 16 + 2 × 25 – 9) = (1/2) × √(32 + 50 – 9) = (1/2) × √73 = 4.27
- m_b = (1/2) × √(2 × 9 + 2 × 25 – 16) = (1/2) × √(18 + 50 – 16) = (1/2) × √52 = 3.61
- m_c = (1/2) × √(2 × 9 + 2 × 16 – 25) = (1/2) × √(18 + 32 – 25) = (1/2) × √25 = 2.5
Inradius
The inradius is the radius of the largest circle that fits inside the triangle, touching all three sides. That circle is called the incircle, and its center is the incenter.
Formula: r = Area / s
Where s is the semiperimeter: s = (a + b + c) / 2.
Worked example: a = 3, b = 4, c = 5. Area = 6, s = 6.
- r = 6 / 6 = 1
A larger inradius relative to the semiperimeter indicates a more compact, rounder triangle. A very flat or elongated triangle has a small inradius.
Circumradius
The circumradius is the radius of the circle that passes through all three vertices of the triangle. That circle is called the circumcircle, and its center is the circumcenter.
Formula: R = a / (2 × sin(A))
Any side and its opposite angle can be used in the formula. All three combinations produce the same result.
Worked example: a = 5, A = 36.87°.
- R = 5 / (2 × sin(36.87°)) = 5 / (2 × 0.6) = 5 / 1.2 = 4.17
The Law of Sines connects directly to the circumradius: a / sin(A) = b / sin(B) = c / sin(C) = 2R. This is why the Law of Sines ratio equals twice the circumradius.
The Four Triangle Centers
Every triangle has four classical center points. Each is defined by a different geometric construction, and each has a different location depending on the triangle type.
Centroid
The centroid is the point where all three medians intersect. It is the center of mass of the triangle, the point where the triangle would balance perfectly on a pin.
The centroid divides each median in a 2:1 ratio from vertex to midpoint. So the centroid sits two-thirds of the way from each vertex toward the opposite midpoint.
When the vertices are given as coordinates:
- Centroid = ((x_A + x_B + x_C) / 3, (y_A + y_B + y_C) / 3)
The centroid is always inside the triangle, regardless of triangle type.
Incenter
The incenter is the point where all three angle bisectors meet. Each angle bisector cuts its vertex angle exactly in half.
The incenter is the center of the incircle, the largest circle that fits inside the triangle and touches all three sides. The distance from the incenter to each side equals the inradius r.
Like the centroid, the incenter is always inside the triangle for every triangle type.
Circumcenter
The circumcenter is the point where all three perpendicular bisectors of the sides meet. It is the center of the circumcircle, the circle that passes through all three vertices.
Unlike the centroid and incenter, the location of the circumcenter changes with triangle type:
- Acute triangle: circumcenter is inside the triangle.
- Right triangle: circumcenter is on the hypotenuse, exactly at its midpoint.
- Obtuse triangle: circumcenter is outside the triangle.
Orthocenter
The orthocenter is the point where all three altitudes (heights) of the triangle intersect.
Its location also depends on the triangle type:
- Acute triangle: orthocenter is inside the triangle.
- Right triangle: orthocenter is at the vertex of the right angle.
- Obtuse triangle: orthocenter is outside the triangle.
The orthocenter, centroid, and circumcenter always lie on a single straight line called the Euler line. The centroid always sits between the other two, at one-third the distance from the circumcenter to the orthocenter.
Triangle Inequality Theorem
What the Triangle Inequality States
For any triangle to exist, the sum of any two sides must be greater than the third side. Three conditions must all be true at the same time:
- a + b > c
- b + c > a
- a + c > b
If even one condition fails, no triangle can be formed with those three lengths.
Worked example of failure: a = 1, b = 2, c = 10.
- a + b = 1 + 2 = 3, which is not greater than 10.
- The inequality fails. These three lengths cannot form a triangle.
A quick way to check: take the two shorter sides. If their sum is greater than the longest side, all three conditions are automatically satisfied. You only need to check the one critical case.
Why This Matters for Calculations
The triangle calculator checks the inequality automatically before running any calculation. If the values you enter fail the test, the calculator returns an error rather than producing a meaningless result.
The equality case, where a + b equals c exactly, produces what is called a degenerate triangle. The three points are collinear, meaning they sit on a straight line. The triangle has zero area and no valid angles. It is not a real triangle.
The inequality also comes up in the SSA ambiguous case. When checking whether a second triangle solution is valid, the test is whether the angles A and B’ sum to less than 180 degrees, which is the angle version of the same constraint.
Triangle Congruence and Similarity
When Are Two Triangles Congruent?
Two triangles are congruent when they have exactly the same shape and exactly the same size. Every corresponding side is equal and every corresponding angle is equal.
You do not need to check all six parts. Five recognized criteria are enough to establish congruence:
- SSS: All three sides of one triangle match all three sides of the other.
- SAS: Two sides and the included angle between them match.
- ASA: Two angles and the included side between them match.
- AAS: Two angles and a non-included side match.
- HL (Hypotenuse-Leg): The hypotenuse and one leg match. This criterion applies to right triangles only.
Note that SSA is not a valid congruence criterion. As the ambiguous case shows, SSA can produce two different triangles from the same inputs, which means two non-congruent triangles can satisfy the same SSA conditions.
When Are Two Triangles Similar?
Two triangles are similar when they have the same shape but not necessarily the same size. All corresponding angles are equal, and all corresponding sides are in proportion.
Three criteria establish similarity:
- AA (Angle-Angle): Two angles match. Because angles sum to 180°, the third angle must match too. AA is the most commonly used similarity criterion.
- SAS similarity: Two sides are in proportion and the included angle between them is equal.
- SSS similarity: All three pairs of corresponding sides are in the same ratio.
The ratio of corresponding sides is called the scale factor. If triangle ABC is similar to triangle DEF with a scale factor of 2, every side of DEF is twice the length of the corresponding side in ABC.
Similarity vs. Congruence: the Key Difference
Congruent triangles are always similar. Similar triangles are not always congruent.
The practical distinction:
- Congruent: Same shape, same size. Corresponding sides are equal, not just proportional.
- Similar: Same shape, any size. Corresponding sides are proportional. Scale factor may or may not be 1.
When a problem asks whether two triangles are congruent, check all six corresponding parts or apply one of the five congruence criteria. When it asks for similarity, check the angle pairs or the side ratios using the three similarity criteria.
One practical use: indirect measurement. If you know a tree casts a 12-foot shadow and a 5-foot post casts a 2-foot shadow at the same time, the triangles formed are similar. The tree height = 12 × (5/2) = 30 feet. No climbing required.
How to Use the Triangle Calculator
The tool has three tabs. Tab 1 solves the triangle. Tab 2 calculates area only. Tab 3 is a formula reference.
Tab 1 (Solve Triangle). Select one of the five solve mode buttons at the top: SSS, SAS, ASA, AAS, or SSA. The input fields change to match the selected mode. Enter the known values and select degrees or radians for angle input. Click Solve Triangle. The result shows a labeled diagram of the triangle, hero cards for all six values (sides a, b, c and angles A, B, C), and a full detail panel with area, perimeter, semiperimeter, three heights, three medians, inradius, circumradius, and triangle type. A step-by-step solution shows exactly which law was applied at each step.
Tab 2 (Area Calculator). Select one of three area methods: base and height, two sides and included angle (SAS), or three sides using Heron’s formula. Enter the values and click Calculate Area. The result shows the area, perimeter, and semiperimeter where applicable, with a step-by-step breakdown.
Tab 3 (Reference and Laws). Quick reference for all formulas covered on this page. Includes the triangle types table, special triangle ratios, and links to related calculators.
Frequently Asked Questions
How do you find the missing side of a triangle?
The method depends on what you know. If you have two angles and any side, use the Law of Sines. If you have two sides and the included angle, use the Law of Cosines. If you have two sides and a non-included angle (SSA), use the Law of Sines and check for the ambiguous case. If you only know three angles, no unique side length can be found because angles define shape, not size.
How do you find the missing angle of a triangle?
If you know two angles, subtract their sum from 180 degrees. If you know all three sides, use the Law of Cosines: A = arccos((b² + c² – a²) / (2bc)). If you know two sides and a non-included angle, use the Law of Sines to find the second angle, then subtract both from 180 for the third.
What is the angle sum of a triangle?
The three interior angles of any triangle always add up to exactly 180 degrees. This holds for every triangle: equilateral, isosceles, scalene, acute, obtuse, and right. If two angles are known, the third is always 180 minus their sum.
How do you calculate the area of a triangle without the height?
Two options. If you know all three sides, use Heron’s formula: Area = √(s(s-a)(s-b)(s-c)) where s = (a+b+c)/2. If you know two sides and the angle between them, use Area = (1/2) × a × b × sin(C). Tab 2 of the calculator handles both methods.
What is the SSA ambiguous case?
The ambiguous case occurs when you know two sides and an angle opposite one of them (SSA). This combination can produce no valid triangle, exactly one triangle, or two different triangles depending on the values. Calculate sin(B) = b × sin(A) / a. If sin(B) is greater than 1, no triangle exists. If it equals 1, one triangle exists. If it is less than 1, check whether a second angle B’ = 180° – B also produces a valid triangle. The calculator shows the acute solution first and flags when a second solution exists.
How do you find the centroid of a triangle?
The centroid is the average of the three vertex coordinates. Formula: centroid = ((x_A + x_B + x_C)/3, (y_A + y_B + y_C)/3). It lies at the intersection of the three medians and sits two-thirds of the way from each vertex toward the opposite midpoint. The centroid is always inside the triangle.
What is the difference between similar and congruent triangles?
Congruent triangles have the same shape and the same size. All corresponding sides are equal and all corresponding angles are equal. Similar triangles have the same shape but can differ in size. Corresponding angles are equal but corresponding sides are only proportional, not necessarily equal. Every pair of congruent triangles is also similar, but similar triangles are congruent only when the scale factor is 1.
Can a triangle have two obtuse angles?
No. Two obtuse angles would each be greater than 90 degrees. Their sum would exceed 180 degrees, which leaves no valid measure for the third angle. A triangle can have at most one obtuse angle. The other two angles in an obtuse triangle must both be acute.
What is an oblique triangle?
An oblique triangle is any triangle that does not contain a right angle. Both acute triangles and obtuse triangles are oblique. The solve modes on this page (SSS, SAS, ASA, AAS, SSA) cover all oblique triangles.
Related Calculators
- Right Triangle Calculator for hypotenuse, missing leg, and SOHCAHTOA calculations
- Square Footage Calculator for area in square feet for any shape
- Slope Calculator for slope, angle, rise and run of a line
- All Math Calculators for the full toolkit at calculatorzhub.com
Conclusion
Whether you need to find a missing side, calculate the area from three sides, or understand why the SSA mode produces two possible answers, this triangle calculator handles every case with a full step-by-step solution. Enter what you know, select the matching solve mode, and every property of the triangle follows from there.

