← All calculatorsGeometry & Trigonometry

Right Triangle Calculator

Solves a right triangle from its two perpendicular legs, giving the hypotenuse, both acute angles and the area.

Hypotenuse c
5
Area
6
Angle A
36.87°
Angle B
53.13°

How to use the Right Triangle Calculator

  1. Identify the two legs — the sides meeting at the right angle.
  2. Enter each leg length in consistent units.
  3. Read the hypotenuse, the side opposite the right angle.
  4. Read both acute angles, which always sum to 90°.
  5. Use the area for triangular gussets, braces or roof sections.

How the calculation works

The Pythagorean theorem fixes the hypotenuse from the two legs: the square on the hypotenuse equals the sum of the squares on the other two sides. It is the single most-used relationship in practical geometry, underpinning setting out, bracing, diagonal checks and every distance calculation in coordinate space.

The acute angles come from the arctangent of the leg ratio. Since the three angles sum to 180° and one is already 90°, the two acute angles must total 90° — each is the other's complement. That relationship is a free check on any manual calculation, and it is why knowing one acute angle immediately gives the other.

The 3-4-5 triangle and its multiples are the field trick worth remembering. Measuring 3 units along one line and 4 along another, then adjusting until the diagonal reads exactly 5, guarantees a true right angle without any instrument. Bricklayers, formwork carpenters and surveyors have used the method for millennia, typically scaled to 6-8-10 or 9-12-15 for better accuracy over longer runs.

Formula
c = √(a² + b²); A = arctan(a/b); B = 90° − A; area = ab/2

Source: Pythagorean theorem, Euclid, Elements Book I, Proposition 47.

Worked example

A roof rises 2.4 m over a horizontal run of 4.8 m. What is the rafter length and the pitch?

  1. Legs: rise a = 2.4 m, run b = 4.8 m.
  2. Rafter: √(2.4² + 4.8²) = √(5.76 + 23.04) = √28.8 = 5.37 m.
  3. Pitch angle: arctan(2.4 / 4.8) = arctan(0.5) = 26.57°.
  4. Gable area: (2.4 × 4.8) / 2 = 5.76 m² per half.

A 5.37 m rafter at a 26.57° pitch — a 1:2 slope, and about 12.4 m² for the full gable triangle.

Frequently asked questions

What if I know one leg and the hypotenuse?+

Rearrange: the missing leg is √(c² − a²). The hypotenuse calculator reports that directly.

Does the theorem work for non-right triangles?+

No. Use the law of cosines, which generalises it by adding a correction term involving the included angle.

Why is the hypotenuse always the longest side?+

It sits opposite the largest angle, the 90° one, and in any triangle the longest side faces the largest angle.

Is roof pitch the same as the angle?+

Not usually. Builders often quote pitch as a rise-over-run ratio such as 6:12, which is a slope of 0.5 and an angle of 26.57°.

Last reviewed August 31, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.

Related

More in Geometry & Trigonometry