Skip to content
Popular Calculators
Browse Math calculators

Right Triangle Calculator

Solve a right triangle from any two of its measurements, including sides, angles, the altitude to the hypotenuse and both circle radii.

What do you want to work out?

About the Right Triangle Calculator

Right triangles are easier than other triangles, and the reason is simple bookkeeping: one of the three angles is already known. That leaves only two unknowns, so any two measurements are enough to pin the whole thing down. Two sides. One side and one acute angle. That is all.

They are also the triangles that appear everywhere in practical work, because the world is full of things that meet at right angles. A wall and the ground. A mast and a deck. A ladder, a wall and the floor. A rafter, a ceiling joist and a vertical post. Every one of those is a right triangle waiting to be solved.

This calculator takes any of the four useful input pairs and returns both legs, the hypotenuse, both acute angles, the area and perimeter, the altitude down to the hypotenuse, and the radii of the inscribed and circumscribed circles.

How to Use the Right Triangle Calculator

Pick what you have:

Two legs. The two sides that meet at the right angle.

A leg and the hypotenuse. The hypotenuse must be the longer of the two.

A leg and an acute angle. Say whether your leg sits next to that angle (adjacent) or across from it (opposite) — this changes the answer entirely, and getting it backwards is the commonest error in the whole topic.

The hypotenuse and an acute angle.

Press Calculate. Angles are in degrees throughout.

SOHCAHTOA: the Three Ratios

For either acute angle in a right triangle, the three sides pair up into three ratios:

  sin(angle) = opposite / hypotenuse       SOH
  cos(angle) = adjacent / hypotenuse       CAH
  tan(angle) = opposite / adjacent         TOA

"Opposite" and "adjacent" are relative to the angle you picked, and that is the trap. Switch attention to the other acute angle and the two legs swap roles — what was opposite is now adjacent. The hypotenuse never changes, because it is defined by the right angle rather than by whichever acute angle you are looking at.

A test you can apply to your own working: sine and cosine are always less than 1, because a leg is always shorter than the hypotenuse. If you compute a sine of 1.4, you have divided the wrong way round. The tangent has no such limit — it can be any positive number, and it grows without bound as the angle approaches 90°.

Rearranging them

Each ratio solves for whichever part is missing:

  opposite   = hypotenuse × sin(angle)
  adjacent   = hypotenuse × cos(angle)
  opposite   = adjacent × tan(angle)
  adjacent   = opposite / tan(angle)
  hypotenuse = opposite / sin(angle)
  angle      = arctan( opposite / adjacent )

Two Triangles Worth Memorising

Two right triangles come up so often that their exact proportions are worth knowing by heart:

| Triangle | Sides | Notes | |----------|-------|-------| | 45-45-90 | 1 : 1 : √2 | half a square, cut corner to corner | | 30-60-90 | 1 : √3 : 2 | half an equilateral triangle |

In the 30-60-90 the short leg is exactly half the hypotenuse. Not approximately — exactly, and it follows from the triangle being an equilateral one folded down the middle. If you know the hypotenuse is 10, the short leg is 5 without any trigonometry at all.

In the 45-45-90 the hypotenuse is the leg times √2, which is where the familiar 1.414 factor in diagonal bracing comes from.

Step-by-Step Example

A ladder problem. A 6-metre ladder leans at 70° to the ground. How high does it reach, and how far out is its foot?

  The ladder is the hypotenuse.
  height = 6 × sin(70°) = 6 × 0.9397 = 5.638 m
  base   = 6 × cos(70°) = 6 × 0.3420 = 2.052 m

  Check: 5.638² + 2.052² = 31.79 + 4.21 = 36.00 = 6²  ✓

A leg and an angle. A roof rises at 35° over a 6-metre horizontal run.

  The 6 m run is adjacent to the 35° angle.
  rise   = 6 × tan(35°) = 6 × 0.7002 = 4.201 m
  rafter = √(6² + 4.201²) = √(36 + 17.65) = √53.65 = 7.325 m

Note what happens if you treat the 6 m as opposite instead: the rise comes out as 6 / tan(35°) = 8.57 m, and the rafter as 10.46 m. Same inputs, entirely different roof. The position of the leg relative to the angle is not a detail.

