BedrockCalculator
Figures cited to primary sourcesWritten by Aapt Dubey, MBA (Marketing & Banking), ISB 4 primary sourcesLast updated

Pythagorean Theorem Calculator: Right Triangle Sides, Angles and Hypotenuse

Solve a right triangle from two legs, a leg and the hypotenuse, or a side and an angle. Gives every side and angle, plus 45-45-90 and 30-60-90 triangles.

Quick Answer: In a right triangle the square of the hypotenuse equals the sum of the squares of the two legs, a² + b² = c². Legs of 3 and 4 give a hypotenuse of c = 5 cm, since 9 + 16 = 25.

Assumptions

Computed

Preset scenarios

Missing sides
c = 5 cm
Hypotenuse c
5 cm
Leg a
3 cm
Leg b
4 cm
Angles
A 36.8699°, B 53.1301°, and the right angle
Area
6 cm²
Perimeter
12 cm
Height to the hypotenuse
2.4 cm

Pythagorean triples

Download CSV
Each row is this calculator run on the two legs shown. The hypotenuse comes out a whole number, which is what makes the three a Pythagorean triple; angle A is rounded to four decimal places.
Leg aLeg bHypotenuse cAngle A (degrees)
34536.8699
5121322.6199
681036.8699
7242516.2602
8151728.0725
9121536.8699
9404112.6804
10242622.6199
11606110.3889
12162036.8699
12353718.9246
15202536.8699
20212943.6028
28455331.8908
33566530.5102

This table and its CSV are free to reuse with a link to this page, CC BY 4.0.

Special right triangles by leg

Download CSV
Each row is this calculator run in 45-45-90 or 30-60-90 mode on leg a. The other sides are a times the square root of 2 or 3, rounded to four decimal places.
Leg aAngle A (degrees)Leg bHypotenuse c
14511.4142
1301.73212
24522.8284
2303.46414
34534.2426
3305.19626
44545.6569
4306.92828
54557.0711
5308.660310
64568.4853
63010.392312
845811.3137
83013.856416
10451014.1421
103017.320520
12451216.9706
123020.784624

This table and its CSV are free to reuse with a link to this page, CC BY 4.0.

Pythagorean Theorem Calculator: Right Triangle Sides, Angles and Hypotenuse: Missing sides c = 5 cm (What do you know?: Both legs (a and b): find the hypotenuse; Leg a: 3; Leg b: 4; Length unit: Centimetres (cm)).

Save or share this result

A one-page summary of this calculator's default example, drawn from the same calculation as the result above.

The infographic is free to reuse with a link to this page, CC BY 4.0.

Illustration of a wooden ladder against a pale brick wall, with a set square, a coil of string and a level on the floor
Quick Answer: In a right triangle the square of the hypotenuse equals the sum of the squares of the two legs, a² + b² = c². Legs of 3 and 4 give a hypotenuse of c = 5 cm, since 9 + 16 = 25.

What does this calculator do?

This Pythagorean theorem calculator solves a right triangle from any two things you know about it: both legs, a leg and the hypotenuse, or one side and one of the acute angles. It returns the missing sides, both acute angles, the area, the perimeter and the height from the right angle to the hypotenuse.

Two extra modes build the special right triangles, 45-45-90 and 30-60-90, from a single leg.

The naming is fixed throughout. The legs a and b are the two sides that meet at the right angle. The hypotenuse c is the side opposite the right angle and is always the longest. Angle A sits opposite leg a, angle B opposite leg b, and the two add up to 90 degrees.

Any length unit works, as long as every side you enter is in the same one. The working runs at 34-digit precision and the results are rounded to four decimal places for display.

Using the Pythagorean Theorem Calculator

  1. Choose what you know from the list. The first option, both legs, is the classic hypotenuse problem.
  2. Fill in the boxes that mode needs. Angle A must be above 0 and below 90 degrees, and a hypotenuse must be longer than the leg you pair it with.
  3. Pick your unit.

The headline shows the sides you did not enter. The cards show all three sides, the angles, the area, the perimeter and the height to the hypotenuse. The presets solve a 6 by 8 ft frame's diagonal brace, how high a 13 ft ladder reaches with its foot 5 ft out, a 45-45-90 triangle with legs of 10 and a 30-60-90 triangle with a short leg of 5.

How is this calculated?

  1. Two sides known. The Pythagorean theorem gives the third. With both legs, the hypotenuse is the square root of the sum of their squares. With a leg and the hypotenuse, the other leg is the square root of the difference.

c = √(a² + b²); b = √(c² − a²)

  1. One side and angle A known. The trigonometric ratios fill in the rest. From leg a: b = a ÷ tan A and c = a ÷ sin A. From leg b: a = b × tan A and c = b ÷ cos A. From the hypotenuse: a = c × sin A and b = c × cos A.

sin A = a/c; cos A = b/c; tan A = a/b

  1. Special triangles. A 45-45-90 triangle with leg x has sides x, x and x√2. A 30-60-90 triangle with short leg x has sides x, x√3 and 2x.
  1. Angles. Once both legs are known, angle A is the arctangent of a over b, converted from radians to degrees, and angle B is 90 minus A.

A = arctan a/b; B = 90^∘ − A

  1. Area, perimeter and altitude. The legs are a base and a height for each other, so the area is half their product. The perimeter adds all three sides. The altitude to the hypotenuse is twice the area divided by the hypotenuse.

Area = ab/2; h_c = ab/c

  1. Round for display to four decimal places, half up.

Worked Example

