Pythagorean Theorem Calculator
Enter any two side lengths of a right triangle to solve the third side, area, perimeter, and squared-side identity.
Triangle inputs
Exactly two sides are enoughA positive leg length. Example: 3.
The other positive leg. Example: 4.
The hypotenuse; it must be the longest side.
Changing units converts every entered side.
Live results
Updated as you typeHypotenuse c
5 cm
3² + 4² = 5²
Area
6 cm²Perimeter
12 cmHypotenuse
5 cmCalculation detail
| Side | Role | Length | Squared length |
|---|---|---|---|
| Side a | Given leg | 3 cm | 9 cm² |
| Side b | Given leg | 4 cm | 16 cm² |
| Side c | Calculated hypotenuse | 5 cm | 25 cm² |
How to use this Pythagorean theorem calculator
What this calculator does
This calculator solves one missing side of a right triangle from the other two sides. It applies the exact identity a² + b² = c², where a and b are the perpendicular legs and c is the hypotenuse opposite the 90-degree angle. It also reports the triangle's area and perimeter and provides a squared-side table that makes the identity easy to audit. It does not determine whether an arbitrary real-world shape truly contains a right angle; that geometric assumption must be established separately.
When to use it
Use the calculator to estimate a ladder or cable length from a vertical rise and horizontal run, check a diagonal across a rectangular surface, solve school geometry exercises, or verify site-layout dimensions. It is also useful when one leg is unknown but the hypotenuse and the other leg are measured.
How to calculate
- The calculator opens with the complete 3 – 4 – 5 demonstration: Side length a is 3 cm, Side length b is 4 cm, and Side length c is left for the calculator to solve. The example workbook is immediately available through Download Excel.
- Replace exactly two of the three side fields with your known positive lengths. Leave the side you want to calculate empty. You may also enter all three sides to verify that they satisfy the right-triangle identity.
- Select a Length unit. Changing the unit converts every nonempty side value, then updates the length, area, perimeter, table, and workbook consistently.
- Read the main answer under Hypotenuse c, Leg a, Leg b, or Triangle verified. Review Area, Perimeter, Hypotenuse, and the calculation-detail rows for context.
- Choose Download Excel to create a fresh binary workbook from the current validated inputs. Reset clears the demonstration data and results; Excel export then remains disabled until a complete valid state is entered again.
Input guide
Side length a and Side length b are the two legs that meet at the right angle. Each accepts a required positive decimal whenever that side is one of the two known values; examples are 3 and 4. Enter ordinary U.S.-style decimals, with commas allowed only as thousands separators. A larger leg generally increases the hypotenuse, area, and perimeter. Do not enter a unit symbol in the field, a negative value, zero, scientific notation, or a decimal comma such as 1,5.
Side length c is the hypotenuse and must be longer than either leg. It accepts the same positive-decimal format and is required only when solving for a or b or when checking all three values. A realistic example is 5. A common mistake is to put a shorter side in c; the calculator rejects that because the hypotenuse is always the longest side of a right triangle.
Length unit is required and applies to all three sides. Available choices are millimeters, centimeters, meters, kilometers, inches, feet, and yards. Switching from centimeters to meters, for example, converts 3 cm to 0.03 m rather than merely relabeling it. The conversion also squares correctly for area. NIST's guide to SI units of length provides authoritative metric relationships.
Output guide
The primary result identifies the calculated side and reports its length in the active unit. Area is the surface inside the triangle, calculated as one-half of leg a times leg b and shown in square units. Perimeter is the distance around all three sides. Hypotenuse always repeats c so it remains easy to identify even when a leg is the missing side. The status pills summarize whether the triangle is solved or verified, which side was calculated, and the active unit.
In the Calculation detail table, Side names a, b, or c; Role identifies a given or calculated leg or hypotenuse; Length reports the canonical side value; and Squared length shows the quantity used in the theorem. For a valid triangle, the two leg squares sum to the hypotenuse square. These outputs are mathematical estimates from the entered measurements; their practical accuracy cannot exceed the accuracy of those measurements.
Worked example
With the startup values a = 3 cm and b = 4 cm, the calculator computes c = √(3² + 4²) = √25 = 5 cm. The area is (3 × 4) ÷ 2 = 6 cm², and the perimeter is 3 + 4 + 5 = 12 cm. The table therefore shows squared lengths of 9, 16, and 25, confirming 9 + 16 = 25. OpenStax gives additional step-by-step examples in its lesson on triangles and the Pythagorean theorem.
Formula and interpretation
When both legs are known, the hypotenuse formula is c = √(a² + b²). When c and one leg are known, rearrange the same identity: a = √(c² – b²) or b = √(c² – a²). The subtraction case is valid only when c exceeds the known leg. Wolfram MathWorld's right-triangle reference explains the conventional roles of the legs and hypotenuse.
Measurement note: Keep every side in one unit before calculating. The calculator's unit selector performs consistent conversions, but rounding a measurement too early can still affect the final side, area, and perimeter.
The area and perimeter use standard geometric identities. OpenStax's geometric formulas reference lists the right-triangle area formula alongside the Pythagorean theorem. For an oblique triangle without a 90-degree angle, use the law of cosines rather than this calculator.