Triangle Calculator – Solve Any Triangle
Enter any three known values of a triangle — at least one side — and instantly get all three sides, all three angles, area, perimeter, heights, inradius, circumradius, plus a step-by-step solution and a scale drawing.
Solve Any Triangle from Three Known Values
Triangle Formula
Where:
- \(a, b, c\) — sides of the triangle; side \(a\) is opposite angle \(A\), and so on
- \(A, B, C\) — interior angles in degrees
- \(K\) — area, \(P\) — perimeter, \(h_a\) — height to side \(a\)
- \(r\) — inradius (radius of the inscribed circle), \(R\) — circumradius (radius of the circumscribed circle)
Which formula applies depends on what you know: the law of cosines handles three sides (SSS) or two sides with the included angle (SAS), while the law of sines and the 180° angle sum handle the remaining cases.
Triangle – Calculation Example
Example: the default values — sides \(a = 3\), \(b = 4\) and \(c = 5\), with all angle fields left empty. Clear the angle fields, keep the three sides, and the calculator solves this triangle as an SSS case.
\[ \cos C = \frac{a^2 + b^2 - c^2}{2ab} = \frac{3^2 + 4^2 - 5^2}{2 \cdot 3 \cdot 4} = \frac{9 + 16 - 25}{24} = 0 \quad \Rightarrow \quad C = 90^\circ \]
\[ \cos A = \frac{b^2 + c^2 - a^2}{2bc} = \frac{16 + 25 - 9}{40} = 0.8 \quad \Rightarrow \quad A \approx 36.87^\circ \]
\[ B = 180^\circ - 90^\circ - 36.87^\circ = 53.13^\circ \]
\[ K = \tfrac{1}{2}ab\sin C = \tfrac{1}{2} \cdot 3 \cdot 4 \cdot \sin 90^\circ = 6, \quad P = 3 + 4 + 5 = 12 \]
\[ r = \frac{2K}{P} = \frac{12}{12} = 1, \qquad R = \frac{a}{2\sin A} = \frac{3}{2 \cdot 0.6} = 2.5 \]
Result: an angled, right scalene triangle with \(A \approx 36.87^\circ\), \(B \approx 53.13^\circ\), \(C = 90^\circ\), area 6 units², perimeter 12 units, heights \(h_a = 4\), \(h_b = 3\), \(h_c = 2.4\), inradius 1 and circumradius 2.5. This is the famous 3-4-5 right triangle.
How to use the calculator
- Fill in exactly three of the six fields: Side a, Side b, Side c, Angle A, Angle B or Angle C. Leave the other three empty.
- Make sure at least one of the three entries is a side — three angles alone fix only the shape of a triangle, not its size.
- Use the same length unit for all sides; the results inherit that unit.
- If your angles are in radians, set Angle unit to radians (rad). All results are always displayed in degrees.
- Check the Solved Triangle block: it lists all six measures, the area, the perimeter, the three heights, both radii, the triangle type and a scale drawing, followed by a step-by-step solution.
- If you entered two sides and a non-included angle (the SSA case), the calculator shows both valid triangles when they exist — compare the two drawings and pick the one that matches your problem.
What does it mean to "solve" a triangle?
A triangle has six main parts: three sides and three angles. Solving a triangle means finding all six from the three you already know. Not any three values work, however — three angles determine only a family of similar triangles, which is why the calculator requires at least one side. Three sides only work when they satisfy the triangle inequality: each side must be shorter than the sum of the other two.
Every valid combination falls into one of four classical cases, and each has a standard route:
- SSS (three sides): each angle follows from the law of cosines.
- SAS (two sides and the angle between them): the third side comes from the law of cosines, then the angles from the law of cosines or the 180° sum.
- ASA / AAS (one side and two angles): the third angle comes from the 180° sum, then all sides from the law of sines.
- SSA (two sides and an angle not between them): solved with the law of sines, but this case is special — see below.
The result output goes beyond the six basic measures. The area uses \(K = \tfrac{1}{2}ab\sin C\), each height is \(h = 2K / \text{side}\), the inradius \(r\) is the radius of the circle that touches all three sides, and the circumradius \(R\) is the radius of the circle passing through all three vertices. Knowing \(r\) is useful for packing and clearance problems; \(R\) appears constantly in trigonometry and geometry proofs. If you only need the area of a triangle, the dedicated triangle area calculator is a quicker tool.
The ambiguous case (SSA): two triangles from the same data
When you know two sides and an angle opposite one of them, the data may not determine a unique triangle. Imagine a door of fixed length swinging on a hinge: for a certain range of positions, its free end can touch a given line at two different points, producing two different triangles with exactly the same \(a\), \(b\) and \(A\).
Concretely, if the known angle is acute and the side opposite it is shorter than the other known side (but not shorter than the altitude), the law of sines gives two possible values for the remaining angle: \(B\) and \(180^\circ - B\). The calculator detects this automatically and outputs a complete second solution — sides, angles, area, perimeter and its own drawing — so you can decide which triangle your problem refers to. In all other situations (the angle is 90° or larger, or the opposite side is the longest), the triangle is unique.
Assumptions, limits and practical tips
- Plain (Euclidean) triangles only. Angles must be greater than 0° and smaller than 180°, and side lengths must be positive.
- Exactly three values. Entering more than three makes the system overdetermined — if you know four or more parts, cross-check them by solving with different triples; a genuine triangle gives consistent results each time.
- Angle matching matters. Angle \(A\) must sit opposite side \(a\), angle \(B\) opposite side \(b\), and so on. Mixing them up is the most common source of a "wrong" answer.
- Units are up to you. Sides can be in cm, inches, meters — anything — provided all three share one unit; the area is then in that unit squared.
- No tolerance for near-degenerate triangles. If the sides almost violate the triangle inequality, or the angles almost sum to 180°, the tool reports an error rather than a nearly flat triangle.
For a right triangle where you only work with the two legs, the right triangle calculator is simpler; the Pythagorean theorem calculator covers just the side relationships, and the trigonometry calculator evaluates the individual sine, cosine and tangent values behind these formulas.
Frequently Asked Questions
How do I solve a triangle by hand without a calculator?
Work through one of the four standard cases. For three sides, apply the law of cosines three times: \( \cos A = \frac{b^2+c^2-a^2}{2bc} \). For two sides and the included angle, find the third side with the law of cosines, then the remaining angles. For one side and two angles, subtract from 180° to get the third angle, then scale all sides with the law of sines \( \frac{a}{\sin A} \). Keep a trig table or scientific calculator handy for the sines and cosines.
What is Heron's formula and when should I use it?
Heron's formula gives the area directly from the three sides, no angles needed. First compute the semi-perimeter \( s = \frac{a+b+c}{2} \), then \( K = \sqrt{s(s-a)(s-b)(s-c)} \). It is the quickest hand method when you only know the sides and want the area, and it pairs well with heights: each height is simply \( h = \frac{2K}{\text{side}} \). It gives exactly the same area as \( \tfrac{1}{2}ab\sin C \), just by a different route.
How do I convert between degrees and radians?
Multiply degrees by \( \frac{\pi}{180} \) to get radians, and multiply radians by \( \frac{180}{\pi} \) to get degrees. For example, 60° equals \( \tfrac{\pi}{3} \approx 1.047 \) radians, and 2 radians equal about 114.59°. This calculator accepts both units for input — just switch the Angle unit selector — and always shows the results in degrees, so no manual conversion of the output is needed.
What are the most common mistakes when solving a triangle?
The top mistake is pairing an angle with the wrong side — angle \( A \) must always sit opposite side \( a \), not adjacent to it. Others include forgetting the ambiguous SSA case (the law of sines gives both \( B \) and \( 180^\circ - B \)), rounding intermediate values too early, mixing units between sides, and trying to solve from three angles alone, which fixes only the shape. Finally, double-check that your two given angles sum to less than 180°.
How can I verify that my solved triangle is correct?
Run three quick checks. First, the angles must sum to exactly 180°. Second, the triangle inequality must hold: each side is shorter than the sum of the other two, with the longest side opposite the largest angle. Third, the law-of-sines ratio \( \frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C} \) should give the same value for all three pairs. For a right triangle, the Pythagorean theorem is a fourth check.
What is the difference between ASA, AAS and SAS?
It is all about where the known parts sit relative to each other. SAS means the angle lies between the two known sides, so the law of cosines applies directly. ASA and AAS both give one side and two angles — in ASA the side lies between the angles, in AAS it does not — but both are handled identically: find the third angle from the 180° sum, then the sides from the law of sines. Only in SSA, where the angle is not included, can two different triangles appear.
Why do I need at least one side — why aren't three angles enough?
Three angles determine only a triangle's shape, not its size. A tiny sketch and a football-field-sized field marking can have identical angles \( 30^\circ, 60^\circ, 90^\circ \) while their sides differ by a factor of a thousand — such triangles are called similar. A single side length acts as the scale reference: it fixes the common law-of-sines ratio \( \frac{a}{\sin A} \), and from it every other side follows uniquely.