Pythagorean Theorem Calculator
Results
Formulas Used in Pythagorean Theorem Calculator
In-Depth Tutorial: Pythagorean Theorem Calculator
The Pythagorean Theorem is the single most useful relationship in plane geometry: in any right triangle, the sum of the squares of the two legs equals the square of the hypotenuse. Stated as a formula: a² + b² = c², where a and b are the legs (the two sides forming the right angle) and c is the hypotenuse (the side opposite the right angle, always the longest). This tutorial covers how to use the theorem to find any missing side, recognize the most common Pythagorean triples, and apply the theorem in three dimensions and on coordinate planes.
What the theorem says — and why it works
The Pythagorean Theorem appears as Proposition I.47 in Euclid's Elements (around 300 BCE) but the result was known to Babylonian mathematicians more than a thousand years earlier — clay tablets from ~1800 BCE list dozens of integer Pythagorean triples (sets where a, b, c are all whole numbers).
The theorem only applies to right triangles. If your triangle does not have a 90° angle, you need the more general Law of Cosines (which reduces to a² + b² = c² when the included angle is 90°, because cos 90° = 0).
One of the cleanest geometric proofs: place four copies of the right triangle inside a square of side (a + b), arranged so the hypotenuses form an inner square. The inner square has area c². The outer square has area (a + b)² = a² + 2ab + b². Subtracting the four triangles (each with area ab/2, total 2ab) from the outer square: c² = (a² + 2ab + b²) − 2ab = a² + b². QED.
Three ways to use the theorem
Depending on which side you know and which you need, the formula rearranges:
- Find the hypotenuse (you know both legs): c = √(a² + b²).
- Find leg a (you know leg b and hypotenuse): a = √(c² − b²).
- Find leg b (you know leg a and hypotenuse): b = √(c² − a²).
In the leg formulas, the value inside the square root must be positive — if you ever get a negative number under the radical, you have given the calculator an impossible triangle (a leg longer than the hypotenuse, which cannot happen by definition).
Example 1 — Finding the hypotenuse
Input: a = 3, b = 4. Compute: c² = 3² + 4² = 9 + 16 = 25. c = √25 = 5.
This is the most famous of all triangles: the 3-4-5 right triangle. Carpenters and builders use it to lay out perfect right angles — measure 3 units along one edge, 4 units perpendicular, and the diagonal will be exactly 5 units only if the corner is truly square.
Example 2 — Finding a leg
Input: c = 13, a = 5. Compute: b² = 13² − 5² = 169 − 25 = 144. b = √144 = 12.
This is the 5-12-13 triangle — another integer triple. Notice that we subtract; the leg formula is the rearranged theorem.
Pythagorean triples — sets of integer solutions
A "Pythagorean triple" is a set of three positive integers (a, b, c) with a² + b² = c². The first few primitive triples (where gcd(a, b, c) = 1):
- 3-4-5 (the foundational one)
- 5-12-13
- 8-15-17
- 7-24-25
- 20-21-29
- 9-40-41
Any multiple of a primitive triple is also a triple: 6-8-10 (= 2 × 3-4-5), 10-24-26 (= 2 × 5-12-13), 9-12-15 (= 3 × 3-4-5), and so on. Recognizing a triple in a problem lets you skip the square root step entirely — if the legs are 3 and 4, you know without computing that the hypotenuse is 5.
The 3D extension
The Pythagorean Theorem extends naturally to three dimensions. If a rectangular box has edge lengths a, b, and c, then the length of the space diagonal d (from one corner to the opposite corner) is:
d = √(a² + b² + c²)
Proof: the diagonal of the bottom face is √(a² + b²) by the standard theorem. Then the space diagonal is the hypotenuse of a right triangle whose legs are that face diagonal and the height c. Applying the theorem again: d² = (a² + b²) + c². See the 3D Pythagorean Theorem Calculator for problems with box-shaped diagonals.
The distance formula on a coordinate plane
The distance between two points P₁ = (x₁, y₁) and P₂ = (x₂, y₂) is also a direct application of the theorem. Treat the horizontal difference |x₂ − x₁| as one leg and the vertical difference |y₂ − y₁| as the other leg of a right triangle whose hypotenuse is the distance:
distance = √((x₂ − x₁)² + (y₂ − y₁)²)
This formula is the entire foundation of coordinate geometry. Every distance, every magnitude, every Euclidean norm in any dimension is a generalization of a² + b² = c².
Verifying that a triangle is a right triangle
If you have all three side lengths, the theorem becomes a test: plug them in and check whether a² + b² = c² (where c is the longest side). If yes, the triangle is right. If a² + b² > c², the triangle is acute (all angles less than 90°). If a² + b² < c², the triangle is obtuse (one angle greater than 90°). This is the Converse of the Pythagorean Theorem.
Common mistakes
- Confusing the hypotenuse with a leg. The hypotenuse is always the longest side, always opposite the right angle. If a problem says "the longest side is 10" and you plug 10 into a leg field, every answer comes out wrong.
- Forgetting to square-root at the end. The theorem gives c², not c. To get c, take the square root after summing the squared legs.
- Trying to apply to non-right triangles. If there is no 90° angle, a² + b² ≠ c² — you need the Law of Cosines instead.
- Mixing units. All three sides must be in the same unit. You cannot have legs in inches and a hypotenuse in centimeters.
Beyond geometry
The Pythagorean Theorem reaches far beyond plane geometry. The same formula computes vector magnitudes in physics (the magnitude of a velocity vector with components (vx, vy) is √(vx² + vy²)), the modulus of complex numbers (|a + bi| = √(a² + b²)), and the Euclidean distance in any number of dimensions. It is also the geometric origin of the trigonometric identity sin²θ + cos²θ = 1 (a Pythagorean triple on the unit circle).
Frequently Asked Questions – Pythagorean Theorem Calculator
Enter any two of the three sides (a, b, c). The missing side is calculated using c² = a² + b² (or rearranged to find a leg).
The hypotenuse (c) is always the longest side — it is opposite the right angle. It satisfies c² = a² + b².
Enter all three sides. If a² + b² = c² (within rounding tolerance), the triangle is a right triangle.
Yes — free and unlimited.