Right Triangle & Pythagorean Calculator

Legs of 5 and 12 give a hypotenuse of 13, angles of about 22.6 and 67.4 degrees, and an area of 30, another Pythagorean triple. Use it for ramps, stairs, roofs, ladders and any right-angle layout: a ladder leaning on a wall forms a right triangle with the ground. The angles tell you the slope, and the hypotenuse is the length of the ladder, rafter or ramp surface you need.

Right Triangle & Pythagorean Calculator: inputs

Calculated result
Hypotenuse (c)13
Angle A (degrees)22.6
Angle B (degrees)67.4
Area30

Right Triangle & Pythagorean Calculator: Leg a sensitivity

Right Triangle & Pythagorean Calculator: Leg a and Hypotenuse (c)5 calculations vary the “Leg a” input while holding the other entered inputs constant.412.64.512.85135.513.2613.4

Right Triangle & Pythagorean: worked example

Leg a5
Leg b12
Hypotenuse (c)13
Angle A (degrees)22.6
Angle B (degrees)67.4
Area30

Right Triangle & Pythagorean: formula

c = √(a² + b²); angle A = arctan(a ÷ b); angle B = 90° − A; area = ½ab

Pythagorean Theorem: Wolfram MathWorld

Enter the two legs of the right triangle, a and b. The calculator finds the hypotenuse with the Pythagorean theorem, the two acute angles with the arctangent and the area. Angle A is opposite leg a.

The angles add up to 90 degrees. If you know one leg and the hypotenuse, use the Pythagorean theorem calculator or subtract to find the other leg.

Right Triangle & Pythagorean: changing Leg a

Leg aHypotenuse (c)Angle A (degrees)Angle B (degrees)Area
412.618.471.624
4.512.820.669.427
5 (example)1322.667.430
5.513.224.665.433
613.426.663.436

Right Triangle & Pythagorean: compare input ranges

InputTested fromToHypotenuse (c): low inputHypotenuse (c): high inputSwing
Leg b111312.113.91.8 (14%)
Leg a4.55.512.813.20.384 (3.0%)

Right Triangle & Pythagorean: individual input comparisons

InputValueHypotenuse (c)Angle A (degrees)Angle B (degrees)Area
Leg a412.618.471.624
4.512.820.669.427
51322.667.430
5.513.224.665.433
613.426.663.436
Leg b1011.226.663.425
1112.124.465.627.5
121322.667.430
1313.9216932.5
1414.919.770.335

Right Triangle & Pythagorean: combined input changes

Leg a / Leg b101214
410.812.614.6
4.51112.814.7
511.21314.9
5.511.413.215
611.713.415.2

Right Triangle & Pythagorean: which assumptions move the result?

Right Triangle & Pythagorean: Hypotenuse (c) as Leg b changesHypotenuse (c) starts at 11.2. Moving Leg b from 10 to 14 changes it to 14.9, with Leg a 5 kept fixed.1011.21112.112131313.91414.9
Chart quantityDisplayed settings
Leg b10 → 14
Hypotenuse (c)11.2 → 14.9
Leg a5
Right Triangle & Pythagorean: Hypotenuse (c) as Leg a changesHypotenuse (c) starts at 12.6. Moving Leg a from 4 to 6 changes it to 13.4, with Leg b 12 kept fixed.412.64.512.85135.513.2613.4
Chart quantityDisplayed settings
Leg a4 → 6
Hypotenuse (c)12.6 → 13.4
Leg b12

Right Triangle & Pythagorean: values and definitions

Quantity and definitionValue used
Leg a5
Leg b12
Hypotenuse (c)13
Angle A (degrees)22.6
Angle B (degrees)67.4
Area30

Right Triangle & Pythagorean: half and double Leg b

Leg bHypotenuse (c)
67.8
1213
2424.5

Common error: Mixing up which leg goes with which angle. Angle A sits opposite leg a, so the longer leg faces the larger angle.

The triangle must have a right angle, or the formulas do not apply. Small errors in measuring the legs can shift the angles, especially in thin triangles. Angles are given in degrees.

For other triangles use the law of sines or the triangle side calculator.

Geometry calculators: Aquarium Volume Calculator, Annulus Area Calculator, Regular Polygon Calculator, Rhombus Area Calculator, Hemisphere Volume Calculator, Cone Frustum Calculator.

Two legs of a right triangle fix everything else. The hypotenuse follows from the Pythagorean theorem, the angles from the ratio of the legs, and the area from half their product. A 5 by 12 triangle has a 13 unit hypotenuse, angles of about 22.6 and 67.4 degrees, and an area of 30.

That angle is what you set on a saw or a level when you have only tape measure readings. For comparison, a 3 by 4 triangle has a hypotenuse of 5 and an 8 by 15 triangle has 17. These whole-number sets, 3-4-5, 5-12-13 and 8-15-17, are why builders can check a square corner with a tape measure alone.

Confirm the corner really is square. The formulas assume a 90 degree angle, and a slightly off corner gives an angle that only looks right.

