Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Right triangle calculator

Enter any two values, such as two sides, or one side and one acute angle. The calculator finds the rest, draws the triangle and shows each step with the Pythagorean theorem and SOH CAH TOA.

Fill in any two boxes, at least one a side, and leave the rest empty. C is the right angle.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Not a right angle? Use the triangle calculator (law of sines and cosines). Need exact radicals for 30-60-90 or 45-45-90? Try the special right triangle calculator.

How the right triangle is solved

Label the legs a and b, the hypotenuse c (the longest side, across from the right angle C), and the acute angles A and B, each across from the side with the same letter. Two facts do all the work:

a² + b² = c²
sin A = a/c   cos A = b/c   tan A = a/b
A + B = 90°

With two sides, the Pythagorean theorem gives the third, and an inverse trig function gives an angle. With a side and an angle, sine, cosine or tangent gives the other sides. Two angles alone aren't enough: every triangle with the same angles has the same shape but could be any size.

The calculator also reports:

  • Area = ½ab, because the legs are a base and its height.
  • Altitude to the hypotenuse h = ab/c, from writing the area two ways: ½ab = ½ch.
  • Hypotenuse segments a²/c and b²/c, the two pieces the altitude cuts the hypotenuse into.
  • Inradius (a + b − c)/2 and circumradius c/2. The hypotenuse is always a diameter of the circumscribed circle.

Worked example

A ladder 10 ft long leans against a wall at 30° from the ground. How high does it reach, and how far is its foot from the wall?

  1. The ladder is the hypotenuse, c = 10. Put angle A = 60° at the top, so the angle at the ground is B = 30°.
  2. Height up the wall (side b, across from B): b = c·sin B = 10 × 0.5 = 5 ft.
  3. Distance from the wall (side a): a = c·cos B = 10 × 0.866025 = 8.660254 ft.
  4. Area = ½ × 5 × 8.660254 = 21.650635 sq ft, and the perimeter is 23.660254 ft.

Enter c = 10 and B = 30 above to see the same numbers, or the classic 3-4-5 triangle that loads by default.

Common right triangles

TriangleSidesAngles
3-4-53, 4, 536.87°, 53.13°, 90°
5-12-135, 12, 1322.62°, 67.38°, 90°
8-15-178, 15, 1728.07°, 61.93°, 90°
45-45-901, 1, √245°, 45°, 90°
30-60-901, √3, 230°, 60°, 90°

For exact answers with radicals on the two special triangles, use the 30-60-90 and 45-45-90 calculator.

When to use a different tool

This calculator assumes one angle is exactly 90°. For any other triangle, including ones solved with the law of sines or cosines (SSS, SAS, ASA, AAS or SSA), use the triangle calculator. If you only need the missing side, the Pythagorean theorem calculator is quicker. Measurements in real life carry error, so a triangle built from measured sides may be slightly off from 90°.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • Legs 3 and 4: hypotenuse 5, angle A = arctan(3/4) = 36.869898° ✓
  • Hypotenuse 10 and A = 30°: a = 5, b = 10·cos 30° = 8.660254, area 21.650635 ✓
  • Leg 5 and hypotenuse 13: other leg 12 ✓
  • Leg b = 7 with B = 45°: c = 7√2 = 9.899495 ✓
  • Edge case: a leg as long as the hypotenuse is rejected ✓
  • Edge case: two angles alone can't fix the size ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

How do you solve a right triangle?

You need two values besides the right angle, and at least one must be a side. Use a² + b² = c² when you know two sides, and sin, cos or tan when you know a side and an angle. The two acute angles always add up to 90°.

How do you find the hypotenuse?

Square both legs, add them and take the square root: c = √(a² + b²). With legs 3 and 4, c = √25 = 5.

How do you find the angles of a right triangle from its sides?

Use an inverse trig function. With legs a and b, A = arctan(a/b). With leg a and hypotenuse c, A = arcsin(a/c). Then B = 90° − A.

What is the area of a right triangle?

Half the product of the legs: ½ab. A 3-4-5 triangle has area ½ × 3 × 4 = 6.

Can a right triangle be solved from two angles?

No. Two angles give the shape but not the size, so you need at least one side length.

Related calculators