Pythagorean Theorem Calculator - Find Side or Check Triple
Math Calculators
Use a² + b² = c² to find a missing right-triangle side, check three lengths, and identify primitive or scaled integer Pythagorean triples.
Step-by-step solution
- Find hypotenuse c given a = 3, b = 4
- c² = a² + b² = 9 + 16 = 25
- c = √25 = 5
| Property | Value |
|---|---|
| Side a | 3 |
| Side b | 4 |
| Side c | 5 |
| Angle A | 36.86989764584402° |
| Angle B | 53.13010235415598° |
| Angle C | 90° |
The Pythagorean theorem
For any right triangle with legs a and b and hypotenuse c:
a² + b² = c²
The check mode sorts the three entered lengths and tests whether the squares of the two shorter sides add to the square of the longest side. It uses a small floating-point tolerance because decimal calculations can differ by tiny rounding errors. A right triangle can have integer or non-integer side lengths; a Pythagorean triple specifically has three positive integer sides. Integer triples are labeled primitive when their greatest common divisor is 1, and scaled when all sides share a larger whole-number factor.
How to use this calculator
- Find hypotenuse (c): enter both legs a and b.
- Find leg (a): enter leg b and hypotenuse c.
- Find leg (b): enter leg a and hypotenuse c.
- Check right triangle: enter all three side lengths to test whether the two shorter sides satisfy a² + b² = c². The result identifies a Pythagorean triple only when all three lengths are positive integers.
Common Pythagorean triples
- 3, 4, 5
- 5, 12, 13
- 8, 15, 17
- 7, 24, 25
- 20, 21, 29
Practical applications
The Pythagorean theorem is used in navigation, construction, physics, and computer graphics to calculate distances and verify right angles.
Generating Pythagorean triples
Euclid’s formula generates all primitive Pythagorean triples: for any integers m > n > 0 with m and n coprime and not both odd:
a = m² − n², b = 2mn, c = m² + n² - m = 2, n = 1 → (3, 4, 5)
- m = 3, n = 2 → (5, 12, 13)
- m = 4, n = 1 → (15, 8, 17)
- m = 4, n = 3 → (7, 24, 25)
3D distance extension
The Pythagorean theorem extends naturally to three dimensions:
d = √(a² + b² + c²) This formula calculates the straight-line distance between two points in 3D space and is used in computer graphics (vertex distances), GPS (3D positioning), and robotics (end-effector reach). For points (x₁, y₁, z₁) and (x₂, y₂, z₂): d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²).
Construction applications
Builders use the 3-4-5 rule to verify right angles without a protractor: measure 3 ft along one wall from the corner, 4 ft along the adjacent wall, and if the diagonal is exactly 5 ft the corner is square. This technique is used for squaring building foundations, fence corners, and tile layouts. For large layouts, scale up: 6-8-10, 9-12-15, or any multiple of 3-4-5.
Related tools
- Right Triangle CalcContinue from three sides to acute angles, area, and perimeter.
- Distance FormulaApply the same square-root relationship to coordinate points in 2D or 3D.
- Triangle SolverHandle non-right triangles with side-angle combinations and the law of sines or cosines.
- 3D Shape CalculatorUse right-triangle lengths in dimensions for surface area and volume.