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 the Pythagorean Theorem?

The Pythagorean theorem relates the sides of a right triangle: a² + b² = c². The perpendicular sides a and b are the legs, and c is the hypotenuse opposite the right angle. Knowing any two appropriate side lengths lets you find the third.

This Pythagorean theorem calculator solves the selected missing side and reports all three lengths, perimeter and area. It assumes a right triangle. The right-triangle message describes how the missing side was constructed; it is not an independent test of three measured sides.

How to Find a Missing Triangle Side

  1. Choose Side to calculate: Hypotenuse c, Leg a or Leg b. The selected side’s input is hidden and cleared.
  2. Enter the other two positive side lengths in the same unit. The form has no unit converter.
  3. When finding a leg, make sure the entered hypotenuse exceeds the known leg.
  4. Select Calculate. Read the featured formula, Missing side and numeric side cards, then check perimeter and area.

The form minimum is 0.000000001 for each entered side. The endpoint requires exactly two positive lengths: providing all three does not ask it to test whether they form a right triangle. Switching the missing side clears that side’s old entry, so supply the two known values for the new mode.

Side cards display four decimal places; perimeter and area display two. The calculations use unrounded side values before formatting. Commas in large displayed numbers are grouping separators. Extremely large or nearly equal hypotenuse/leg values can strain floating point arithmetic.

Pythagorean Formula for a Leg or Hypotenuse

Right-triangle relationship: a² + b² = c²

Missing hypotenuse: c = √(a² + b²)

Missing leg: a = √(c² − b²), or b = √(c² − a²)

Perimeter P = a + b + c

Area K = ab/2

Use addition inside the square root when finding the hypotenuse and subtraction when finding a leg. Choose the positive square root because a side length must be positive.

The area formula uses the two perpendicular legs as base and height. If lengths are measured in meters, perimeter is in meters and area is in square meters. The same relationship applies to inches, feet or another consistent length unit.

Reference: OpenStax: Triangles and the Pythagorean Theorem. Right-triangle side relationships and finding a missing leg or hypotenuse. Input limits, display precision and numerical conventions follow this calculator’s implementation.

Triangle Sides, Perimeter and Area

Side to calculate
Choice of the unknown c, a or b; it controls which two fields are submitted.
Legs a and b
The two perpendicular positive lengths. Their labels can be interchanged without changing the geometry.
Hypotenuse c
Longest side, opposite the right angle.
Calculation used
Featured formula identifying whether the solver added or subtracted squared lengths.
Missing side
Name of the side solved in the selected mode.
Side result cards
All three numeric lengths, formatted to four decimals.
Right-triangle check
A construction message for the assumed right triangle, not a test of three independent measurements.
Perimeter and area
Sum of all sides and half the product of the legs, shown to two decimals.

Pythagorean Theorem Worked Example

Illustrative example. Choose Hypotenuse c and enter legs 9 and 12 in one common length unit.

The missing length is √(9² + 12²) = √225 = 15. The side cards show 9.0000, 12.0000 and 15.0000. Perimeter is 36.00 and area is 54.00 square units.

Independently scale the 3, 4, 5 right-triangle triple by 3. Recover a leg using √(15² − 12²) = √81 = 9. This checks the reverse mode as well as the direct sum of squares.

Calculation check. These illustrative values were checked independently against the formula and calculator response. Retain unrounded intermediate values when checking approximations.

Pythagorean Theorem Worked Example
QuantityValue
Leg a9.0000
Leg b12.0000
Hypotenuse c15.0000
Perimeter36.00 length units
Area54.00 square units

Finding a Leg Versus Finding the Hypotenuse

Choose the formula from the unknown side, not from which number happens to be largest on the screen. The hypotenuse is the side opposite the known right angle.

Entering two lengths constructs a compatible right triangle when the inputs meet the restrictions. It does not confirm that an independently measured third side matches.

Finding a Leg Versus Finding the Hypotenuse
UnknownKnown sidesCalculation
Hypotenuse ca = 9; b = 12√(81 + 144) = 15
Leg ab = 12; c = 15√(225 − 144) = 9
Leg ba = 9; c = 15√(225 − 81) = 12
Invalid leg caseKnown leg 15; c = 12Reject: c must exceed the leg

How to Check Your Right Triangle Results

The hypotenuse must exceed either individual leg. It is shorter than the sum of the two legs. If the selected side is a leg, its squared length plus the other leg’s square should recover the hypotenuse’s square.

Rounding may leave a small difference when you substitute displayed values back into a² + b² = c². Use unrounded values for sensitive checks, particularly when the missing leg is much shorter than the other side.

This theorem requires a right angle. For a general triangle, two lengths alone do not determine the third side without more information. The tool does not calculate angles, prove that a physical corner is square or distinguish measurement error from exact geometry.

Common Pythagorean Theorem Mistakes

  • Using the formula for a triangle without a right angle.
  • Calling a leg the hypotenuse.
  • Adding squares when solving for a leg.
  • Mixing feet and inches without converting first.
  • Entering all three sides instead of selecting an unknown.
  • Using rounded side cards as exact data for a precision check.

Frequently Asked Questions

How do I find the hypotenuse of a right triangle?

Square the two legs, add their squares and take the positive square root: c = √(a² + b²).

How do I find a missing leg?

Subtract the known leg’s square from the hypotenuse’s square, then take the positive square root. The hypotenuse must be longer than the known leg.

Which side is the hypotenuse?

It is the side opposite the right angle and the longest side. The calculator labels it c.

Can I use this formula for any triangle?

No. The Pythagorean relationship applies to right triangles. A general triangle needs additional information and another relationship.

Can I enter all three sides to test a triangle?

No. This endpoint requires exactly two lengths and constructs the selected missing side. Its right-triangle message is not an independent three-side measurement test.

What units should I enter?

Use the same length unit for both known sides. The missing side and perimeter use that unit, while area uses its square.

Why is the hypotenuse required to exceed a known leg?

A smaller hypotenuse would give a negative squared missing length. Equality would give a zero leg, which is a degenerate triangle and is rejected.

How are perimeter and area calculated?

Perimeter is a + b + c. Area is ab/2 because a and b are perpendicular legs. The tool formats these results to two decimal places.

Sources and References