Right triangle calculator
These figures are the exact geometry of the two values you enter. They assume a true right angle at the corner between the legs; if the real corner is out of square the triangle the tool solves is not the one on the ground. Confirm your measurements before relying on a length or an angle from here.
Type any two of the two legs, the hypotenuse and the angle. As soon as two boxes hold a valid number the tool solves the triangle and shows the other two. Change your mind by clearing a box and filling a different one — it always works from the latest two.
Worked example
Enter leg A = 3 and leg B = 4. The hypotenuse is √(3² + 4²) = √25 = 5, and the angle opposite A is arctan(3 ÷ 4) ≈ 36.87°. Clear leg B, type the hypotenuse 5 instead, and leg B comes back as 4 — the same triangle from a different pair.
The formula
c = √(a² + b²) · angle = arctan(a ÷ b) · a = c · sin(angle)
Two legs give the hypotenuse by Pythagoras and the angle by the arctangent of their ratio. A side and an angle turn it around: the sine, cosine and tangent of the angle relate each leg to the hypotenuse, so any one side unlocks the other two.
Questions
- How do I solve a right triangle?
- Give any two of its parts — the two legs, a leg and the hypotenuse, or a side and an angle — and the rest follow from Pythagoras and basic trig. This tool takes exactly two of leg A, leg B, hypotenuse C and the angle, and fills in the other two as you type.
- Which angle does the calculator use?
- The angle opposite leg A — the one whose tangent is A over B. So if you enter leg A and that angle, leg B is A divided by the tangent, and the hypotenuse is A divided by the sine. Keep the angle strictly between 0 and 90 degrees; a right triangle cannot have another right or obtuse angle.
- Why does it need exactly two values?
- One value is not enough to fix the shape, and three risk contradicting each other — an A, B and C that are not a true Pythagorean set have no real triangle. Entering precisely two leaves a single consistent answer, so the tool waits until two fields are filled and clears if you give it more.
- Can I use it for rafters, stringers or bracing?
- Yes — any time you know two parts of a right-angled layout and want the third. A rafter run and rise give the rafter length; a stair rise and run give the stringer; a brace angle and reach give its length. It is the plain geometry under a lot of the trade tools here.
Related tools
New tools, now and then
We add calculators most weeks. Drop your email and get a short note when a new one lands — nothing else, no selling your address, one-click out.