A right triangle is fully determined by just two independent measurements, because the 90° angle is already fixed and the two acute angles always add up to the remaining 90°. This calculator takes whichever two values you know — two sides, or a side and an angle — and solves for everything else using the Pythagorean theorem and basic trigonometry.

How the Right Triangle Calculator works

The calculator first checks which two of the five fields (leg a, leg b, hypotenuse c, angle A, angle B) you've filled in, then routes to the matching formula. If you gave two sides, it applies the Pythagorean theorem (a² + b² = c²) to find the third side and inverse trig functions to find the angles. If you gave a side and an angle, it applies the direct trig ratios — sine, cosine, or tangent, depending on which side and which angle — to find the remaining two sides, then subtracts from 90° to get the other angle.

Area and perimeter fall straight out of the solved sides: area is always half the product of the two legs (since they're perpendicular, one leg is effectively the base and the other the height), and perimeter is just the sum of all three sides.

Inputs and what they mean

Leg a and leg b are the two shorter sides that meet at the right angle; hypotenuse c is the longest side, opposite the right angle. Angle A is the acute angle opposite leg a, and angle B is the acute angle opposite leg b — together they always sum to 90°. You only ever need to fill in two of the five fields; the calculator treats every blank field as unknown and solves for it.

The one combination that can't be solved is angle A and angle B together, since knowing both acute angles (which is really only one independent piece of information, because they're complementary) tells you the triangle's shape but says nothing about its actual size — infinitely many similarly-shaped right triangles share the same two angles.

Limits and edge cases

If you enter a leg and a hypotenuse where the leg is equal to or longer than the hypotenuse, no real triangle exists — the calculator flags this rather than returning an impossible result. The same applies to an angle of 0° or 90°: a genuine right triangle needs both acute angles strictly between 0° and 90°. If you fill in more than two fields, the calculator uses the first two (in the order leg a, leg b, hypotenuse c, angle A, angle B) and ignores the rest, which is worth knowing if your extra values don't happen to be mutually consistent.

This tool covers plane (Euclidean) right triangles only — it isn't meant for spherical or non-Euclidean geometry, and it assumes exact input values rather than modeling measurement uncertainty.