Pythagorean Theorem Calculator

Enter any two sides of a right triangle and find the third using a² + b² = c², calculated instantly in your browser.

The Pythagorean Theorem Calculator runs entirely in your browser. The side lengths you enter never leave your device and nothing is uploaded to ArrayKit.

Built and maintained by Udit Agarwal

Open the Right Triangle Calculator

About Pythagorean Theorem Calculator

The Pythagorean Theorem Calculator finds the missing side of a right triangle from the other two using a² + b² = c², where c is the hypotenuse, the longest side, opposite the right angle. Choose whether you know both legs and need the hypotenuse, or you know the hypotenuse and one leg and need the other leg, then enter the two known lengths. The calculator solves the third side immediately and shows all three sides together so you can copy the full set. It rejects a hypotenuse that is shorter than or equal to a known leg, since that combination cannot form a real right triangle. It is useful for geometry homework, construction and framing measurements, screen or ladder diagonal checks, and any layout problem where two sides of a right angle are known. Everything runs locally — the numbers you type are computed in your browser and never uploaded.

Features

  • Solve for the hypotenuse from two known legs, or a leg from the hypotenuse and the other leg
  • Uses the exact a² + b² = c² relationship, no approximations beyond floating-point precision
  • Shows all three side lengths together once the missing one is solved
  • Copy the full a, b, c result set as plain text with one click
  • Validates that the hypotenuse is longer than any known leg before solving
  • Clear error messages for missing, negative, or geometrically impossible inputs
  • Works with decimals, not just whole-number triangles
  • Runs entirely in your browser with nothing uploaded

How to use the Pythagorean Theorem Calculator

  1. Choose which side to solve for: the hypotenuse (c) or one of the legs (a or b)
  2. Enter the two known side lengths in the input fields
  3. Read the missing side in the Result section
  4. Copy the full a, b, c summary with the copy button

Example

Input

a=3, b=4

Output

c = 5

A classic 3-4-5 right triangle: 3² + 4² = 5².

Common errors & troubleshooting

  • The tool shows 'The hypotenuse (c) must be longer than the known leg.' — The hypotenuse is always the longest side of a right triangle. Double-check you entered the hypotenuse in the c field and that it is greater than the leg you entered.
  • Solving for a leg gives a smaller number than expected. — When solving a leg from the hypotenuse and the other leg, the formula is leg = √(c² − otherLeg²), which is always shorter than the hypotenuse — that is expected for a valid right triangle.
  • The result has many decimal places. — Most side combinations do not form a whole-number (Pythagorean-triple) triangle, so an irrational result like √2 shows as a long decimal. The Pythagorean Theorem Calculator rounds the display to 6 decimal places.
  • Entering all three sides, or only one, does nothing. — Enter exactly the two sides shown for the option you selected (for example, a and b to solve for c) — the third field is the one being solved and should be left as the result.

Frequently asked questions

What is the Pythagorean Theorem Calculator?
It is a tool that finds the missing side of a right triangle when you know the other two, using a² + b² = c², where c is the hypotenuse and a, b are the two legs.
How does the Pythagorean theorem formula work?
For any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Rearranged, a leg equals the square root of c² minus the other leg squared.
Can this calculator find a leg instead of the hypotenuse?
Yes. Select 'Leg a' or 'Leg b' and enter the hypotenuse plus the other leg — the Pythagorean Theorem Calculator solves the remaining leg using a = √(c² − b²) or b = √(c² − a²).
Why does the calculator reject some hypotenuse values?
In a right triangle the hypotenuse is always the longest side. If the entered hypotenuse is shorter than or equal to a known leg, no real right triangle exists, so the calculator shows an error instead of a false result.
Does this work for triangles that are not right triangles?
No. The Pythagorean theorem only applies to right triangles, where one angle is exactly 90°. For any triangle, use the Triangle Calculator or Law of Cosines instead.
Are the side lengths I enter uploaded anywhere?
No. The Pythagorean Theorem Calculator runs entirely in your browser. The numbers you type are used only on your device and are never sent to ArrayKit or any server.

Related tools

  • Right Triangle Calculator — Solve a right triangle from any two sides or a side and an angle.
  • Triangle Calculator — Solve a triangle from sides and angles, with area, perimeter and type.
  • Distance Calculator — Calculate the distance between two points in 2D or 3D space.
  • Root Calculator — Find square roots, cube roots and any nth root of a number.
  • Area Calculator — Calculate the area of circles, rectangles, triangles, trapezoids and more.
  • Slope Calculator — Find the slope, intercept, distance and equation of a line through two points.

Guides

More Math tools

See all Math tools (38) · All tools