Skip to content
Mathematics

Pythagorean theorem calculator

Calculate the hypotenuse from two legs, or find a missing leg from the hypotenuse and the known leg.

Free & no registration Calculated in your browser
01

Your inputs

The starting values are an example.

In the first mode: leg a. In the second mode: hypotenuse c.
In the first mode: leg b. In the second mode: known leg a.

Decimals: 12.5 · Thousands: 1,234.56. Follow the field instructions for lists.

02

Your result

Enter your values and select Calculate.

Your calculation will appear here.

Your result will include the relevant values and units.

Understand the calculation

Formula and example

How it is calculated

a²+b²=c². Therefore c=√(a²+b²), or b=√(c²−a²).

Worked example

Legs of 3 and 4 cm give a hypotenuse of 5 cm. The triangle has area 6 cm² and perimeter 12 cm.

Things to check

  • The formula applies to right triangles. The hypotenuse is opposite the right angle.
  • When finding a leg, the hypotenuse must be longer than the known leg.

Frequently asked questions

Can the calculator handle two equal legs?

Yes. For a=b, c=a√2. Both acute angles are then 45°.