Pythagorean Theorem Calculator

Find the hypotenuse or missing leg of any right triangle using the Pythagorean theorem with full step-by-step radical simplification.

Calculator Inputs

Select side to compute.
First right-angle leg.
Second known dimension.

Calculated Results

Hypotenuse (c)
10.00 Units
Triangle Area 24.00 sq units
Perimeter 24.00 units
Acute Angle α 53.13°
Values calculate live as you adjust inputs.

About Pythagorean Theorem Calculator

The first step in solving a right triangle is identifying which two side lengths are already known. The calculation changes depending on whether you are looking for the hypotenuse or one of the two shorter sides.

Your Pythagorean theorem calculator handles all three possibilities, so selecting the correct unknown side is just as important as entering the measurements.

When you know both legs and need the hypotenuse

The hypotenuse is the side directly opposite the 90-degree angle. It is also the longest side of a right triangle. If you know the lengths of both legs, you can calculate the straight-line distance between their outer endpoints.

For example, imagine a right triangle with two perpendicular sides measuring 5 cm and 12 cm.

[
c=\sqrt{5^2+12^2}
]

[
c=\sqrt{25+144}
]

[
c=\sqrt{169}=13\text{ cm}
]

The hypotenuse is 13 cm.

This type of calculation is useful when finding a diagonal across a rectangular space, checking the length of a support, or working out the direct distance between two points that form a right angle.

When you know the hypotenuse and one leg

Finding a missing leg requires a different calculation. Instead of adding the squares of the known sides, you subtract the square of the known leg from the square of the hypotenuse.

Suppose a right triangle has a hypotenuse of 13 m and one leg measuring 5 m. You need to find the other leg.

[
b=\sqrt{13^2-5^2}
]

[
b=\sqrt{169-25}
]

[
b=\sqrt{144}=12\text{ m}
]

The missing leg is 12 m.

This is an important distinction: when finding the hypotenuse, you add the squares of the two legs. When finding a leg, you subtract the known leg’s square from the hypotenuse’s square.

Does it matter which leg is called a or b?

No. The two legs are interchangeable in the theorem because both meet at the right angle. You can call one side (a) and the other (b), or switch those labels, without changing the hypotenuse.

The hypotenuse is different. It must always be represented by (c), because it lies opposite the right angle.

If your diagram labels the vertical side as (a) and the horizontal side as (b), keep those labels consistent when entering the measurements. The calculator can then use the correct values for the side you want to find.

Understanding the Other Results: Area, Perimeter, and Angles

Finding a missing side is usually the main reason someone uses a Pythagorean theorem calculator, but the other measurements can help describe the entire triangle. Once the side lengths are known, you can also understand how much space the triangle covers, how long its boundary is, and how its acute angles are shaped.

Triangle area: How much space does it cover?

The area of a right triangle is half the area of a rectangle with the same base and height. The two legs form the perpendicular measurements needed for this calculation.

For example, consider a right triangle with legs of 5 cm and 12 cm.

[
\text{Area}=\frac{5\times12}{2}
]

[
\text{Area}=30\text{ cm}^2
]

The triangle covers 30 square centimetres.

Notice the unit: area is expressed in square units, such as cm², m², or ft². It is not measured in ordinary centimetres or metres. This is because area measures a two-dimensional surface rather than a distance.

Perimeter: The total distance around the triangle

The perimeter is the combined length of all three sides. Unlike area, it measures the outside boundary of the triangle.

Using the same triangle with sides of 5 cm, 12 cm, and 13 cm:

[
\text{Perimeter}=5+12+13
]

[
\text{Perimeter}=30\text{ cm}
]

The perimeter is 30 cm.

This can be useful when estimating the total length of material needed to outline a triangular frame or when comparing the overall dimensions of different triangular shapes.

Acute angles: What do they tell you?

A right triangle has one angle measuring exactly 90 degrees. The other two angles are called acute angles, meaning each is smaller than 90 degrees.

These two angles always add up to 90 degrees.

For a triangle with legs measuring 5 and 12, the acute angles are approximately 22.62° and 67.38°. The shorter leg is opposite the smaller acute angle, while the longer leg is opposite the larger one.

An angle measurement helps describe the triangle’s shape. Two right triangles can have very different side lengths but the same angles if their corresponding sides are proportional.

