Quick answer
The Pythagorean theorem states a² + b² = c², where c is the hypotenuse. With legs 3 and 4, c = √(9 + 16) = 5. The calculator also finds a missing leg: for c = 5 and a = 3, b = √(25 − 9) = 4.
Choose what to find (hypotenuse or a leg), then enter the known sides.
Related tools: Right Triangle Calculator: Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter. Triangle Calculator: Area, perimeter, angles and type of a triangle from its three sides. Trigonometry Calculator: All six trigonometric functions of an angle.
How to use the Pythagorean Theorem Calculator
- Choose find: Hypotenuse c and Missing leg b.
- Enter leg a (above 0).
- Enter other side (leg b or hypotenuse c) (above 0).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Find | Choose one: Hypotenuse c; Missing leg b | Starts at Hypotenuse c |
| Leg a | A number | > 0 |
| Other side (leg b or hypotenuse c) | A number | > 0 |
Formula and method
Formula
a² + b² = c²
IEEE-754 double precision; shown to at most 6 decimal places.
c = √(a² + b²); b = √(c² − a²), which requires c > a.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Find = Hypotenuse c; Leg a = 3; Other side (leg b or hypotenuse c) = 4.
| Result | Value |
|---|---|
| Hypotenuse c | 5 |
Example 2
Inputs: Find = Missing leg b; Leg a = 5; Other side (leg b or hypotenuse c) = 13.
| Result | Value |
|---|---|
| Missing leg b | 12 |
Example 3
Inputs: Find = Hypotenuse c; Leg a = 1; Other side (leg b or hypotenuse c) = 1.
| Result | Value |
|---|---|
| Hypotenuse c | 1.414214 |
The first line is the headline result (hypotenuse c). IEEE-754 double precision; shown to at most 6 decimal places.
Common triples
Whole-number solutions are called Pythagorean triples: 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Multiplying all three sides by the same number gives another triple, such as 6-8-10.
Checking a right angle
Carpenters use 3-4-5 (or 6-8-10) to square a corner: if the diagonal between points 3 and 4 units along the sides measures exactly 5, the corner is 90°. When finding a leg, the hypotenuse must be longer than the known leg.
How the result changes with leg a
Holding every other input at the first worked example, this table changes only leg a. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Leg a | Hypotenuse c |
|---|---|
| 1.5 | 4.272002 |
| 3 | 5 |
| 6 | 7.211103 |
| 12 | 12.649111 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Other side (leg b or hypotenuse c): entering "5" shows "The hypotenuse must be longer than the leg." beside that field and no result.
Choosing between the Pythagorean Theorem Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Right Triangle Calculator](/math/right-triangle-calculator/) | leg a and leg b | Hypotenuse c |
| [Triangle Calculator](/math/triangle-calculator/) | side a, side b and side c | Area |
| [Trigonometry Calculator](/math/trigonometry-calculator/) | angle and unit | sin |
| [Law of Cosines Calculator](/math/law-of-cosines-calculator/) | side b, side c and included angle A | Side a |
| [Area Calculator](/math/area-calculator/) | shape and a | Area |
Background: geometry measurements
Geometry results carry units that depend on the quantity: a perimeter or length is in linear units such as cm, an area or surface area is in square units (cm²) and a volume is in cubic units (cm³). Use one length unit for every input, because the calculator multiplies the numbers as given.
Flat (2D) shapes have an area and a perimeter; solids (3D) have a surface area and a volume. Two familiar checks: a circle of radius r has area πr² and circumference 2πr, and a sphere has volume (4/3)πr³ and surface area 4πr².
Assumptions and limitations
- Hypotenuse must be longer than the known leg
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for other side (leg b or hypotenuse c) to confirm this.
Frequently asked questions
Does the theorem work for any triangle?
Only right triangles.
Can the hypotenuse be shorter than a leg?
No. The hypotenuse is always the longest side of a right triangle.
What is a converse check?
If a² + b² = c², the triangle is right-angled.
What does the Pythagorean Theorem Calculator calculate?
Find the hypotenuse or a missing leg of a right triangle. It returns Hypotenuse c.
What formula does the Pythagorean Theorem Calculator use?
a² + b² = c². c = √(a² + b²); b = √(c² − a²), which requires c > a.
What do I need to enter in the pythagorean Theorem Calculator?
You enter Find, Leg a and Other side (leg b or hypotenuse c).
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Hypotenuse must be longer than the known leg.
What does the “Find” option change?
It sets how the pythagorean Theorem is worked out. The choices are Hypotenuse c and Missing leg b.
What is an example of a pythagorean Theorem result?
With find Hypotenuse c, leg a 3 and other side (leg b or hypotenuse c) 4, the hypotenuse c is 5.
Related calculators
- Right Triangle Calculator — Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.
- Triangle Calculator — Area, perimeter, angles and type of a triangle from its three sides.
- Trigonometry Calculator — All six trigonometric functions of an angle.
- Law of Cosines Calculator — Third side of a triangle from two sides and the included angle (law of cosines).
- Area Calculator — Area of common two-dimensional shapes.
- Circle Calculator — Radius, diameter, circumference and area of a circle from any one of them.
- Circumference Calculator — Circumference of a circle.
- Cylinder Volume Calculator — Volume of a cylinder.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.