Uni-Sine
MathematicsTrigonometry

Right triangle calculator

A right triangle calculator finds every missing side and angle of a right-angled triangle from any two values, as long as one of them is a side. It uses the Pythagorean theorem for the sides and SOH CAH TOA for the angles. In our Trigonometry Calculator, press Right angle at C, type the two values you know and press Solve: it gives all three sides, both acute angles, the area and the perimeter.

The calculator solves any triangle, so the right angle is just one of the three values it needs. It redraws your triangle to scale, so you can see the shape as well as the numbers.

Try it

Trigonometry Calculator

Interactive triangle solver with step-by-step

Go to its page

How to use the right triangle calculator

  1. Open the calculator. It starts on the unit circle, so at the top of the sidebar choose Standard triangle.
  2. Under Triangle, find the panel that says "Type any three values, including a side, then Solve". It has boxes for the sides a, b and c and the angles A, B and C.
  3. Press Right angle at C. It puts 90° in the C box, which makes c the hypotenuse, the long side opposite the right angle. The legs are a and b.
  4. Type the two values you know. Side a is opposite angle A, and side b is opposite angle B.
  5. Press Solve. The triangle is redrawn, and Measurements lists every side and angle, the area and the perimeter.

A line under the buttons names the method it used, such as "Two sides and the angle between them (SAS)". The Formulas section adds Pythagoras and SOH CAH TOA cards with your triangle's numbers in. The calculator gives the results but does not write out the working for a solve, so the examples below show it. Angles are in degrees unless you turn off Degrees under Display. Clear empties the boxes for the next triangle.

Which two values can you use?

With the right angle filled in, any two more values work, as long as at least one is a side. Two angles alone fix the shape but not the size, and the calculator says so.

You knowType inMethod line in the calculator
Both legsa and bTwo sides and the angle between them (SAS)
A leg and the hypotenusea and cTwo sides and an angle not between them (SSA)
The hypotenuse and an anglec and ATwo angles and a side (AAS)
A leg and the angle next to itb and ATwo angles and the side between them (ASA)
A leg and the angle opposite ita and ATwo angles and a side (AAS)

Right triangle formulas

Every right triangle calculator uses the same handful of rules. Label the right angle C, the hypotenuse c and the legs a and b, with each side opposite the angle of the same letter.

b = 6c = 6.5a = 2.522.6°67.4°ABC
The triangle from Example 1. Each side is named after the angle opposite it, and c is the hypotenuse
To findFormula
The hypotenusec = √(a² + b²)
A lega = √(c² − b²)
Angle A from two sidessin A = a/c, cos A = b/c, tan A = a/b
A side from an anglea = c sin A, b = c cos A, a = b tan A
The other acute angleB = 90° − A
AreaArea = ½ab, half the product of the legs
Perimetera + b + c
Height to the hypotenuseh = ab/c (not shown by the calculator)

The first two rows are the Pythagorean theorem, which our Pythagorean theorem calculator guide covers in depth, along with the hypotenuse calculator guide. The angle rows are SOH CAH TOA, explained in our SOHCAHTOA calculator guide: sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, and tangent is opposite over adjacent.

Worked examples you can check in the calculator

Example 1: two legs

A right triangle has legs of 2.5 cm and 6 cm. Find the hypotenuse, both angles, the area and the perimeter.

c = \sqrt{2.5^2 + 6^2} = \sqrt{42.25} = 6.5
A = \tan^{-1}\left(\frac{2.5}{6}\right) = 22.62°

Then B = 90° − 22.62° = 67.38°. The area is ½ × 2.5 × 6 = 7.5 cm² and the perimeter is 2.5 + 6 + 6.5 = 15 cm. In the calculator: Right angle at C, a = 2.5, b = 6, Solve. Measurements shows the same five values.

Example 2: a leg and the hypotenuse

The hypotenuse is 15 and one leg is 9. Find the other leg and the angles.

b = \sqrt{15^2 - 9^2} = \sqrt{144} = 12
A = \sin^{-1}\left(\frac{9}{15}\right) = 36.87°

So B = 53.13°. Type a = 9 and c = 15 with the right angle at C. If you type a hypotenuse shorter than the leg, the calculator tells you that no triangle fits, because the hypotenuse is always the longest side.

Example 3: the hypotenuse and an angle

The hypotenuse is 10 and angle A is 35°. Side a is opposite A, so it uses sine, and side b is next to A, so it uses cosine:

a = 10\sin 35° = 5.74
b = 10\cos 35° = 8.19

The third angle is B = 90° − 35° = 55°. In the calculator, type c = 10 and A = 35 with the right angle at C.

Example 4: a leg and an angle, the height of a tree

A tree casts a shadow 6 m long when the sun is 40° above the ground. How tall is the tree? The shadow is the leg next to the 40° angle and the tree is the leg opposite it, so use tangent:

