THE TOOLKIT Free calculators & converters

Math & School

Triangle Calculator

Pick what you know — two legs of a right triangle, a leg and the hypotenuse, three sides, two sides with the angle between them, or one leg and one acute angle — and get every missing side, angle, the area, and the perimeter.

What do you know?

Result

—
Side a—
Side b—
Side c—
Angle A (opposite a)—
Angle B (opposite b)—
Angle C (opposite c)—
Area—
Perimeter—

How it works

Sides are named by the angle across from them: side a faces angle A, and so on. In the right-triangle modes the right angle is C, so side c is the hypotenuse. Pythagoras: a² + b² = c², which solves the hypotenuse from the legs — or a missing leg as √(c² − a²). Three sides (SSS) uses the law of cosines, c² = a² + b² − 2ab·cos(C), rearranged to recover each angle. SAS uses that same law forwards to get the third side. Side + angle uses the tangent and sine ratios in the right triangle.

Area is Heron's formula: with s = (a + b + c) ÷ 2, area = √(s(s − a)(s − b)(s − c)) — except in SAS mode, where area = ½·a·b·sin(C) is used directly. Perimeter is a + b + c. Units are whatever you entered: enter inches, get square inches of area.

Impossible triangles are refused. In SSS mode the two shorter sides must add up to more than the longest side — if they don't, no triangle exists with those sides. In leg + hypotenuse mode the hypotenuse must be the longest side, and in side + angle mode the angle must be acute (under 90°).

Worked example: legs 3 and 4 give c = √(9 + 16) = 5, angles A = 36.87°, B = 53.13°, C = 90°, area 6, perimeter 12 — the classic 3-4-5 triangle.

Frequently asked questions

Do the angles always add to 180°? Yes — in any flat (Euclidean) triangle A + B + C = 180°. The results above are rounded for display, so the shown values may add to 179.99° or 180.01°.

Why did my SSS numbers get refused? Because the triangle inequality failed: each side must be shorter than the other two sides added together. Sides of 2, 3, and 6 can't form a triangle — the 2 and 3 laid along the 6 don't meet.

Which side is the hypotenuse? The side opposite the right angle — here, side c. It is always the longest side of a right triangle.

More tools — Math & School

Every tool on this site runs in your browser. Nothing you type is sent anywhere, stored, or tracked.