Right Triangle Calculator

Give any two known values of a right triangle and the calculator works out everything else, with a diagram.

Fill in exactly two boxes and leave the rest empty. Side a is opposite angle α, side b is opposite angle β, and c is the hypotenuse.

What you need to enter

A right triangle has a 90° angle, so once you know any two other measurements the rest is fixed. Fill in exactly two boxes. Almost any pair works: two sides, a side and an angle, a side and the height or area, or the area and perimeter. The one pair that cannot work is two angles, because every right triangle with the same angles is just a bigger or smaller copy of the same shape, so there is no way to tell which size you mean. The same goes for the height and perimeter together.

A quick worked example

The default values are a = 3 and c = 5. The missing side comes from Pythagoras: b = √(5² − 3²) = √16 = 4. The angles follow from the sides: sin α = 3 ÷ 5 = 0.6, so α = 36.87° and β = 90° − 36.87° = 53.13°. The area is ½ × 3 × 4 = 6, the perimeter is 3 + 4 + 5 = 12, and the height to the hypotenuse is 3 × 4 ÷ 5 = 2.4. Change one number and the whole set updates.

The formulas behind it

Everything comes from a few relationships. Pythagoras says a² + b² = c². The trigonometric ratios say sin α = a/c, cos α = b/c and tan α = a/b. The two acute angles always add up to 90°. The area is half the product of the legs, and the height to the hypotenuse is h = ab/c. The calculator also gives the inradius (the radius of the largest circle that fits inside, ab divided by the perimeter) and the circumradius (the circle through all three corners), which for a right triangle is always half the hypotenuse. If you only need the length of the missing side, the Pythagorean Theorem Calculator is a faster route.

Why some inputs give two answers

If you enter the hypotenuse with the height, the hypotenuse with the area, or the area with the perimeter, two different triangles can fit. They are mirror images: one has legs 3 and 4 and the other has legs 4 and 3, so the shape is the same and the labels swap. The calculator lists both as “Possible 1” and “Possible 2” so you can pick the one that matches your drawing. When the two legs are equal there is only one answer.

A real-world check: leaning a ladder

A common safety rule is to place a ladder so that its base is one quarter of its working height away from the wall. For a 5 m ladder with its base 1.25 m from the wall, enter c = 5 and b = 1.25. The ladder reaches 4.84 m up the wall and makes an angle of about 75.5° with the ground, which is exactly the angle the 4-to-1 rule is designed to give. The same approach works for roof rafters, ramps and wheelchair access, and the Stair Calculator uses it for risers and treads.

When the triangle is not a right triangle

This tool only works when one angle is exactly 90°. For any other triangle, the Triangle Calculator solves it from three known values. If your triangle comes from two points on a graph, the Slope Calculator gives the rise, run, angle and distance directly, and the Distance Calculator gives the length of the line between them.

Angles can be entered in degrees or radians. An angle of 90° or more is rejected, because a right triangle already uses up 90° and the other two angles must be smaller than that.

Common questions

How do you solve a right triangle?

You need two known values. Use the Pythagorean theorem for the sides and the sine, cosine or tangent ratios for the angles. This calculator does all of it from any two inputs.

Can I solve a right triangle with only the angles?

No. Two angles only give the shape, not the size. You need at least one side, or the area or perimeter.

What is the height to the hypotenuse?

It is the length of the line from the right-angle corner straight down to the hypotenuse. It equals the product of the two legs divided by the hypotenuse.

What are the inradius and circumradius?

The inradius is the radius of the largest circle that fits inside the triangle. The circumradius is the radius of the circle through all three corners, and for a right triangle it is half the hypotenuse.

Why does the calculator show two possible solutions?

Some pairs of inputs, such as the hypotenuse and area, fit two triangles that are mirror images, with the legs swapped.

More Math Calculators

Pick another tool to jump straight to it.