📐
✓ Editorially reviewed by Derek Giordano, Founder & Editor · BA Business Marketing

Pythagorean Theorem Calculator

Right Triangle Sides

Last reviewed: January 2026

🧮
500 calculators, no signup required
Finance · Health · Math · Science · Business
nnng.com

What Is a Pythagorean Theorem Calculator?

Find any side of a right triangle using the Pythagorean theorem a²+b²=c². Enter any two sides to solve. This calculator runs entirely in your browser — your data stays private, and no account is required.

The Pythagorean Theorem

In a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². Given legs a = 3 and b = 4: c² = 9 + 16 = 25, so c = 5. This is the famous 3-4-5 triple — the simplest Pythagorean triple. The theorem extends to 3D: the space diagonal of a rectangular box with dimensions a, b, c is (a² + b² + c²).

Practical Construction Uses

The 3-4-5 rule is used constantly in construction to verify square corners. Measure 3 feet along one wall from a corner, 4 feet along the adjacent wall, and check that the diagonal between those two points is exactly 5 feet. If not, adjust until it is — that corner is then a perfect 90°. This technique works with any multiple: 6-8-10, 9-12-15, 30-40-50. Carpenters use it to square foundations, deck frames, tile layouts, and room additions.

Pythagorean Triples (Common)

abc (hypotenuse)Multiples
3456-8-10, 9-12-15
5121310-24-26
8151716-30-34
7242514-48-50

The Pythagorean Theorem Explained

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². This relationship, attributed to the ancient Greek mathematician Pythagoras around 500 BCE (though known to Babylonian mathematicians over a thousand years earlier), is one of the most fundamental results in all of mathematics. It connects geometry to algebra, enables distance calculations in any number of dimensions, and forms the foundation of trigonometry, coordinate geometry, and vector mathematics. The theorem only applies to right triangles — for non-right triangles, the law of cosines provides the generalized relationship. For solving triangle problems directly, see our Right Triangle Calculator.

Common Pythagorean Triples

Triple (a, b, c)VerificationMultiplesCommon Use
3, 4, 59 + 16 = 256-8-10, 9-12-15, 12-16-20Construction right angles
5, 12, 1325 + 144 = 16910-24-26, 15-36-39Roof pitch calculations
8, 15, 1764 + 225 = 28916-30-34Engineering design
7, 24, 2549 + 576 = 62514-48-50Advanced problems
20, 21, 29400 + 441 = 84140-42-58Nearly isosceles right triangle

Practical Applications of the Pythagorean Theorem

The 3-4-5 triangle is the most commonly used Pythagorean triple in construction. To verify a right angle when laying a foundation, measure 3 feet along one wall, 4 feet along the adjacent wall, and check that the diagonal between those points is exactly 5 feet. Any multiple works equally well — 6-8-10, 9-12-15, or 30-40-50 for larger structures. This technique requires no specialized equipment beyond a tape measure and ensures square corners for foundations, framing, tile layout, and fencing. Carpenters also use the theorem to calculate rafter lengths: a roof with a 12-foot horizontal run and a 5-foot rise needs rafters of √(12² + 5²) = √(144 + 25) = √169 = 13 feet (a convenient 5-12-13 triple). For construction calculations, see our Beam Deflection Calculator and Concrete Calculator.

Navigation and surveying rely heavily on Pythagorean calculations. GPS positioning uses three-dimensional distance calculations (extensions of the Pythagorean theorem to 3D: d = √(x² + y² + z²)) to triangulate your position from satellite signals. Surveyors calculate distances across obstacles (rivers, ravines, buildings) by measuring accessible legs of right triangles and computing the inaccessible distance. Aviation uses the theorem to calculate ground distance when altitude and slant distance are known — a plane at 30,000 feet altitude with a slant distance of 50 miles to a point on the ground is √(50² − 5.68²) ≈ 49.7 miles of ground distance from that point. Sailors calculate distance traveled when navigating by dead reckoning, treating north-south and east-west displacements as legs of a right triangle.

The Distance Formula and Coordinate Geometry

The distance formula — d = √((x₂-x₁)² + (y₂-y₁)²) — is the Pythagorean theorem applied to coordinate geometry. The horizontal distance (x₂-x₁) and vertical distance (y₂-y₁) form the legs of a right triangle, with the direct distance as the hypotenuse. This formula calculates the straight-line distance between any two points on a plane. The distance between (1, 2) and (4, 6) is √((4-1)² + (6-2)²) = √(9 + 16) = √25 = 5. In three dimensions, the formula extends to d = √((x₂-x₁)² + (y₂-y₁)² + (z₂-z₁)²), and this pattern continues to any number of dimensions — a remarkable mathematical generalization.

The midpoint formula, equation of a circle (x² + y² = r²), and many other coordinate geometry results derive directly from the Pythagorean theorem. The unit circle — the foundation of trigonometry — is defined as x² + y² = 1, which is the Pythagorean theorem with the hypotenuse equal to 1. The coordinates of any point on the unit circle at angle θ are (cos θ, sin θ), and the identity cos²θ + sin²θ = 1 is the Pythagorean theorem restated for trigonometric functions. This connection means the Pythagorean theorem underlies virtually all of trigonometry and, by extension, wave mechanics, signal processing, and quantum physics. Explore related concepts with our Graphing Calculator and Surface Area Calculator.

