Triangle Calculator with Laws of Sines and Cosines
Solve a non-right triangle from three sides, two sides and an included angle, or two angles and one side. The calculator validates triangle conditions and reports geometry derived from Heron’s formula.
Known sides and angles
Solved triangle geometry
triangle calculator: formulas, interpretation and worked use
This triangle calculator keeps solve modes explicit so unused values cannot affect the result. It detects impossible side lengths and invalid angle sums before applying trigonometric formulas.
Transparent calculation steps
The triangle calculator displays the intermediate values used in the result so users can audit the calculation rather than receiving an unexplained answer.
Input validation and edge cases
Impossible, incomplete and non-finite inputs are rejected with a specific message. Boundary cases are handled explicitly instead of being silently rounded into a misleading result.
Units and precision
Where units apply, inputs are converted to a consistent internal basis before the formula is evaluated. Results retain enough precision for checking and are then formatted for practical reading.
Worked interpretation
The result panel separates the primary answer, supporting quantities and a formula trace. This makes the calculator suitable for checking homework, planning scenarios and comparing alternatives.
Law selection
The solver uses the law of cosines when side information is sufficient and the law of sines after a valid angle-side pair is established.
Area cross-check
Heron’s formula and one-half ab sin(C) should agree. Their small residual is reported as a numerical verification.
SSS, SAS and ASA/AAS solution paths
The triangle calculator selects a valid law-of-cosines or law-of-sines path from the supplied sides and angles. SSS uses the cosine rule to recover all angles. SAS first finds the side opposite the included angle with the cosine rule, avoiding the wrong acute branch. ASA or AAS uses the angle sum and the sine rule. The calculator rejects side lengths that violate the triangle inequality.
The ambiguous SSA case
The triangle calculator can identify zero, one or two possible triangles when two sides and a non-included angle are supplied. This ambiguity occurs because sine has the same value for supplementary angles. Each valid solution is reported separately with area, perimeter and remaining measurements. Keep side and opposite-angle labels aligned; swapping labels changes the geometry. Angles are displayed in degrees and should total 180° apart from small rounding differences.
How is an impossible triangle detected?
In SSS mode, every pair of sides must sum to more than the remaining side. Angle modes also require a total below 180 degrees before the missing angle is solved.
What is the included angle in SAS mode?
Angle C lies between known sides a and b.
How is triangle type classified?
Side equality determines equilateral, isosceles or scalene, while the largest angle determines acute, right or obtuse.