If your calculator displays one acute angle, the other can be found by subtracting it from 90 degrees. For example, if one angle is 35°, the remaining acute angle is 55°.

Why the Hypotenuse Is Always the Longest Side

It is easy to identify the hypotenuse once you know where the right angle is. Look directly across from the 90-degree angle: the side opposite it is the hypotenuse. The other two sides, which meet to form the right angle, are the legs.

The hypotenuse is always longer than either leg in a valid right triangle. This is not just a naming convention; it follows from the relationship between the squares of the three side lengths.

Consider a triangle with side lengths of 5, 12, and 13. The side measuring 13 must be the hypotenuse because it is the longest side. The sides measuring 5 and 12 meet at the right angle.

A common mistake is to identify the hypotenuse simply by looking for the diagonal side in a drawing. Diagrams can be rotated, tilted, or drawn in different orientations. The position of the 90-degree angle is what determines which side is the hypotenuse.

Remember these three points when using the calculator:

  • The hypotenuse is opposite the right angle.

  • The two legs meet at the right angle.

  • The hypotenuse is longer than either leg.

Getting this identification right prevents you from entering a leg as the hypotenuse or choosing the wrong calculation mode.

Pythagorean Triples: Why Some Right Triangles Have Whole-Number Sides

Some right triangles have side lengths that are all whole numbers. These combinations are known as Pythagorean triples because they satisfy the relationship required by the Pythagorean theorem.

The familiar 3-4-5 triangle is one example, but there are several other combinations worth recognizing.

Leg a Leg b Hypotenuse c
3 4 5
5 12 13
8 15 17
7 24 25
9 40 41
20 21 29

These combinations are useful when checking a calculation or recognizing a right triangle without working through every step.

Why multiples of a Pythagorean triple also work

You can multiply all three sides of a Pythagorean triple by the same positive number and preserve the right-triangle relationship.

For example, multiplying the 3-4-5 triple by 2 gives:

  • 3 × 2 = 6

  • 4 × 2 = 8

  • 5 × 2 = 10

So 6-8-10 is also a Pythagorean triple.

Multiplying the original combination by 3 gives 9-12-15. The triangle becomes larger, but its angles and proportions remain unchanged.

Not every right triangle has whole-number side lengths, though. A triangle with two legs measuring 1 unit has a hypotenuse of √2 units. This is a valid right triangle even though its hypotenuse is not a whole number.

Exact Radical Answers vs. Decimal Approximations

Not every missing side produces a neat whole number. Sometimes the calculation ends with a square root that cannot be reduced to an integer. In those cases, it is useful to understand the difference between an exact radical answer and its decimal approximation.

Consider a right triangle with both legs measuring 1 unit.

[
c=\sqrt{1^2+1^2}
]

[
c=\sqrt{2}
]

The exact answer is √2. Its decimal approximation is approximately 1.4142.

These are two ways of expressing the same length, but they serve slightly different purposes.

What is a perfect-square result?

A perfect square is a number that can be produced by multiplying an integer by itself. For example, 25 is a perfect square because 5 × 5 = 25.

When the calculation produces a square root of a perfect square, the answer can be expressed as a whole number.

[
\sqrt{169}=13
]

This is why the 5-12-13 triangle produces a whole-number hypotenuse.

What happens when the square root cannot be reduced to a whole number?

Some square roots are irrational numbers, meaning their decimal expansions continue indefinitely without repeating. √2 is one example.

You can still use the exact radical form in mathematical work, or use a decimal approximation when a practical measurement is needed.

For example:

[
\sqrt{2}\approx1.4142
]

The decimal is rounded, so it is not the exact value. If you are working through a multi-step calculation, keeping the radical or full calculator precision until the final step helps prevent rounding errors.

When should you use the radical or decimal form?

Use the exact radical form when a maths problem asks for an exact answer or when you want to preserve the precise mathematical value.

Use a decimal when you need to measure, estimate, compare, or communicate a practical length. For example, a carpenter may find 1.4142 metres easier to work with than √2 metres, although the required measurement precision will depend on the project.

Where the Pythagorean Theorem Is Used Outside the Classroom

The theorem becomes easier to understand when you connect it to measurements people encounter in ordinary situations. It is particularly useful when two distances form a right angle and you need to calculate the straight-line distance between their endpoints.

Finding the diagonal of a room

Imagine a rectangular room that measures 9 feet by 12 feet. You want to know the distance from one corner of the floor to the opposite corner.

