Skip to content
Math

Pythagorean Theorem Calculator

Solve a right triangle with a² + b² = c². Find the hypotenuse from two legs, or a missing leg from the hypotenuse — plus perimeter, area and whether the sides form a Pythagorean triple. Works in mm, cm, m, inches or feet.

Calculator

The two sides that meet at the right angle.

Hypotenuse c
5 cm
a² + b² = c². The hypotenuse c = √(a² + b²); a missing leg = √(c² − leg²). Area = ½ × a × b.
Leg a
3 cm
Leg b
4 cm
Hypotenuse c
5 cm
Perimeter
12 cm
Area
6 cm²
These sides form a Pythagorean triple (all three are whole numbers).

The same triangle in other units

Hypotenuse c (mm)
50 mm
Hypotenuse c (m)
0.05 m
Hypotenuse c (in)
1.9685 in
Hypotenuse c (ft)
0.164 ft
Area (mm²)
600 mm²
Area (m²)
0.0006 m²
Area (in²)
0.93 in²
Area (ft²)
0.0065 ft²
A reference and planning tool — double-check important dates, figures and official requirements before you rely on them.

About this calculator

The Pythagorean theorem links the three sides of a right triangle: the square of the hypotenuse (the long side, opposite the right angle) equals the sum of the squares of the two shorter sides, written a² + b² = c². This calculator solves the triangle either way. Give it the two legs and it returns the hypotenuse; give it the hypotenuse and one leg and it finds the missing leg. Alongside the unknown side it reports the perimeter, the area and whether the three sides form a Pythagorean triple. Every side is in the length unit you pick — millimetres, centimetres, metres, inches or feet — and the theorem itself works the same in any of them.

How to read your results

The large figure is the side you asked for: the hypotenuse when you start from two legs, or the missing leg when you start from the hypotenuse. Below it sit all three sides together, plus the perimeter (a + b + c) and the area (½ × a × b, because the two legs meet at a right angle and act as base and height). A short verdict tells you whether the sides form a Pythagorean triple — three whole numbers, like 3-4-5 or 5-12-13, that satisfy the theorem exactly. The “same triangle in other units” panel restates the hypotenuse and area in every other length unit, so a side typed in inches can be read off in centimetres without retyping.

How it's calculated

For a right triangle with legs a and b and hypotenuse c, a² + b² = c². To find the hypotenuse from the two legs, c = √(a² + b²). To find a missing leg from the hypotenuse and the other leg, leg = √(c² − other²); this requires c to be strictly longer than the known leg, because the hypotenuse is always the longest side — if it is not, the inputs do not describe a real right triangle and the calculator asks you to correct them rather than returning an impossible value. The perimeter is a + b + c and the area is ½ × a × b. A set of three sides is a Pythagorean triple when all three are whole numbers that satisfy the theorem exactly.

Worked example

Two legs of 3 cm and 4 cm, solving for the hypotenuse.

The hypotenuse is √(3² + 4²) = √25 = 5 cm. The perimeter is 12 cm and the area is ½ × 3 × 4 = 6 cm². Because all three sides (3, 4, 5) are whole numbers, this is a Pythagorean triple.

Frequently asked questions

How do I find the hypotenuse from the two legs?

Square each leg, add the squares, then take the square root: c = √(a² + b²). With legs of 3 and 4, that is √(9 + 16) = √25 = 5. Enter the two legs and the calculator returns the hypotenuse instantly, in the unit you chose.

Can I find a missing leg if I only know the hypotenuse and one leg?

Yes. Switch to “A leg”, enter the hypotenuse and the leg you know, and the calculator computes the other leg as √(c² − leg²). For example, a hypotenuse of 5 and a leg of 3 give √(25 − 9) = √16 = 4. The hypotenuse must be longer than the known leg, otherwise the sides cannot form a right triangle.

What is a Pythagorean triple?

A Pythagorean triple is a set of three whole numbers a, b and c with a² + b² = c² — for example 3-4-5, 5-12-13 and 8-15-17. The calculator flags whether your sides form one. A right triangle whose hypotenuse is √2 (from two legs of 1) is perfectly valid but is not a triple, because √2 is not a whole number.

Does the unit I choose change the answer?

No. The theorem is unit-agnostic, so a 3-4-5 triangle is a 3-4-5 triangle whether the sides are in centimetres, inches or metres. The unit is simply carried through to the result and used to restate the answer in the other units, where lengths convert by the exact international definitions (1 inch = 2.54 cm, 1 foot = 0.3048 m) and areas by the square of that factor.

Sources

Reviewed by the YouCalc Team · Last reviewed

Spot a translation issue, a calculation issue, or have a suggestion? Let us know.

More calculators like this. Pick the next one.