Calculators/Mathematics/Pythagorean theorem

Pythagorean theorem

c = √(a²+b²) · leg · 3D diagonal

Pythagorean theorem — illustration
Hypotenuse c
5

In a right triangle: c² = a² + b² (c — the hypotenuse, a, b — the legs).

The Pythagorean theorem relates the sides of a right triangle:

c2=a2+b2c^2=a^2+b^2

where cc is the hypotenuse (the longest side) and a,ba, b are the legs. Hence c=a2+b2c=\sqrt{a^2+b^2}, and a missing leg is found as b=c2−a2b=\sqrt{c^2-a^2}.

In space the theorem is applied twice, giving the space diagonal of a cuboid:

d=a2+b2+c2d=\sqrt{a^2+b^2+c^2}

The calculator handles all three cases. The classic Pythagorean triple is 3-4-5 (since 3²+4²=5²).

Examples

Legs a=3, b=4
→ c = √(9+16) = 5
Cuboid 2×3×6
→ diagonal = √(4+9+36) = 7

Frequently asked questions

Which side is the hypotenuse?+

The longest one — the side opposite the right angle. It is always c in the formula c² = a² + b². The legs (a, b) form the right angle.

How do I compute the space diagonal of a cuboid?+

By Pythagoras twice: first the base diagonal √(a²+b²), then the diagonal of the solid √((√(a²+b²))² + c²) = √(a²+b²+c²).

Found this calculator useful? Share it.

It's free — send it to a friend who's revising.

Teaching? Embed this calculator on your site.

Free widget — paste it on your school site, blog or notes. It links to the full version.

Teaching a class or tutoring? Guide students in NexTutor →