See the Pythagorean theorem calculator for the hypotenuse, the trigonometry page for sine and cosine, and the distance and slope calculator for coordinates. The triangle area and equilateral triangle pages cover other triangles, and the stair, roof and ramp calculators in the trades categories apply right triangles.

Right Triangle & Pythagorean Calculator: application examples

Pythagorean Theorem Calculator

Calculate the hypotenuse of a right triangle from its two legs. Only applies to right triangles: a 90° angle between the two legs.

Pythagorean Theorem Calculator: full formula

Leg A3
Leg B4
Hypotenuse5
Triangle area6

The hypotenuse is the square root of the sum of the squares of the legs. Legs of 3 and 4 give a hypotenuse of 5 and an area of 6, the classic 3-4-5 right triangle. Builders use the 3-4-5 rule to check that corners are square: measure 3 feet along one wall, 4 along the other and confirm the diagonal is 5.

It also gives the straight-line distance between two points on a grid.

Enter the lengths of the two legs of a right triangle, the sides that meet at the right angle, in the same unit. The hypotenuse is the longest side, opposite the right angle. The theorem says the square of the hypotenuse equals the sum of the squares of the legs.

To find a leg instead, use the right triangle calculator. Make sure the triangle really has a right angle before using the theorem.

The theorem only holds when the angle between the two given sides is ninety degrees. Apply it to a triangle that merely looks roughly square and the hypotenuse comes out wrong, sometimes by a meaningful margin depending on how far the real angle sits from ninety.

Confirm the two known sides meet at a right angle, ideally measured, before running the calculation. A framing square or a measured 3-4-5 check is more reliable than eyeballing it.

Applying the theorem to any triangle with a roughly square corner. Off by even a few degrees, the result stops being the hypotenuse of anything real and becomes a number that only looks like one.

Solve for angles and missing legs on the right triangle calculator, general triangles on the law of sines and triangle side pages, and distance on the distance and slope calculator. The rectangular prism page gives space diagonals, and the roof and stair tools in the carpentry category use right triangles.

What are Pythagorean triples?

Sets of whole numbers that satisfy the theorem, such as 3-4-5, 5-12-13 and 8-15-17, useful for quick checks.

Pythagorean Theorem: changing Leg A

Pythagorean Theorem Calculator: hypotenuse and triangle area and angle a (degrees) and angle b (degrees) across a range of leg a, every other input held at the worked-example value.
Leg AHypotenuseTriangle areaAngle A (degrees)Angle B (degrees)
2.44.74.83159
2.74.85.43456
3 (example)5636.953.1
3.35.26.639.550.5
3.65.47.24248

Pythagorean Theorem: compare input ranges

Pythagorean Theorem Calculator: hypotenuse with each input moved on its own, every other input held at the worked-example value.
InputTested fromToHypotenuse: low inputHypotenuse: high inputSwing
Leg B3.64.44.75.30.639 (13%)
Leg A2.73.34.85.20.36 (7.2%)

Pythagorean Theorem: individual input comparisons

Pythagorean Theorem Calculator: each input varied independently; remaining quantities retain their worked-example settings.
InputValueHypotenuseTriangle areaAngle A (degrees)Angle B (degrees)
Leg A2.44.74.83159
2.74.85.43456
35636.953.1
3.35.26.639.550.5
3.65.47.24248
Leg B3.24.44.843.246.8
3.64.75.439.850.2
45636.953.1
4.45.36.634.355.7
4.85.77.23258

Pythagorean Theorem: combined input changes

Pythagorean Theorem Calculator: hypotenuse at each combination of leg a (rows) and leg b (columns).
Leg A / Leg B3.244.8
2.444.75.4
2.74.24.85.5
34.455.7
3.34.65.25.8
3.64.85.46

Pythagorean Theorem: values and definitions

Pythagorean Theorem Calculator: worked-example quantities, units and calculated results.
Quantity and definitionValue used
Leg A3
Leg B4
Hypotenuse5
Triangle area6
Angle A (degrees)36.9
Angle B (degrees)53.1

Pythagorean Theorem: half and double Leg B

Pythagorean Theorem Calculator: half, original and double leg b, with all other assumptions unchanged.
Leg BHypotenuse
23.6
45
88.5

What is the Pythagorean theorem? In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides

How can I check a corner is square? Measure 3 units along one side and 4 along the other. If the distance between the marks is 5 units, the corner is a right angle

The theorem applies only to right triangles, and for other triangles you need the law of cosines. Measurement errors show up in the result, especially for long distances. Units must match.

In three dimensions, the space diagonal of a box extends the formula with a third term.

What is a 5-12-13 triangle?

A right triangle with legs 5 and 12 and hypotenuse 13, one of the Pythagorean triples that fit the theorem with whole numbers.

How steep is a 22 degree slope?

It rises about 0.4 for each unit of run, which is a grade of about 40%.

How do I find the angles of a right triangle?

Use the arctangent of the opposite leg over the adjacent leg for one angle, and subtract it from 90 degrees for the other.