Math calculators

Hypotenuse Calculator

Updated Jun 20, 2026 By Jehan Wadia
Formulas

Triangle Legs

Quick Examples

Options

Output precision
Angle unit

Results

Hypotenuse (c)
5.00
Area (½ × a × b)
6.00
Perimeter (a + b + c)
12.00
Interior Angles
A = 36.87°
B = 53.13°
C = 90.00°

Triangle Diagram

Side a (leg) Side b (leg) Hypotenuse (c)
Squares on each side — a² + b² = c²

Pythagorean Relationship

Step-by-Step Solution


Introduction

A hypotenuse is the longest side of a right triangle. It sits across from the 90-degree angle. To find its length, you use the Pythagorean theorem: c = √(a² + b²). You just need to know the two shorter sides, called legs.

This hypotenuse calculator does the math for you in seconds. Enter the lengths of side a and side b, and it gives you the hypotenuse, the area, the perimeter, and all three angles of the triangle. It also draws a diagram and shows each step of the solution so you can follow along and learn how the formula works.

Whether you are solving a homework problem, measuring a diagonal, or checking if a corner is square, this tool makes it fast and simple. Pick a quick example or type in your own numbers to get started.

How to Use Our Hypotenuse Calculator

Enter the two shorter sides of a right triangle below. The calculator will find the hypotenuse, area, perimeter, angles, and show you a diagram with a full step-by-step solution.

Side a (Vertical): Type the length of the first leg of your right triangle. This must be zero or greater.

Side b (Horizontal): Type the length of the second leg of your right triangle. This must be zero or greater.

Quick Examples: Click any preset button like "3 – 4 – 5" to load a common right triangle and see results right away.

Unit: Pick a unit of measurement such as cm, m, in, or ft. You can also leave it set to "No unit."

Output Precision: Choose how many decimal places you want in your answer. Pick "Exact" to see simplified square root form, "2 Dec" for two decimal places, or "3 Dec" for three.

Angle Unit: Choose "Degrees" to see angles in degrees or "Radians" to see them in radians.

Show Pythagorean Squares: Check this box to display a diagram of the squares built on each side of the triangle. This shows how a² + b² = c² works visually.

Show Step-by-Step Solution: Check this box to see every step of the Pythagorean theorem worked out from start to finish.

Calculate: Press this button to run the calculation. Results also update automatically as you type.

Reset: Press this button to clear your inputs and set everything back to the default values.

What Is the Hypotenuse of a Triangle?

The hypotenuse is the longest side of a right triangle. It is always the side that sits across from the 90-degree angle. Every right triangle has exactly one hypotenuse and two shorter sides called legs.

How to Find the Hypotenuse

You can find the hypotenuse using the Pythagorean theorem. This famous math rule says that in any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. Written as a formula, it looks like this:

c = √(a² + b²)

Here, a and b are the two legs, and c is the hypotenuse. To use it, square each leg, add those two numbers together, then take the square root of the result. For example, if one leg is 3 and the other is 4, you get c = √(9 + 16) = √25 = 5.

What Is a Pythagorean Triple?

A Pythagorean triple is a set of three whole numbers that fit the Pythagorean theorem perfectly. The most well-known triple is 3, 4, 5. Other common ones include 5-12-13, 8-15-17, and 7-24-25. These triples are helpful because the hypotenuse comes out to a clean whole number with no decimals.

Where Is This Used in Real Life?

People use the hypotenuse formula more often than you might think. Builders check if a corner is square by measuring a 3-4-5 triangle. Engineers use it to find the length of a brace or a ramp. You can even use it to figure out the diagonal size of a TV or phone screen. Any time you need to find a straight-line distance across a right angle, this formula does the job.


Formulas used

