miniwidgets Useful tools, quick games and everyday learning. Free, with no account.

Right-angled triangle calculator

Any two measurements, and the rest of the triangle: every side, both angles, the area and the perimeter.

The triangle
Hypotenuse–
Angle–
Other angle–
Area–

Two measurements are enough

A right angle is already one fact about the triangle, so any two more pin it down completely, as long as one of them is a length. Two sides give the third by Pythagoras, and the angle by one inverse trig function. A side and an angle give the other two sides by one trig function each. Everything else, the second angle, the area and the perimeter, is arithmetic from there.

SOH CAH TOA, in plain words

For the angle at the end of the base, the one marked in the drawing:

  • sin of the angle is the height divided by the hypotenuse
  • cos of the angle is the base divided by the hypotenuse
  • tan of the angle is the height divided by the base

And the sides always satisfy base² + height² = hypotenuse². That is the whole of it. The page picks whichever of these uses the two numbers you have, and the working line under the answer says which.

Where it goes wrong

A calculator in radians. The single commonest reason a trig answer comes out as nonsense. Degrees are what a protractor, a spirit level and a roofing data sheet all use.

The wrong side as the hypotenuse. It is the side facing the right angle, never one of the two that meet there. If what you called the hypotenuse is not the longest side, the page refuses rather than returning a triangle that cannot exist.

Rounding halfway through. Rounding the angle to 53° and then working out a side from it drifts the answer by several millimetres over a few metres. The page carries every figure at full precision and rounds only what it shows you.

Triangles that are not homework

A ladder against a wall is one: the wall is the height, the ground the base, the ladder the hypotenuse. So is a ramp, a roof slope or a flight of stairs. For those, the roof pitch calculator and the stair calculator do the same sums in a builder's terms and check the answer against what the job needs.

Common questions

What is the hypotenuse?
The side opposite the right angle, and always the longest of the three. In the drawing it is the sloping side. If a sum ever gives a hypotenuse shorter than one of the other sides, a measurement has gone in the wrong box.
Why does my calculator give a different angle?
Almost always because it is set to radians rather than degrees. The inverse tangent of 4 ÷ 3 is 53.13 in degrees and 0.927 in radians, and both are right in their own unit. School maths and building work both use degrees: look for DEG or a small D on the display.
Which side is opposite and which is adjacent?
It depends which angle you are standing at, which is why this page does not use the words. For the angle marked in the drawing, the height is opposite and the base is adjacent. For the other angle, at the top, they swap. The hypotenuse never changes.
Can I work it out from two angles?
No. Two angles fix the shape but not the size: a triangle drawn on a napkin and one the size of a roof can have exactly the same angles. You need at least one length, and then any one other measurement.
What units should I use?
Any, as long as every length is in the same one. The sides come out in the unit you typed and the area in that unit squared, so centimetres in means square centimetres out.