Two legs. Legs of 3 and 4.

  c = √(9 + 16) = 5
  angle A = arctan(3/4) = 36.87°
  angle B = 90 - 36.87 = 53.13°
  area = ½ × 3 × 4 = 6

Understanding Your Result

The sides give both legs and the hypotenuse.

The angles give the 90° corner and both acute angles, which always add to 90°. Once you have one, the other is just subtraction — a fact worth using as a check.

The area and perimeter. The area needs no separate height, because the two legs are a perpendicular base-and-height pair. That makes right triangles the one case where area = ½ × side × side.

The altitude to the hypotenuse is the perpendicular dropped from the right angle onto the longest side. It equals (a × b) ÷ c, and it is always shorter than either leg. Its interest is geometric: it divides the triangle into two smaller right triangles, both similar to the original and to each other. That similarity is what the geometric mean relationships are built on.

The inradius and circumradius are the largest circle that fits inside and the circle through all three corners. Right triangles have neat shortcuts for both:

  circumradius = c / 2
  inradius     = (a + b - c) / 2

The circumradius one is Thales' theorem in disguise. Any triangle drawn with the diameter of a circle as one side has a right angle at the third vertex — so a right triangle's hypotenuse is a diameter, and the radius is half of it. The centre of that circle sits exactly at the midpoint of the hypotenuse.

The trigonometric ratios are listed for the first acute angle so you can see the numbers the trigonometry actually used.

When Should You Use This Calculator?

Ladder placement. Length, height reached and distance from the wall — any two give the third, and the angle tells you whether the setup is safe.

Roof pitch and rafter length. Rise, run and rafter form a right triangle, and the pitch is the angle between rafter and run.

Stairs. Total rise, total run and the stringer length, with the angle determining whether the flight meets building regulations.

Diagonal bracing. The brace across a rectangular frame is a hypotenuse.

Ramps and accessibility. A ramp's angle, rise and run are a right triangle, and standards are written in terms of the ratio between two of them.

Surveying heights. Measure the distance to a building's base and the angle up to its top, and the tangent gives the height without leaving the ground.

Navigation and drift. Perpendicular components of a course resolve through the same ratios.

Common Mistakes

Swapping opposite and adjacent. The commonest error by a wide margin, and it produces an answer that looks perfectly reasonable. Fix the angle you are working from first, then identify the sides relative to it.

Using sine where the tangent belongs. Sine and cosine involve the hypotenuse; the tangent relates the two legs. If the hypotenuse is not part of the question, it is a tangent problem.

Putting a leg in the hypotenuse position. The hypotenuse is opposite the right angle and is always the longest side. If your "hypotenuse" is shorter than a leg, the triangle cannot exist.

Calculator set to radians. sin(30) is 0.5 in degrees and −0.988 in radians. If an answer is wildly wrong or negative, check the mode first.

Expecting a sine above 1. It cannot happen. A result over 1 means the division went the wrong way.

Forgetting that the acute angles are complementary. They add to 90°, so there is never any need to compute the second one from scratch.

Assuming the altitude to the hypotenuse is a median. It is not. The perpendicular from the right angle and the line to the midpoint of the hypotenuse are two different lines, and they coincide only in the 45-45-90 case.

Frequently Asked Questions

How many measurements does a right triangle need?

Two, because the right angle counts as the third. Any two sides, or one side and one acute angle, fix the whole triangle. Two angles are not enough, since they set the shape but leave the size open.

What does SOHCAHTOA stand for?

Sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, tangent is opposite over adjacent. It is a memory aid for the three ratios that connect an acute angle to the sides, and it only applies to right triangles.

Why do the two acute angles always add to 90 degrees?

Because all three angles add to 180, and one of them is already 90. The remaining two must share what is left, which makes them complementary — find one and you have the other by subtraction.

What is the altitude to the hypotenuse for?

It is the perpendicular from the right angle down to the longest side, and it splits the triangle into two smaller ones that are both similar to the original. That similarity is the basis of the geometric mean relationships taught alongside it.

Why is the circumradius exactly half the hypotenuse?

Because the hypotenuse is a diameter of the circle through all three vertices. Thales' theorem says any angle drawn on a diameter is a right angle, so a right triangle's hypotenuse must be a diameter, making the radius half its length.

Last reviewed September 18, 2026 by the CalculatorPeak editorial team.