The two walls form the legs of a right triangle, while the floor diagonal is its hypotenuse.

[
d=\sqrt{9^2+12^2}
]

[
d=\sqrt{81+144}
]

[
d=\sqrt{225}=15\text{ feet}
]

The diagonal measures 15 feet.

This is useful when planning floor layouts, checking whether furniture will fit diagonally, or measuring the distance across a rectangular surface.

Checking whether a corner is square during construction

Carpenters and builders sometimes use the 3-4-5 method to check whether two lines meet at a right angle.

Measure 3 feet along one direction and 4 feet along the other. Then measure the diagonal between those two marks. If it measures 5 feet, the measurements form a 3-4-5 right triangle.

The same principle works with larger multiples. For example, measurements of 6, 8, and 10 feet preserve the same relationship.

This is an application of the converse of the Pythagorean theorem: if the side lengths satisfy the required relationship, the angle opposite the longest side is 90 degrees.

Working out how high a ladder reaches

Suppose a 13-foot ladder rests against a wall, with its base positioned 5 feet from the wall. Assuming the wall and ground meet at a right angle, how high does the ladder reach?

The ladder is the hypotenuse, the distance from the wall is one leg, and the height is the missing leg.

[
h=\sqrt{13^2-5^2}
]

[
h=\sqrt{169-25}
]

[
h=\sqrt{144}=12\text{ feet}
]

The ladder reaches 12 feet up the wall.

This example shows why the missing-leg calculation is useful in real measurements, not just classroom exercises.

When You Cannot Use the Pythagorean Theorem

The Pythagorean theorem is powerful, but it has a specific requirement: the triangle must have a right angle. If the shape does not meet this condition, the formula cannot be used to calculate its missing side.

Here are situations where you should stop and check the measurements before relying on the result.

The triangle does not have a 90-degree angle

A triangle with three acute angles or one obtuse angle is not a right triangle. The ordinary Pythagorean theorem does not apply to it.

If you know enough information about a non-right triangle, the law of cosines may be the appropriate method for finding an unknown side.

The supposed hypotenuse is shorter than a known leg

The hypotenuse must be the longest side. If someone enters a supposed hypotenuse of 8 cm and a known leg of 10 cm, those measurements cannot describe a valid right triangle.

The issue is not a small rounding difference: a hypotenuse cannot be shorter than either leg.

The known hypotenuse and leg are equal

If the hypotenuse and one leg have exactly the same positive length, the missing leg would have to be zero. A triangle with a zero-length side is not a real triangle.

For a valid right triangle, the hypotenuse must be strictly longer than either leg.

The measurements use different units

Before calculating, make sure both known sides use the same unit. Entering one measurement in inches and another in centimetres without converting them first will produce a meaningless result.

For example, convert 12 inches to 30.48 cm before combining it with a measurement in centimetres.

Your measurements are approximate

A calculator can produce a precise mathematical result from the numbers you enter, but that does not mean the original measurements were exact.

If you measured a wall, ladder, or piece of material with a tape measure, small measurement errors may affect the calculated diagonal or missing side. Use an appropriate number of decimal places for the accuracy of your measurements rather than assuming every displayed digit is physically meaningful.

Common Mistakes When Solving Right-Triangle Problems

A result can look reasonable and still be wrong if the wrong side or operation was used. Before accepting an answer, check these common mistakes.

Using the wrong side as the hypotenuse

The hypotenuse is not determined by whether a side appears horizontal, vertical, or diagonal in a picture. It is always the side opposite the 90-degree angle.

Correction: Locate the right-angle marker first, then identify the side directly across from it.

Adding the side lengths instead of their squares

If the legs measure 5 and 12, adding them gives 17, but that is not the hypotenuse. The theorem uses squared side lengths, followed by a square root to recover the actual length.

Correction: Square both legs, add those squared values, and then take the square root.

Adding when you should subtract

When you already know the hypotenuse and one leg, adding their squares is the wrong approach. You need the difference between the hypotenuse’s square and the known leg’s square.

Correction: Identify whether the missing side is the hypotenuse or a leg before selecting the calculation.

Forgetting the square root

The equation initially gives you the square of the missing side, not the side’s length itself.

For example, if the calculation gives (b^2=144), the side length is 12, not 144.

Correction: Take the positive square root at the final step because a physical side length cannot be negative.

