Math / calculator
Triangle Calculator
Solve general or right triangles from known sides and angles. Calculate missing sides, degree angles, perimeter and area with geometric validation.
Calculator
Calculator
Solve a valid triangle.
Use three sides (SSS), two sides b/c with included angle A (SAS), or side a with angles A/B (ASA/AAS). Right modes accept two legs, a leg and hypotenuse, or a leg opposite an acute angle. Side labels are opposite matching angles.
Your result
Enter details to see the result.
Complete the inputs and calculate to see the main result and its supporting breakdown.
Example
Worked example
Example inputs
- Known information
- SSS: three sides
- Side a
- 3
- Side b / adjacent leg
- 4
- Side c / right hypotenuse
- 5
Calculation breakdown
Right modes: c=hypot(a,b); missing leg=√[(c−known)(c+known)]; opposite-leg/angle mode c=a/sin A, b=a/tan A. SAS: a²=b²+c²−2bc cos A. Two angles: C=180°−A−B and b=a sin B/sin A, c=a sin C/sin A. For valid SSS, semiperimeter s=(a+b+c)/2 and area=√[s(s−a)(s−b)(s−c)] using a stable equivalent; perimeter=a+b+c.
- Sides a, b, c
- 3, 4, 5
- Same length unit as the supplied sides.
- Angles A, B, C
- 36.869898°, 53.130102°, 90°
- Perimeter
- 12 length units
Example result
Triangle area
6 square units
How to interpret the result
Sides and perimeter keep the unit used in your inputs, while area is in that unit squared. A rejected degenerate triangle lacks a positive interior area; a valid output still reflects the precision of your supplied lengths and angles.
How to use this calculator
- Choose SSS, SAS, ASA/AAS, or a right-triangle pair: two legs, leg/hypotenuse, or opposite leg/acute angle.
- Enter positive sides in one consistent unit and angles in degrees; matching letters label opposite sides and angles.
- Calculate all sides, angles, perimeter and square-unit area, or correct a triangle-inequality/angle-sum error.
How it works
Formula
Right modes: c=hypot(a,b); missing leg=√[(c−known)(c+known)]; opposite-leg/angle mode c=a/sin A, b=a/tan A. SAS: a²=b²+c²−2bc cos A. Two angles: C=180°−A−B and b=a sin B/sin A, c=a sin C/sin A. For valid SSS, semiperimeter s=(a+b+c)/2 and area=√[s(s−a)(s−b)(s−c)] using a stable equivalent; perimeter=a+b+c.
How do I solve missing triangle sides and angles?
Choose the known information: SSS uses three sides, SAS uses two sides and their included angle, and ASA/AAS uses two angles and one corresponding side. The sine or cosine law finds remaining lengths, then a valid triangle yields angles, perimeter and area.
What this calculator does
A triangle is determined by three sides, two sides with the included angle, or two angles and one corresponding side. Side a is opposite angle A, and the same convention applies to b/B and c/C. Dedicated right-triangle modes accept two legs, a leg and hypotenuse, or an opposite leg and acute angle. The solver avoids assuming a unique answer for ambiguous SSA inputs.
Who this is useful for
Students solving a deterministic triangle from valid sides and included angles while keeping side-opposite-angle labels and geometric validity clear.
Inputs you will need
Some inputs appear only for the operation or shape you select.
Required or selected inputs
- Known information
- Side a
- Side b / adjacent leg
- Side c / right hypotenuse
- Angle A (degrees)
- Angle B (degrees)
Assumptions
- Angles use degrees and every side uses the same length unit. SSS satisfies the strict triangle inequality.
- SAS takes b and c around included A. Two-angle mode takes a opposite A plus A and B, covering an ASA/AAS determination.
Limitations
- Ambiguous SSA, coordinates and three-dimensional triangles are not implemented.
- Degenerate and numerically indistinguishable near-degenerate dimensions are rejected rather than presented as valid area-zero triangles.
Useful next steps
Solve a right triangle when exactly one side is missing with Pythagorean Theorem Calculator.
Use a known perpendicular base and height directly with Area Calculator.
Relate coordinate rise and run to a straight-line slope with Slope Calculator.
References
OpenStax: sine law, cosine law and Heron's formula — Reference equations for planar triangles; right-triangle lengths also use the Pythagorean theorem.
See how HandyChest handles units, validation, rounding, and testing, or Report a problem with this calculator.
Good to know
Frequently asked questions
Why can three positive sides still be invalid?
The longest side must be shorter than the other two added together. Equality produces a straight, degenerate figure, while a longer side makes a triangle impossible.
Keep going