Hypotenuse (Pythagorean Theorem)
c = \sqrt{a^2 + b^2}
Pythagorean Relationship
a^2 + b^2 = c^2
Triangle Area
A = \frac{1}{2} \times a \times b
Triangle Perimeter
P = a + b + c
Angle A (opposite side a)
\alpha = \arctan\!\left(\frac{a}{b}\right)
Angle B (opposite side b)
\beta = \arctan\!\left(\frac{b}{a}\right)

Frequently asked questions

What is the Pythagorean theorem formula?

The Pythagorean theorem formula is c = √(a² + b²). You square side a, square side b, add them together, and then take the square root. The answer is the length of the hypotenuse, which is the longest side of a right triangle.

Can I enter decimal numbers for the sides?

Yes. You can type whole numbers or decimals into both the side a and side b fields. For example, you can enter 3.5 and 7.2, and the calculator will find the hypotenuse for those values.

What happens if I enter zero for one side?

If one side is zero, the hypotenuse equals the other side. For example, if side a is 0 and side b is 5, the hypotenuse is 5. The triangle diagram will not draw because you need two positive sides to form a triangle.

Can I enter negative numbers?

No. Side lengths cannot be negative. If you type a negative number, the calculator will show an error message and will not give results until you fix the value.

What does the Exact precision mode do?

Exact mode shows the hypotenuse as a simplified square root when possible. For example, if the sides are 1 and 1, it shows √2 instead of 1.41. This is useful for math homework where your teacher wants an exact answer.

How are the angles calculated?

The calculator uses the arctangent function to find the two non-right angles. Angle A is opposite side a, and angle B is opposite side b. Angle C is always 90 degrees because this is a right triangle.

What is the difference between degrees and radians?

Degrees and radians are two ways to measure angles. A full circle is 360 degrees or 2π radians. A right angle is 90 degrees or π/2 radians. Most people use degrees in everyday life. Radians are more common in advanced math and science.

How is the area of the triangle calculated?

The area is found with the formula Area = ½ × a × b. Since sides a and b meet at the right angle, one leg acts as the base and the other acts as the height. You multiply them and divide by two.

How is the perimeter calculated?

The perimeter is the total distance around the triangle. The calculator adds all three sides together: Perimeter = a + b + c, where c is the hypotenuse.

What does the Pythagorean squares diagram show?

It draws a square on each side of the triangle. The square on side a has an area of a², the square on side b has an area of b², and the square on the hypotenuse has an area of c². This picture shows that a² + b² = c², which is the Pythagorean theorem in visual form.

Does this calculator work on a phone?

Yes. The calculator is designed to work on phones, tablets, and computers. The layout adjusts to fit smaller screens, and the number inputs use a decimal keypad on mobile devices.

Does this calculator only work for right triangles?

Yes. The Pythagorean theorem only applies to right triangles, which have one 90-degree angle. If your triangle does not have a right angle, you would need to use a different formula like the law of cosines.

What is the Building Corner quick example for?

The Building Corner example uses sides 6 and 8. Builders measure these distances along two walls, then check if the diagonal is exactly 10. If it is, the corner is a perfect 90-degree angle. This is based on the 3-4-5 triple scaled up by 2.

What is the Screen Diagonal quick example for?

The Screen Diagonal example uses sides 16 and 9, which match the common 16:9 screen ratio. The calculator finds the diagonal length. You can scale this result to match your actual screen width or height to find the true diagonal size.

Do I need to press Calculate every time?

No. The results update automatically as you type or change any setting. The Calculate button is there as an extra option, but you do not need to click it to see your answer.

Can I use this to find a missing leg instead of the hypotenuse?

This calculator is built to find the hypotenuse from two legs. To find a missing leg, you would rearrange the formula to a = √(c² − b²). You can do this by hand using the step-by-step method shown in the calculator as a guide.

What does the bar chart show?

The bar chart shows four values: a², b², a² + b², and c². The last two bars are always equal because that is what the Pythagorean theorem proves. This makes it easy to see how the squares of the legs add up to the square of the hypotenuse.