The default is legs of 3 cm and 4 cm.

  1. Hypotenuse: the square root of 3² + 4², which is the square root of 25, 5 cm.
  2. Angle A: the arctangent of 3/4, 36.8699°; angle B is 53.1301°.
  3. Area: 3 × 4 ÷ 2 = 6 cm². Perimeter 12 cm. Height from the right angle to the hypotenuse: 12 ÷ 5 = 2.4 cm.

A frame 6 ft by 8 ft needs a diagonal brace of 10 ft. That is the 3-4-5 triangle doubled, the carpenter's way of checking a corner is square.

A 13 ft ladder with its foot 5 ft from the wall is leg a = 5 and hypotenuse c = 13. It reaches 12 ft up the wall, and it leans at 67.3801° to the ground (angle B, between the ground and the ladder).

With a leg of 3 and angle A of 30 degrees, the other leg is 3 ÷ tan 30°, 5.1962, and the hypotenuse is 3 ÷ sin 30°, exactly 6.

How Do You Find the Hypotenuse?

Square both legs, add them, and take the square root. That is the formula for the hypotenuse, c = √(a² + b²). The most common mistake is adding the legs and then taking the root, or forgetting the root altogether.

The table below the calculator lists Pythagorean triples, sets of whole numbers such as 5, 12 and 13 or 8, 15 and 17 that satisfy the theorem exactly, which make handy checks.

How Do You Calculate the Angles of a Right Triangle?

One angle is 90 degrees by definition. For the other two, take the arctangent of the opposite leg over the adjacent leg, or use the sine (opposite over hypotenuse) or cosine (adjacent over hypotenuse) if those are the sides you have. The two acute angles always add up to 90, so finding one gives the other.

On a scientific calculator, make sure it is set to degrees before you take an inverse tangent.

What Are the Special Right Triangles?

Two right triangles have sides in fixed ratios that are worth remembering, because their angles turn up constantly.

  • 45-45-90. The two legs are equal and the hypotenuse is a leg times the square root of 2. It is half of a square cut along its diagonal, which makes it the isosceles right triangle. A leg of 10 gives a hypotenuse of 14.1421.
  • 30-60-90. The hypotenuse is twice the short leg, and the long leg is the short leg times the square root of 3. It is half of an equilateral triangle. A short leg of 5 gives a long leg of 8.6603 and a hypotenuse of 10.

The second table below the calculator lists both for legs from 1 to 12.

What does this calculator not account for?

  • Triangles without a right angle. The Pythagorean theorem only holds for right triangles. For any other triangle use the triangle calculator, which works from the law of cosines.
  • Angles in radians. Angle A is entered in degrees.
  • Unit conversion. All sides must be in one unit; nothing is converted.
  • Exact surds. The answers are decimals. The calculator does not write results such as 5√3 in radical form, though the special-triangle tables show the decimal values of those ratios.
  • Measured right angles. A corner that is not quite square makes the real diagonal differ from the computed one. That difference is exactly what a 3-4-5 check is used to catch.

What mistakes do people make with this?

  • Treating the hypotenuse as a leg. The hypotenuse is opposite the right angle. If you put the longest side in as a leg, the theorem gives an even longer "hypotenuse" that does not exist.
  • Subtracting the wrong way. For a missing leg, subtract the leg's square from the hypotenuse's square, not the other way round. The calculator refuses a hypotenuse that is not longer than the leg.
  • Mixing up opposite and adjacent. Angle A here is opposite leg a. If your angle sits next to the side you know, it is angle B; enter 90 minus it as A, or swap which leg you call a.
  • Calculator in radians. Taking sin 30 in radian mode gives a negative number and a nonsense triangle.
  • Rounding the legs before squaring. The error grows when squared. Keep full precision until the end.

Frequently Asked Questions

What is the Pythagorean theorem?

In a right triangle, the area of the square on the hypotenuse equals the areas of the squares on the other two sides added together: a² + b² = c². It appears as Proposition 47 of the first book of Euclid's Elements.

How do I find a missing leg?

Square the hypotenuse, subtract the square of the known leg, and take the square root. A ladder of 13 with its foot 5 out reaches 12.

Is an isosceles triangle a right triangle?

Only if its apex angle is 90 degrees. That case is the 45-45-90 triangle. Most isosceles triangles are not right triangles.

What is a slope triangle?

On a graph, the slope triangle under a line has the run as one leg and the rise as the other. The line itself is the hypotenuse, so its length is the square root of rise squared plus run squared, and the angle of the slope is the arctangent of rise over run. Enter the run as leg b and the rise as leg a.

How can I check that a corner is square?

Measure 3 units along one side and 4 along the other. If the diagonal between the marks is 5, the corner is a right angle. Larger multiples such as 6, 8 and 10 are more accurate on big jobs.

Does the theorem work in three dimensions?

Yes, applied twice. The diagonal of a box is the square root of length squared plus width squared plus height squared. The rectangular prism calculator gives it as the space diagonal.

Sources

Did this calculator answer your question?

How this calculator is tested

This calculator is checked by 9 automated test cases: specific inputs whose correct result is known in advance, and rules the output must always obey. They run on every change to the site. See the testing and corrections policy.

Show the test cases
  • Default: legs 3 and 4 give a hypotenuse of 5
  • a 6 by 8 ft frame needs a 10 ft brace
  • a 13 ft ladder 5 ft from the wall reaches 12 ft up
  • leg b and hypotenuse give leg a
  • a side and an angle use the trigonometric ratios
  • 45-45-90 with legs of 10 has a hypotenuse of 10 sqrt 2
  • 30-60-90 with a short leg of 5
  • refuses a hypotenuse no longer than the leg, and a right angle as angle A
  • builds the reference tables from compute()

Add This Website as Preferred Source on Google

See Bedrock Calculator first in your Search results & AI Overviews