Math Calculators

Pythagorean Theorem Calculator

Use this Pythagorean theorem calculator to find the hypotenuse or a missing side of a right triangle from the other two sides, using a^2 + b^2 = c^2. Enter any two sides to get the third instantly.

Primary answer
Missing side
Inputs to verify
Missing side, Leg a, and Leg b
Use type
Use as a direct calculation check.
Keyword intent
pythagorean theorem calculator

Calculator

Pythagorean Theorem Calculator

Calculates missing side from missing side, leg a, leg b. Defaults are filled in so you can review a working example before changing inputs.

Choose which right-triangle side to calculate.

units

Positive side length. Used unless leg a is the missing side.

units

Positive side length. Used unless leg b is the missing side.

units

Positive longest side. Used when solving for a missing leg.

Result

Result reflects the current submitted inputs.

  • Risk A
  • Reviewed 2026-05-26
  • 1 sources
Missing side5 units
Leg a3 units
Leg b4 units
Hypotenuse5 units
Perimeter12 units
Area6 square units
  • The triangle is a right triangle and all side lengths use the same unit.
  • The hypotenuse is the longest side and must be greater than the known leg when solving for a missing leg.
  • Intermediate values are not rounded; raw outputs are rounded to 10 decimal places for stability.

Accuracy notes

Risk level
A
Reviewed
2026-05-26
Sources
1
Primary result
Missing side

Formula logic is kept in a pure calculator module with fixtures, source notes, and page-visible assumptions.

What the result means

The result is the length of the missing side. If you input a hypotenuse smaller than one of the legs, no real triangle exists (would require taking sqrt of a negative number).

Missing sideDisplayed as decimal in units.
Leg aDisplayed as decimal in units.
Leg bDisplayed as decimal in units.
HypotenuseDisplayed as decimal in units.

Use the result this way

  1. Start with Missing side, then use supporting outputs for context.
  2. Verify Missing side, Leg a, and Leg b before copying the result.
  3. Check the formula, example, and assumptions before reusing the answer.

User job

How to use this calculator

Use Pythagorean Theorem Calculator when you need missing side, then use leg a and leg b to check the context for quick number work, classwork, spreadsheet checks, and explaining a calculation to someone else.

Best for

  • Checking the core numeric relationship
  • Comparing the main result with supporting outputs
  • Reviewing a default example before entering your own missing side and leg a.

Check before relying

  • Confirm sign, decimal, percent, and rounding assumptions before copying the number.
  • The triangle is a right triangle and all side lengths use the same unit.
  • The hypotenuse is the longest side and must be greater than the known leg when solving for a missing leg.
  • Source context: OpenStax, reviewed 2026-06-18.

Next useful step

  • Right Triangle CalculatorUse next when your task shifts from Pythagorean Theorem Calculator to Right Triangle Calculator.
  • Triangle CalculatorUse next when your task shifts from Pythagorean Theorem Calculator to Triangle Calculator.
  • Distance CalculatorUse next when your task shifts from Pythagorean Theorem Calculator to Distance Calculator.

Formula

For a right triangle with legs a and b and hypotenuse c (the longest side, opposite the right angle): a^2 + b^2 = c^2. To find c: c = sqrt(a^2 + b^2). To find a leg given c: a = sqrt(c^2 - b^2).

  • The Pythagorean theorem applies only to right triangles (one 90-degree angle).
  • Common Pythagorean triples (whole-number sides): (3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25). Useful for quick checks and tilework.
  • If a^2 + b^2 = c^2 holds for any triangle's sides, the triangle is a right triangle (converse of the theorem).
  • For non-right triangles, use the Law of Cosines: c^2 = a^2 + b^2 - 2ab x cos(C).
  • The theorem extends naturally to distance in coordinate geometry and to 3D (a^2 + b^2 + c^2 = d^2).

Inputs

Enter any two of the three sides (a, b, c). The calculator solves for the third using the Pythagorean relationship. Note c must be the longest side (the hypotenuse); a and b are the legs.

Missing sideChoose which right-triangle side to calculate.
Leg aPositive side length. Used unless leg a is the missing side.
Leg bPositive side length. Used unless leg b is the missing side.
Hypotenuse cPositive longest side. Used when solving for a missing leg.

Example

Legs a=3, b=4: c = sqrt(9 + 16) = sqrt(25) = 5 (the classic 3-4-5 triple). Hypotenuse c=13, leg a=5: b = sqrt(169 - 25) = sqrt(144) = 12.

FAQ

What is the Pythagorean theorem?

In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: a^2 + b^2 = c^2, where c is the side opposite the right angle.

How do you find the hypotenuse?

Square both legs, add them, take the square root: c = sqrt(a^2 + b^2). For legs 3 and 4, c = sqrt(9 + 16) = 5.

How do you find a leg of a right triangle?

If you know the hypotenuse c and one leg b: a = sqrt(c^2 - b^2). With c=13 and b=5, a = sqrt(169 - 25) = 12.

What is a Pythagorean triple?

A set of three positive integers (a, b, c) that satisfy a^2 + b^2 = c^2. The simplest is (3, 4, 5). Others include (5, 12, 13), (8, 15, 17), and (7, 24, 25).

Does the Pythagorean theorem work for non-right triangles?

No. For triangles without a 90-degree angle, use the Law of Cosines: c^2 = a^2 + b^2 - 2ab x cos(C). It reduces to the Pythagorean theorem when C = 90.

What should I verify before using pythagorean theorem calculator?

Verify missing side, leg a, and leg b, the displayed formula, and the worked example before copying the result into another document or decision.

Sources

Last reviewed: 2026-05-26

Disclaimer

Applies to right triangles only. For other triangles use the Law of Cosines or a general triangle calculator.