US

Math

Pythagorean Theorem Calculator

The hypotenuse or the missing leg, in a second

Fill in two sides of the right triangle, leave the missing one blank, and this Pythagorean theorem calculator finds it instantly. We also give you the area and the perimeter.

Result5Hypotenuse cSides: 3, 4, 5 · Area: 6 · Perimeter: 12Formula explained below · reviewed October 17, 2026
Instantthe result updates as you type
Formula shownhow it is calculated, step by step
10/17/2026last reviewed
0 datasent: everything runs in your browser

The key idea

The Pythagorean theorem is not just homework: it is a job-site rule

With legs of 3 and 4, the hypotenuse is exactly 5. That is why builders mark 3 ft and 4 ft along two lines and check that the diagonal measures 5 ft: if it does, the corner is square. It works the same with 6, 8 and 10 or with 30, 40 and 50 in.

01

How it is calculated

In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs:

c² = a² + b² → c = √(a² + b²)    a = √(c² − b²)

Use the same unit for every side (inches, feet, meters…). The area comes out in that unit squared.

02

Worked example

Legs of 3 and 4: c = √(9 + 16) = √25 = 5. Area = 3 × 4 / 2 = 6. Perimeter = 3 + 4 + 5 = 12.

By Javier Mohino · Reviewed on 10/17/2026 · How we review our calculators · Spot an error? Let us know

Typical cases

Pythagorean triples and common right triangles

The hypotenuse of common right triangles. The first ones are whole-number triples, like 3-4-5, used to square a corner.

Leg aLeg bHypotenuse cAreaPerimeter
345612
512133030
68102424
724258456
815176040
912155436
9404118090
1216209648
15202515060
20212921070
111.41420.53.4142
122.236115.2361

Worked out with the calculator above: c = √(a² + b²).

Table: Pythagorean triples and common right triangles (Leg a, Leg b, Hypotenuse c, Area, Perimeter)Save or share this table as an image

Common questions

Frequently asked questions

Back to the calculator
How do I know if a triangle is a right triangle?

It is a right triangle if a² + b² = c², where c is the longest side. Type all three sides, with the longest as the hypotenuse, and the calculator checks it.

How do I find a missing leg?

Subtract the square of the other leg from the square of the hypotenuse and take the square root: a = √(c² − b²). With a hypotenuse of 13 and a leg of 5, the other leg is √(169 − 25) = 12.

What is the Pythagorean theorem used for in real life?

It finds diagonal distances. For example, the diagonal of a TV screen, how long a ladder must be to reach a given height, or the straight-line distance on a map.

How long is the diagonal of a square?

It is the side times √2, about 1.414 times the side. A 10 ft square has a diagonal of 14.14 ft.

Why is the hypotenuse always the longest side?

Because c² = a² + b² is larger than both a² and b². If you type a hypotenuse shorter than or equal to a leg, the calculator tells you it is not possible.

Does it work for triangles that are not right triangles?

No, the Pythagorean theorem only works for right triangles. For the area of any triangle from its three sides, use Heron's formula in the area calculator.

Your next calculation

Missing a calculator?

Tell us what you need to calculate. The most requested ones are the first we build, with their formula, a worked example and the source.

Embed this calculator

Paste this code into your website or blog. It is free and updates itself.

Save this calculation

Give it a name so you can find it later. It is stored only in your browser.