ToolPony.comDocumentation

Pythagorean theorem calculator

Solve a² + b² = c² from lengths or squared lengths of two sides.

Get started

  1. Enter lengths or squares for two different sides.

Example

Input

a² = 7, c² = 32

Expected result

b² = 32 − 7 = 25, so b = 5.

Try it

Good to know

The calculation runs in your browser. Use consistent units in fields with no explicit unit.

Calculation method

For the hypotenuse, add the leg squares. For a leg, subtract the other leg’s square from the hypotenuse square. Lengths must be positive.

c=a2+b2,a=c2−b2,b=c2−a2c=\sqrt{a^2+b^2},\quad a=\sqrt{c^2-b^2},\quad b=\sqrt{c^2-a^2}