Calculator
What the Pythagorean Theorem Calculator does
Pythagorean Theorem Calculator: calculates Hypotenuse c from Leg a and Leg b. Example: leg a 3 and leg b 4 gives hypotenuse c 5.000000.
The Pythagorean Theorem Calculator takes Leg a and Leg b and returns Hypotenuse c. You can nudge a single number and watch the effect straight away.
Most people who open the Pythagorean Theorem Calculator are people who want the working shown. Checking a result a second way is the cheapest way to catch an arithmetic slip.
There is no account, no upload and no server round trip, because the page does the work itself.
Further down the page: what each field expects, how the result is derived, and one example worked from the defaults.
What do the Pythagorean Theorem Calculator fields mean?
The Pythagorean Theorem Calculator uses 2 inputs. Pre-filled inputs double as documentation: each one shows what a reasonable value looks like.
| Field | What to enter | Default |
|---|---|---|
| Leg a | required | 3 |
| Leg b | required | 4 |
How does the Pythagorean Theorem Calculator work?
Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same calculation.
Validation is deliberately strict: silently coercing a bad value is how wrong numbers get trusted.
Worked example
These are the values the Pythagorean Theorem Calculator loads by default, and the result it produces from them. This is the worked example the page starts from, reproduced here so you can check the arithmetic.
| Leg a | 3 |
|---|---|
| Leg b | 4 |
| Hypotenuse c | 5.000000 |
|---|---|
| What this means | Hypotenuse c = √(a²+b²) = 5 |
Beyond the formula: the Pythagorean theorem
a²+b²=c² applies only to a right triangle, and specifically only to the two legs and the hypotenuse (the side opposite the right angle): applying it to any other pair of sides, or to a triangle without a right angle, gives a confidently wrong answer with no warning.
Common mistakes and sanity checks
- The hypotenuse (c) is always the longest side and always sits opposite the 90° angle. If you’re unsure which side is which, remember c must be larger than both a and b: mixing up which input goes where is the most common misuse of this calculator.
- 3-4-5, 5-12-13 and 8-15-17 are the classic whole-number ("Pythagorean triple") right triangles, useful as a quick check that your own answer is in the right ballpark.
- For a triangle that is not a right triangle, the correct generalisation is the law of cosines (c² = a² + b² − 2ab·cos C), which reduces to the Pythagorean theorem only when C = 90°.
How to use it
- Put Leg a.
- Key in Leg b.
- The output refreshes live, so you can stop as soon as the number looks right.
- The results panel then shows Hypotenuse c and What this means.
- Copy Link puts the current inputs in the URL, so bookmarking it brings the same numbers back.
What this tool does not do
- Displayed values are rounded; the underlying calculation keeps full precision.
- Very large or very small numbers hit JavaScript floating-point limits (about 15 significant digits).
- The method is fixed. There is no option to substitute your own formula.
Frequently asked questions
Only Leg a and Leg b. Every box already holds a working value, which makes it easy to isolate the effect of a single variable.
With the values loaded when the page opens, hypotenuse c comes out as 5.000000. The figure is derived from the inputs above, so it updates whenever they do.
Nothing is stored. The page has no back end to send data to, and holds your input only in memory.
No. There is no account, no usage cap and no trial period. The site is funded by advertising rather than by charging for the tools.
It matches what you would get working it out by hand, with fewer opportunities to slip.