\text{height} = 6\tan 40° = 5.03\ \text{m}

The tree is about 5.03 m tall, and the line from the top of the tree to the end of the shadow is 6 ÷ cos 40° = 7.83 m. In the calculator, put the 40° at A, so the shadow is b = 6 and the tree is a. Solve gives a = 5.03 and c = 7.83.

Now try one in the course, then press Mark to check it:

Find the missing side practice.

Press Mark to have your answer marked in the Trigonometry course.

Right triangle angle calculator: finding the angles

To find an angle, you need two sides. Choose the ratio that uses the two sides you have, then use the inverse function, written sin⁻¹, cos⁻¹ or tan⁻¹ (arcsin, arccos and arctan in the US). The two acute angles always add up to 90°, so once you have one, the other is 90° minus it.

For a quick angle without solving the whole triangle, use the calculator's Evaluate box. With Degrees on, inverse functions give degrees, so typing atan(2.5/6) gives 22.619865, the angle from Example 1. Typing asin(9/15) gives 36.869898, the angle from Example 2.

Special right triangle calculator: 45-45-90 and 30-60-90

Two right triangles have sides in fixed ratios, so you can find every side from one of them without trigonometry.

TriangleAnglesSides in the ratioExample
Isosceles right45°, 45°, 90°1 : 1 : √2Legs 4 and 4, hypotenuse 4√2 ≈ 5.66
Half an equilateral30°, 60°, 90°1 : √3 : 2Short leg 5, long leg 5√3 ≈ 8.66, hypotenuse 10

In the 30-60-90 triangle, the hypotenuse is always twice the shortest side, and the shortest side is opposite the 30° angle. To check the example, type a = 5 and A = 30 with the right angle at C: the calculator gives b = 8.66 and c = 10. Type a = 4 and b = 4 and the triangle is labelled isosceles right, with c = 5.66.

Area and perimeter of a right triangle

The two legs of a right triangle are a base and its height, so the area is half their product. For legs of 7 and 24, the area is ½ × 7 × 24 = 84 and the hypotenuse is 25, so the perimeter is 7 + 24 + 25 = 56. Measurements gives both after a solve. If you only know the hypotenuse and an angle, find the legs first, as in Example 3, then halve their product: ½ × 5.74 × 8.19 = 23.5.

Common mistakes

  • Putting the hypotenuse in the wrong place. It is always opposite the right angle and always the longest side. With the right angle at C, it is c.
  • Mixing up opposite and adjacent. They depend on which angle you are using. The side opposite A is next to B.
  • A calculator in radians. sin 35 in radians is about −0.43, not 0.57. Check your calculator shows DEG.
  • Solving with only angles. Two angles tell you the shape but not the size. You need at least one length.
  • Forgetting the angles add to 90°. The two acute angles of a right triangle always sum to 90°, which is a quick check on your answers.
  • Rounding too early. Keep full values until the end, especially when one answer feeds into the next.

Practise right triangles in a short timed paper

Right triangle trigonometry comes up in Geometry, Algebra 2 & SAT Math practice, and in GCSE Maths Higher in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. The Trigonometry course starts with the sides of a right triangle and works up to the sine and cosine rules for any triangle.

Common questions

How do you solve a right triangle?
You need two values besides the right angle, and at least one must be a side. Use the Pythagorean theorem when you know two sides, SOH CAH TOA to find a side from an angle, and the inverse trig functions to find an angle from two sides. The two acute angles add to 90°.
How do you find the angles of a right triangle?
Pick the trig ratio that uses the two sides you know, then use the inverse function: for example, A = tan⁻¹(opposite ÷ adjacent). The other acute angle is 90° minus the first.
Can you solve a right triangle with only the angles?
No. The angles fix the shape, but a triangle with the same angles can be any size. You need at least one side length.
Is the hypotenuse always the longest side?
Yes. It is opposite the largest angle, the right angle, so it is always longer than either leg.
How do you find the area of a right triangle?
Multiply the two legs and halve the result: area = ½ × a × b. The hypotenuse is not used.
What is a 30 60 90 triangle?
A right triangle with angles of 30°, 60° and 90°. Its sides are in the ratio 1 : √3 : 2, so the hypotenuse is twice the shortest side.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Trigonometry Calculator

    Interactive triangle solver with step-by-step

    Open the tool
  • Learn it

    Trigonometry

    Understand the true math behind everyday geometry with trig functions and identities

    Start the course
  • Test it

    Geometry, Algebra 2 & SAT Math

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · GeometryRight angle: definition, symbol and right trianglesWhat a right angle is, its symbol, how to check for one with the 3-4-5 rule, perpendicular lines, and right triangles and the Pythagorean theorem.