StatGardenREF. DESK
Calculators/Geometry/Right triangle / Pythagoras
Geometry

Right triangle / Pythagoras calculator

Third side, angles and area of a right-angled triangle.

What this calculator does

Pythagoras’ theorem relates the three sides of a right triangle: the square of the hypotenuse equals the sum of the squares of the other two sides. It is probably the most widely used result in all of mathematics, appearing wherever a diagonal, a distance or a perpendicular is involved.

From the two legs everything else follows. The angles come from the arctangent of their ratio, the area is simply half their product since the legs are perpendicular, and the altitude onto the hypotenuse falls out of the area.

The formula

Formulac = √(a² + b²); angle A = atan(a/b); Area = ab/2

The theorem gives the hypotenuse directly. Because the legs meet at a right angle, one is already the perpendicular height onto the other, so the area needs no extra construction. The altitude to the hypotenuse follows from equating the two ways of expressing that same area.

TermMeaning
LegsThe two sides meeting at the right angle.
HypotenuseThe longest side, opposite the right angle.
AltitudeThe perpendicular from the right angle onto the hypotenuse.
Pythagorean tripleThree whole numbers satisfying a² + b² = c².

The inputs explained

FieldWhat to enter
Leg aThe length of one leg.
Leg bThe length of the other leg. Both must meet at a right angle.

When to use it

Finding a diagonal

The diagonal of any rectangle is the hypotenuse of a right triangle formed by two adjacent sides. This covers screen sizes, doorway clearances and whether furniture will fit.

Squaring up a structure

The 3-4-5 method checks a corner is truly square. Any multiple works, and larger multiples give better accuracy over long runs.

Calculating a slope or ramp length

Horizontal run and vertical rise give the ramp length as the hypotenuse, and the angle tells you whether it meets accessibility requirements.

Bracing and roof members

A diagonal brace across a rectangular frame is the hypotenuse of the two sides it spans.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

Pythagorean triples and near-triples

One leg held at 3 while the other varies, including the classic 3-4-5 case.

One leg fixed at 3
Second legHypotenuse cAreaAngle opposite aAngle opposite b
13.1621.50071.57°18.43°
45.0006.00036.87°53.13°
55.8317.50030.96°59.04°
88.54412.00020.56°69.44°
1212.36918.00014.04°75.96°
2020.22430.0008.53°81.47°
Only the 3-4 row gives a whole-number hypotenuse. Pythagorean triples are rare, which is why the handful of small ones, 3-4-5, 5-12-13, 8-15-17, are worth memorising.

Diagonals of common rectangles

Treating the two legs as the sides of a rectangle, the hypotenuse is its diagonal.

Rectangle diagonals
With a 9 unit sideHypotenuse cAreaAngle opposite aAltitude to hypotenuse
9 × 912.72840.50045.00°6.364
9 × 1215.00054.00036.87°7.200
9 × 1618.35872.00029.36°7.844
9 × 2021.93290.00024.23°8.207
9 × 4041.000180.00012.68°8.780
A 9 by 16 rectangle has a diagonal of about 18.36: that ratio is the familiar 16:9 widescreen shape, where the diagonal is the number quoted as the screen size.

Questions

What is Pythagoras’ theorem?

For a right triangle, a² + b² = c², where c is the hypotenuse. It only holds when one angle is exactly 90°; for other triangles the cosine rule generalises it.

What is a Pythagorean triple?

Three whole numbers satisfying the theorem, such as 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple is also a triple, which is why 6-8-10 works too.

How do I find the angles?

Take the arctangent of the ratio of the opposite leg to the adjacent one. The two non-right angles always sum to 90°, so finding one gives the other immediately.

Why is the area just half the product of the legs?

Because the legs are perpendicular, so one is already the height relative to the other. No separate height measurement is needed.

How do I check a corner is square?

Measure 3 units along one side and 4 along the other. If the diagonal between those points is exactly 5, the corner is square. Use larger multiples for greater accuracy over long distances.

For triangles without a right angle, see triangle from three sides. For coordinates, use the distance and midpoint calculator.