Proofs of the Pythagorean Theorem

The Pythagorean theorem has more known proofs than any other theorem in mathematics — over 370 distinct proofs have been published, ranging from simple geometric rearrangements to advanced algebraic methods. The most intuitive proof arranges four identical right triangles inside a large square: the outer square has side length (a + b), the inner tilted square formed by the hypotenuses has side length c. The area of the outer square equals the area of the four triangles plus the inner square: (a + b)² = 4(½ab) + c², which simplifies to a² + 2ab + b² = 2ab + c², and therefore a² + b² = c². President James Garfield published a proof using a trapezoid in 1876, and the theorem can even be proven using fluid dynamics or dimensional analysis. Einstein reportedly proved it at age 12 using similar triangles — the altitude from the right angle to the hypotenuse creates two smaller triangles, each similar to the original, from which the theorem follows directly.

The converse of the Pythagorean theorem is equally useful: if a² + b² = c² for a triangle with sides a, b, and c (where c is the longest side), then the triangle is a right triangle. 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 converse test allows you to determine triangle type from side lengths alone without measuring angles — useful in construction, engineering, and geometric proofs. For related mathematical tools, see our Equation Solver, Square Root Calculator, and Angle Converter.

Can the Pythagorean theorem be used for non-right triangles?
Not directly — it only applies when one angle is exactly 90°. For any triangle, use the Law of Cosines: c² = a² + b² − 2ab·cos(C), where C is the angle between sides a and b. When C = 90°, cos(90°) = 0 and the formula reduces to the Pythagorean theorem. The Law of Cosines is the generalization of the Pythagorean theorem for all triangles. For finding missing angles in any triangle, use the Law of Sines: a/sin(A) = b/sin(B) = c/sin(C).
How is the Pythagorean theorem used in real life?
Construction workers use the 3-4-5 rule (a Pythagorean triple) to verify right angles when laying foundations, framing walls, and setting fence posts. GPS systems calculate distances using extensions of the theorem in three dimensions. Screen sizes are measured diagonally — a TV advertised as 55" has a diagonal of 55 inches, and the theorem determines the actual width and height based on the aspect ratio. Navigation, architecture, surveying, and computer graphics all rely on it constantly. Use our Triangle Calculator for more complex triangle problems beyond right triangles.
How is the Pythagorean theorem used in everyday life?
Construction workers use it constantly — checking if a corner is square by measuring a 3-4-5 triangle (or any multiple like 6-8-10). Electricians calculate wire runs through walls diagonally. Landscapers determine slope distances. Navigation and GPS systems calculate straight-line distances between coordinates using a three-dimensional extension of the theorem. Screen sizes are measured diagonally — a "55-inch" TV is 55 inches from corner to corner, and the Pythagorean theorem converts that to width and height based on the aspect ratio. Use our Right Triangle Calculator for more advanced triangle computations.
How do builders use the Pythagorean theorem?
The 3-4-5 method checks right angles in construction: measure 3 feet along one wall, 4 feet along the other, and the diagonal should be exactly 5 feet if the corner is square. Larger multiples (6-8-10, 12-16-20) provide more accuracy for bigger structures. This technique has been used for thousands of years and remains the standard field method for squaring foundations, walls, and deck frames.
Does the Pythagorean theorem work in 3D?
Yes, it extends naturally: d = √(x² + y² + z²) gives the straight-line distance between two points in three-dimensional space. This is equivalent to applying the theorem twice: first finding the diagonal of the base (√(x²+y²)), then using that as one leg with z as the other to find the space diagonal. GPS systems and 3D modeling both use this 3D extension constantly.

See also: Slope Calculator · Triangle Calculator · Quadratic Equation Solver · Area Calculator

How to Use This Calculator

  1. Identify your known sides — Determine which sides of the right triangle you know — two legs (a and b) or one leg and the hypotenuse (c).
  2. Enter the known values — Input the two known side lengths. The calculator solves for the missing side using a² + b² = c².
  3. Review the result — The missing side length is displayed along with the full equation work.

Tips and Best Practices

c is always the longest side. The hypotenuse (c) is opposite the right angle and must be longer than either leg. If your answer for a leg comes out larger than the hypotenuse, recheck your inputs.

Look for Pythagorean triples. Common integer solutions: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Any multiple works too (6-8-10, 9-12-15). Great for quick mental checks.

Apply it to real-world squaring. Need to check if a corner is perfectly square? Measure 3 feet along one edge, 4 feet along the other — the diagonal should be exactly 5 feet.

Extend to 3D distance. The 3D distance between points is √(Δx² + Δy² + Δz²) — the Pythagorean theorem applied twice. See our Distance Calculator for coordinate-based calculations.

See also: Slope Calculator · Triangle Area · Distance Calculator · Angle Converter

📚 Sources & References
  1. [1] Khan Academy. Pythagorean Theorem. KhanAcademy.org
  2. [2] NCTM. Geometry Standards. NCTM.org
  3. [3] Wolfram MathWorld. Pythagorean Theorem. MathWorld
  4. [4] OpenStax. Geometry. OpenStax.org
Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly. Read our full methodology · About the author