Pythagorean Theorem Calculator
Solve the Pythagorean theorem for whichever side you leave blank, with the identity a² + b² = c² checked on your own numbers.
Pythagorean Theorem Calculator
Solve the Pythagorean theorem for whichever side you leave blank, with the identity a² + b² = c² checked on your own numbers.
How this page computes
Exactly two inputs are read. The blank one is solved by adding or subtracting squares, with the subtraction direction checked for a positive remainder first.
Both squares are printed and their difference is the check line. The perimeter and area follow from the three sides, so a solved leg also gives the triangle's other measurements.
The calculation runs entirely in this browser tab; nothing is uploaded.
The theorem relates three sides, so given any two the third follows. With legs 3 and 4 the page solves the hypotenuse as 5; with a leg 3 and hypotenuse 5 it solves the other leg as 4.
Exactly one field must be blank. A hypotenuse that is not longer than a leg is refused, because no right triangle has those sides, and the page names the two numbers it compared.
How to use Pythagorean Theorem Calculator
Fill exactly two of the three side fields and leave the third blank, then press Run. The page solves for the blank one.
The output names which side was solved, prints all three sides, the two squares and the difference between them, then the perimeter and the area.
Two directions, one identity
For the hypotenuse, add the squares of the legs and take the root. For a leg, subtract the other leg's square from the hypotenuse's and take the root. Both are rearrangements of a² + b² = c², so the page prints the identity with your numbers substituted rather than a bare result.
The subtraction direction has a real condition: c² − a² must be positive, so c must be longer than the leg. The page checks that before taking the root and refuses with both values named if it fails.
What to Expect
Best for
- Solving for a leg when the hypotenuse is known
- Checking that three sides form a right triangle
- A worked example of the identity
Not ideal for
- All three fields filled, which overdetermines the triangle
- A hypotenuse shorter than a leg, which is no right triangle
- Oblique triangles, which need a different theorem
What this tool keeps
- Every side exactly as typed
What may need cleanup
- Nothing: the solved side and the check are final
Common errors
- Three filled fields are refused with the count
- A hypotenuse not longer than a leg is refused with both values
- A non-positive side is refused
Example use cases
- Solve for c given 3 and 4
- Solve for b given a = 3 and c = 5
- Check that 8, 15, 17 is a right triangle
Sample input
a = 3, b = 4, c blank
Sample output
c = 5, with a^2 + b^2 = 25 and c^2 = 25
Who this is for
- Students checking a triangle
- Readers measuring a diagonal
Frequently asked questions
Which field do I leave blank?
The one you want solved. Fill the other two. With legs known, leave c blank; with a leg and the hypotenuse known, leave the other leg blank.
Why is a short hypotenuse refused?
Because a² + b² = c² makes c the longest side, so c cannot be shorter than a leg. If the numbers give a negative square for the other leg, no real triangle exists and the page says which values conflicted.
Is the result exact?
Only when the three sides are a Pythagorean triple. Otherwise the solved side is a square root, printed to six decimals with its exact square beside it.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.