Pythagorean theorem

To calculate the longest side (the hypotenuse) of a right triangle in Excel, you can use a formula based on the Pythagorean theorem, adapted to use Excel's math operators and functions. In the example shown, the formula in D5, copied down, is:
=SQRT(B5^2+C5^2)
which returns the length of the hypotenuse, given lengths of side a and aside b, given in column B and C respectively.
The Pythagorean theorem is a key principle in Euclidean geometry. It states that the square of the longest side of a right triangle (the hypotenuse) is equal to the sum of the squares of the other two sides. The theorem is written as an equation like this:
a2 + b2 = c2
When any two sides are know, this equation can be used to solve for the third side. When a and b are known, the length of the hypotenuse can be calculated with:
When b and c are known, the length of side a can be calculated with:
When a and c are known, length of side b can be calculated with:
To translate the above into Excel formula syntax, use the exponentiation operator (^) and the SQRT function, as seen below. The Pythagorean theorem can be written as:
=a^2+b^2=c^2 // pythagorean theorem
And the formulas below can be used to solve for each of the three sides:
Instead of the exponentiation operator, you can also use the POWER function like this:
The formulas above are an example of nesting one function inside another.
Download 200+ Excel Shortcuts
Get over 200 Excel shortcuts for Windows and Mac in one handy PDF.