Mixing measurement units

Combining a length in metres with another in centimetres without conversion can lead to a completely incorrect answer.

Correction: Convert both measurements to the same unit before entering them into the calculator.

Rounding too early

If a square root produces a long decimal, rounding it after every step can introduce unnecessary errors.

Correction: Keep the full available precision during intermediate calculations and round only the final result to the number of decimal places your problem requires.

What is Pythagorean Theorem Calculator?

The Pythagorean theorem states that in any right triangle, the square of the longest side (hypotenuse c) equals the sum of the squares of the two shorter legs (a² + b² = c²).

How to Use This Calculator

  1. Choose which side you need to solve for (c, a, or b).
  2. Enter the two known side lengths.
  3. Review the exact calculated dimension along with triangle area and acute angles.

The Mathematical Formula & Variables

Hypotenuse c = Sqrt(a^2 + b^2); Leg a = Sqrt(c^2 - b^2)

Variables Definition

Symbol / Variable Name Description
c Hypotenuse Longest side opposite the 90-degree right angle.

Step-by-Step Worked Example

Scenario: Right triangle with legs a = 6 and b = 8.

  1. Square leg a: 6² = 36.
  2. Square leg b: 8² = 64.
  3. Sum squares: 36 + 64 = 100.
  4. Take square root: √100 = 10.

Result: Hypotenuse c = 10

Frequently Asked Questions

What is the Pythagorean theorem?

The Pythagorean theorem describes the relationship between the three side lengths of a right triangle. It states that the sum of the squares of the two legs equals the square of the hypotenuse. It is used to find an unknown side when the other two side lengths are known.

How do you find the hypotenuse of a right triangle?

Square the lengths of both legs, add the squared values, and take the square root of the total. For example, legs measuring 5 and 12 give a hypotenuse of 13.

How do you find a missing leg using the Pythagorean theorem?

Square the hypotenuse and the known leg, subtract the known leg's square from the hypotenuse's square, and take the positive square root. The hypotenuse must be longer than the known leg.

Can you use the Pythagorean theorem to find any side of a right triangle?

Yes. If you know any two side lengths of a valid right triangle, you can calculate the third. The method depends on whether the unknown side is the hypotenuse or one of the legs.

Why is the hypotenuse always the longest side?

The hypotenuse lies opposite the largest angle in a right triangle, which is the 90-degree angle. Its length must therefore be greater than either leg. This also follows directly from the relationship between the squared side lengths.

What is a Pythagorean triple?

A Pythagorean triple is a set of three positive whole numbers that satisfy the Pythagorean theorem. Examples include 3-4-5, 5-12-13, and 8-15-17. Each combination can represent the side lengths of a right triangle.

What happens if the answer contains a square root?

Some right triangles have side lengths that do not produce a perfect-square result. In these cases, the exact answer can remain in radical form, such as √2, or be expressed as a rounded decimal approximation, approximately 1.4142.

Can the Pythagorean theorem be used on a triangle without a right angle?

No. The theorem applies specifically to right triangles. For a triangle without a 90-degree angle, another method, such as the law of cosines, may be needed depending on the information available.

How do you find the area of a right triangle?

Multiply the lengths of the two perpendicular legs and divide the result by two. For example, legs of 5 cm and 12 cm give an area of 30 cm².

How do you calculate the perimeter of a right triangle?

Add the lengths of all three sides. If the sides measure 5 cm, 12 cm, and 13 cm, the perimeter is 30 cm.

Can the Pythagorean theorem be used to find a diagonal?

Yes, when the diagonal and two sides form a right triangle. For example, the diagonal of a rectangle can be calculated using its length and width as the two legs.

Why must the hypotenuse be longer than either leg?

The hypotenuse is opposite the right angle and has a squared length equal to the sum of the squares of both legs. Since the other leg contributes a positive squared value, the hypotenuse must be longer than either individual leg.

Do both legs need to have the same length?

No. A right triangle can have legs of different lengths, such as 5 and 12. If both legs are equal, the triangle is an isosceles right triangle, with two acute angles of 45 degrees each.

What is the difference between the Pythagorean theorem and its converse?

The Pythagorean theorem starts with a right triangle and explains the relationship between its side lengths. The converse works in the opposite direction: if the side lengths of a triangle satisfy the required squared-length relationship, the angle opposite the longest side must be 90 degrees.