Change language

Mathematics

Pythagorean theorem calculator

Find the hypotenuse or a leg of a right triangle, with area and perimeter.

Published by SolucionesAhora.com How we verify

Calculator inputs

What are you solving for?

First leg, or the hypotenuse if you are solving for a leg

Results

Enter your values and press “Calculate” to see the result.

Free, no sign-up! What if you could do this without a calculator? A five-minute game with challenges, lives and points. It clicks even when you cannot be bothered.

In short

What it calculates
Find the hypotenuse or a leg of a right triangle, with area and perimeter.
Formula used
a² + b² = c²
Example
Legs of 3 and 4:

Pythagorean theorem calculator

The Pythagorean theorem links the three sides of any right triangle. Knowing two of them fixes the third.

Choose whether you are after the hypotenuse or a leg: the formula switches from a sum to a difference.

How it works

The square of the hypotenuse equals the sum of the squares of the legs. To find a leg you rearrange with a subtraction, so the hypotenuse must always be the longest side.

Formula

a² + b² = c²

Hypotenuse: c = √(a² + b²)

Leg: a = √(c² − b²)

Worked example

Legs of 3 and 4:

c = √(9 + 16) = √25 = 5

Area = 3 × 4 / 2 = 6
Perimeter = 3 + 4 + 5 = 12

Explanation

The 3-4-5 trick on site

Any builder knows how to check a square corner by measuring three units along one side, four along the other and verifying that the diagonal measures five. It is the simplest Pythagorean triple, and it remains the fastest way to square out a setting-out without instruments. Using 6-8-10 or 9-12-15 gains precision over longer distances.

Checking whether a triangle is right-angled

The theorem works both ways. If the square of the longest side equals the sum of the squares of the other two, the triangle is right-angled. If it is greater, the angle exceeds ninety degrees; if smaller, it falls short.

Distances in a plane

The distance formula between two points with coordinates is nothing but Pythagoras applied to the difference in x and y. The same idea extends to three dimensions by adding the square of the third coordinate.

Where it does not apply

It only works for right-angled triangles in plane geometry. For any triangle you need the law of cosines, which reduces to Pythagoras when the angle is right. Over the Earth's surface at long distances it does not hold either.

Frequently asked questions

Does it work for any triangle?

No, only right triangles. For a general triangle you need the law of cosines.

What are Pythagorean triples?

Sets of whole numbers that satisfy the theorem, such as 3-4-5, 5-12-13 or 8-15-17. Builders use them to set out right angles.

How do I square a corner without a set square?

With the 3-4-5 method: mark three units on one side and four on the other; if the diagonal measures exactly five, the corner is at ninety degrees.

What do I use if the triangle is not right-angled?

The law of cosines, which generalises Pythagoras by adding a term with the cosine of the included angle.

Need to calculate something else?

These tools are often used alongside this calculator.

Areas

Calculate the area and perimeter of squares, circles, triangles, trapezoids and ellipses.

Roots

Calculate roots of any index, including negative numbers with an odd index.

Scientific

Trigonometry, logarithms, exponentials and factorials, with a degrees/radians switch.

Calculator

Type the whole expression and get the result instantly, brackets and functions included.

Percentage

The four most common percentage calculations in a single tool.

Rule of three

Solve direct and inverse proportions by entering the three known values.