Skip to content
Toolcroft

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.

Hypotenuse c5
Area (½ab)
6
Perimeter
12
Angle A (opposite a)
36.86989765°
Angle B (opposite b)
53.13010235°
Step-by-step solution
  1. Find hypotenuse c given a = 3, b = 4
  2. c² = a² + b² = 9 + 16 = 25
  3. c = √25 = 5

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.

Browse all math calculators