Mathematics calculator

Pythagorean Theorem Calculator

Choose the side you want to calculate, then enter the other two sides of the right triangle.

Calculator inputs

Enter your values

Right triangle
The selected side is calculated from the other two values.
Calculated output

Result summary

Your result will appear here

Complete the required fields and select the calculate button.

What is Pythagorean Theorem?

The Pythagorean theorem links the three side lengths of a right triangle. If you know any two sides, this calculator finds the third and adds all three lengths to give the perimeter. Builders can use the relationship to check a square corner, surveyors use it for indirect distances, and students use it to solve geometry exercises.

The theorem applies only when one angle is exactly 90 degrees. The side opposite that right angle is the hypotenuse, labeled c here, and it must be the triangle’s longest side. Entries can represent centimetres, feet, metres or another length unit, as long as both known sides use the same unit. The calculated side and perimeter then use that unit too.

How to Use This Calculator

  1. Identify the hypotenuse before entering values. It is the side across from the right angle, not simply whichever side happened to be measured last.
  2. Enter exactly two positive side lengths and leave the unknown field empty. To find c, enter both legs a and b. To find a leg, enter the other leg and c.
  3. Select Calculate. When c is missing, the page adds the squares of the legs and takes the square root. When a leg is missing, it subtracts the known leg’s square from c squared before taking the square root.
  4. Read the returned sides and perimeter. Side values are shown to four decimal places and the perimeter to two.

If c is supplied, it must be longer than the known leg. A zero, negative length, three filled fields or fewer than two filled fields is not a valid request.

Formula Used

a2 + b2 = c2

When the hypotenuse is missing: c = √(a² + b²). When leg a is missing: a = √(c² − b²). When leg b is missing: b = √(c² − a²). After finding the missing side, perimeter P = a + b + c.

Variables Explained

EntryMeaningEntry rule
aOne leg adjoining the right angleEnter a positive length or leave it empty when this is the unknown leg.
bThe other leg adjoining the right angleUse the same unit as every other entered side.
cHypotenuse opposite the right angleWhen entered, it must be longer than the known leg.
PPerimeter around the triangleThe page adds all three side lengths after solving the missing one.

Worked Example

For a right triangle with legs a = 6 cm and b = 8 cm, leave c blank. Square the legs: 6² = 36 and 8² = 64. Add them to get 100, then take the square root: c = √100 = 10 cm. The perimeter is 6 + 8 + 10 = 24 cm. The response displays a as 6.0000, b as 8.0000, c as 10.0000 and the perimeter as 24.00.

The reverse calculation also works. If b = 8 cm and c = 10 cm, leave a empty. Then a = √(10² − 8²) = √36 = 6 cm. These familiar 6–8–10 lengths are a scaled version of the 3–4–5 right triangle.

Why Use This Calculator?

The calculated value is the unique missing side for a right triangle with the two supplied lengths. It does not prove that a physical corner is square unless all three measurements agree, within reasonable measurement tolerance, with a² + b² = c². Small differences can come from measurement uncertainty, uneven surfaces or rounding.

A perimeter is a one-dimensional total, so report it in cm, m, ft or the unit used for the entries, never in square units. If the result will guide a cut or layout, keep more digits than the display offers in your working measurements and allow for tool accuracy, material thickness and construction tolerance. A drawing that merely looks right-angled is not enough; confirm the 90-degree condition.

Common Mistakes

  • Applying the theorem to a triangle that does not contain a right angle.
  • Labeling a shorter side as c. The hypotenuse is opposite the right angle and is always longest.
  • Entering all three sides even though the page is designed to solve one missing value.
  • Subtracting when finding c; the two leg squares must be added.
  • Adding when finding a leg; subtract the known leg’s square from the hypotenuse’s square.
  • Mixing inches and centimetres without converting first.
  • Rounding a newly calculated side before using it in the perimeter.

Frequently Asked Questions

Which side should be entered as c?

Use c for the hypotenuse, the side directly opposite the 90-degree angle. It is longer than either leg. The labels a and b can be swapped without changing the calculation.

Can the theorem find a side in any triangle?

No. This relationship is specific to right triangles. For a triangle without a 90-degree angle, another relationship such as the law of cosines may be appropriate.

Why must I enter exactly two sides?

Two known sides determine the third side of a right triangle. One side is insufficient, while three entries leave no unknown for this page to calculate.

Can I use decimals for side lengths?

Yes. Positive decimal measurements are accepted. Keep both entries in the same unit and remember that the displayed rounding may be less precise than the original measurements.

What if the entered hypotenuse is shorter than a leg?

Those lengths cannot form the stated right triangle. Subtracting the longer leg’s square would give a negative quantity under the square root, so the page rejects the request.

Does this page calculate triangle area?

No. It returns the missing side and perimeter. Once both legs are known, the area can be found separately as one-half times a times b.

How can I check whether a corner is square?

Measure two legs from the corner and the diagonal between their endpoints. Compare the diagonal with √(a² + b²), allowing for the accuracy of your measuring tools and project tolerance.

Sources & References