Geometry · 5 min read

How to Use the Pythagorean Theorem

c = √(a² + b²) — the hypotenuse of a right triangle

The Pythagorean theorem relates the three sides of a right triangle: the square of the hypotenuse equals the sum of the squares of the two legs. This tutorial walks through the formula, a 3-4-5 worked example, and a playground that substitutes your legs into c = √(a² + b²).

Written by the My Calculator Stack editorial team. About our methods

This is a teaching diagram for a right triangle with positive legs a and b. Extreme ratios may be drawn not to scale.

1.What the theorem is

In a right triangle, one angle is 90°. The two sides that form that angle are the legs (a and b). The side opposite the right angle is the hypotenuse (c), always the longest side. The theorem says a² + b² = c². It applies only to right triangles — not to acute or obtuse ones — and the legs must be positive.

2.The formula

Solve for the hypotenuse by taking the positive square root: c = √(a² + b²). If you already know c and one leg, you can rearrange: a = √(c² − b²). The calculator on this site finds c from legs a and b.

\[ c = \sqrt{a^{2}+b^{2}} \]

3.Worked example

Take legs a = 3 and b = 4 — the same defaults as the Pythagorean theorem calculator. Then a² + b² = 9 + 16 = 25, and c = √25 = 5. That 3-4-5 triple is the classic integer right triangle. Any positive scaling (6-8-10, 1.5-2-2.5) is the same shape.

\[ c=\sqrt{3^{2}+4^{2}}=\sqrt{25}=5 \]

4.Right-triangle playground

Move the leg sliders to substitute a and b into c = √(a² + b²). The labeled triangle keeps the right angle marked; the hypotenuse label updates with c. This is a teaching widget — no favorites, no full calculator chrome. Open the Pythagorean theorem calculator when you want the standalone tool.

Inline playground

Hypotenuse c

5

c = √(3² + 4²) = 5

Right triangle with legs a and b and hypotenuse c A right triangle with labeled legs, a marked 90° angle, and hypotenuse c = √(a² + b²).
The marked 90° angle sits opposite hypotenuse c. Labels show the current a, b, and c = √(a² + b²).

Teaching aid only — a and b must be positive legs of a right triangle.

Open the full Pythagorean theorem calculator →

5.Open the full calculator

The Pythagorean theorem calculator uses the same c = √(a² + b²) equation and the same 3 / 4 example, with How it works, FAQ, and related geometry tools on one page. Browse other geometry calculators if you need distance, area, or circle measurements next.