Your data is never sent to a server or stored anywhere. All processing happens in your browser.

Pythagorean Theorem Calculator

Solve for

c (hypotenuse)

5

Perimeter

12

Area

6

How to Use


Choose which side to solve for: c (the hypotenuse — the longest side, opposite the right angle) or either leg (a or b). Fill in the two known side lengths. The answer updates instantly, along with the triangle's perimeter and area. The unknown side's input is disabled while being solved; toggle the mode to switch which side you want to compute.

The Pythagorean Theorem


In a right triangle — a triangle with one 90° angle — the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². This identity has been known since antiquity and named for Pythagoras of Samos (~570-495 BCE), though it appears in Babylonian mathematics centuries earlier. It underlies much of Euclidean geometry, trigonometry, and the distance formula.

Formulas Used


Hypotenuse: c = √(a² + b²). Leg: a = √(c² − b²) and b = √(c² − a²). When solving for a leg, c must be greater than the other leg; otherwise no real solution exists. Area = (a × b) / 2. Perimeter = a + b + c. All outputs round display values to six decimal places but the underlying precision is IEEE 754 double.

Common Use Cases


  • Students verifying homework answers in geometry or trigonometry classes.
  • Carpenters and DIY builders computing diagonal bracing, stair runs, and squared corners (3-4-5 rule).
  • Surveyors and architects checking right angles on plots and plans.
  • Graphics programmers computing 2D distances via the distance formula (a special case of this theorem).
  • Anyone verifying a Pythagorean triple (e.g., 3-4-5, 5-12-13, 8-15-17).

Tips


  • The 3-4-5 rule is the easiest way to check a right angle in the field: if a 3-4-5 triangle fits, the corner is 90°.
  • Common Pythagorean triples: (3,4,5), (5,12,13), (8,15,17), (7,24,25), (20,21,29). All multiples are also valid.
  • The hypotenuse is always the longest side. If your known c is not greater than a and b, the triangle cannot exist.
  • For non-right triangles, use the Law of Cosines: c² = a² + b² − 2ab·cos(C).
  • The theorem extends to 3D as the distance formula: d = √(x² + y² + z²).

Privacy


All calculations happen in your browser. The values you enter are never sent to any server or stored anywhere.