Triangle calculator
Solve triangles from SSS, SAS, ASA/AAS or right-angle data: area (Heron), perimeter, angles, circumradius and inradius, with angle/side classification and validation.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
a, b, c are the side lengths; c faces angle C
Results
a, b, c are the side lengths; c faces angle C
What this tool does
- Check homework or verify a measurement: from SSS, SAS or ASA/AAS data you get the area, perimeter, all three angles and all three altitudes in one shot.
- Get circumradius and inradius, the two values you need constantly for machining, technical drawing or shader work.
- Classify the shape automatically by angle (acute / right / obtuse) and by side (equilateral / isosceles / scalene) instead of comparing values by hand.
- Sanity-check the inputs first: impossible data such as two sides not exceeding the third, or out-of-range angles, is rejected instead of producing misleading numbers.
Example
Input
Mode: three sides (SSS) a = 3, b = 4, c = 5
Output
Area 6 Perimeter 12 Semiperimeter 6 Sides a = 3, b = 4, c = 5 Angles A = 36.8699°, B = 53.1301°, C = 90° Circumradius 2.5 Inradius 1 Altitudes 4, 3, 2.4 By angle: right triangle By side: scalene
The 3-4-5 triangle is the classic right triangle: the right angle is at C, so C = 90°, the altitude on the hypotenuse is 2.4 and the circumradius is exactly half the hypotenuse. Angles are shown to 4 decimals, lengths and areas to 6.
Frequently asked questions
Why does 1, 2, 3 fail?
Because 1 + 2 = 3 — the two shorter sides do not exceed the longest one, so the points are collinear. The tool reports “the sum of any two sides must exceed the third” or “the points are collinear”. That is a mathematically impossible triangle, not a bug.
In SAS mode, which angle is the included one?
It is the angle between sides a and b, that is angle C, opposite side c. The tool applies the law of cosines to get c and then solves the remaining angles. Entering 0° or 180° is rejected as out of range.
How do I fill in ASA / AAS mode?
Enter two angles plus the side opposite C = 180° − A − B. For ASA that side is the one shared by A and B; for AAS it is the side opposite one of them — the formula is identical. The two angles must sum to less than 180°.
How many values does the right-triangle mode need?
At least two: both legs (a, b), one leg plus the hypotenuse (c), or one side plus an acute angle (A or B). A single value reports “add one more value”, and a leg longer than the hypotenuse reports that a leg must be shorter.
Can I change the number of decimals?
Angles are fixed at 4 decimals with a degree sign, and area, perimeter, radii and altitudes at 6 decimals; there is no precision switch. Copy the values if you need to continue with higher precision. Everything is computed locally and never uploaded.
Keywords:三角形triangle海伦公式heron面积角度外接圆内切圆直角三角形几何