Math calculators

Pythagorean Theorem Calculator

Updated Jun 18, 2026 By Jehan Wadia
Calculation Mode
Mode: Find Hypotenuse (c)
c = √(a² + b²)
Enter the lengths of both legs (a and b) below.
Side Lengths

Each side accepts a coefficient and a value under the radical, e.g. coefficient 2 with √5 = 2√5. Leave the √ field blank for a whole number.

Leg a
Length of leg a.
Leg b
Length of leg b.
Display Options
Results
Hypotenuse (c)
Area (A = a·b/2)
Perimeter (P = a+b+c)
Interior Angles
∠A (opp. a)
∠B (opp. b)
∠C (opp. c)
Step-by-Step Solution
Triangle Diagram
Known side Unknown side
Square-Area Visual (a² + b² = c²)

Introduction

The Pythagorean theorem says that in a right triangle, the two short sides squared and added together equal the long side squared. We write it as a² + b² = c², where a and b are the legs and c is the hypotenuse. This rule only works for right triangles — triangles that have one 90-degree angle.

This Pythagorean theorem calculator lets you find any missing side of a right triangle in seconds. Enter the two sides you know, and it solves for the third. You can also use it to check if three sides form a right triangle. Every calculation comes with a step-by-step solution, a triangle diagram, and a visual proof that shows how the squares on each side relate to one another. Choose between exact radical answers or rounded decimals, pick your unit label, and try quick presets like the classic 3-4-5 triangle to see how it works.

How to Use Our Pythagorean Theorem Calculator

Enter the side lengths you know, and this calculator will find the missing side of a right triangle. It also gives you the area, perimeter, angles, step-by-step work, and a triangle diagram.

Calculation Mode: Pick what you want to solve. Choose "Find Hypotenuse (c)" to find the longest side, "Find Leg a" or "Find Leg b" to find a shorter side, or "Right Triangle Check" to test if three sides form a right triangle.

Coefficient: Type the number part of each side length. For example, if a side is 5, type 5 here.

Under √ (Radical): If your side length has a square root, type the number under the radical sign. For example, for 3√2, type 3 as the coefficient and 2 here. Leave this blank for whole numbers.

Units: Pick a unit label like cm, ft, or m. This does not convert anything. It just adds the unit name to your results.

Output Format: Choose how you want your answer shown. "Exact (radical)" keeps square roots in the answer. "2 Decimal" and "3 Decimal" round to that many decimal places. "Sig Figs" lets you set how many significant figures to show.

Quick Pick Presets: Click a preset button like 3-4-5 or 5-12-13 to fill in a common right triangle automatically.

Display Options: Use the toggles to show or hide the step-by-step solution, the triangle diagram, and the square-area visual.

Calculate: Press the Calculate button to get your results. You can also press Enter on your keyboard from any input field.

What Is the Pythagorean Theorem?

The Pythagorean Theorem is a math rule that works on right triangles. A right triangle is any triangle that has one 90-degree angle. The theorem says that if you square the two shorter sides (called legs) and add them together, you get the square of the longest side (called the hypotenuse). Written as a formula, it looks like this: a² + b² = c², where a and b are the legs and c is the hypotenuse.

How the Formula Works

Squaring a number means multiplying it by itself. If one leg is 3 and the other leg is 4, you get 3² + 4² = 9 + 16 = 25. The square root of 25 is 5, so the hypotenuse is 5. This set of whole numbers — 3, 4, 5 — is called a Pythagorean triple. Other common triples include 5-12-13, 8-15-17, and 7-24-25.

Finding a Missing Leg

You can also use the theorem to find a missing leg. Rearrange the formula to a = √(c² − b²). Subtract the square of the known leg from the square of the hypotenuse, then take the square root. The hypotenuse must always be longer than either leg, or the math will not work.

Checking if a Triangle Is a Right Triangle

If you know all three sides, plug them into the formula. If a² + b² equals c² (using the longest side as c), the triangle is a right triangle. If the two sides do not match, it is not a right triangle. For non-right triangles, you can use the Law of Cosines to work with any triangle shape.

Where the Pythagorean Theorem Is Used

This theorem shows up everywhere in real life. Builders use it to make sure corners are square when framing walls or cutting rafters. Engineers use it to find distances. It is used in navigation, architecture, video games, and physics. Any time you need to find a straight-line distance between two points, the Pythagorean Theorem can help.


Frequently asked questions

What is the hypotenuse of a right triangle?

The hypotenuse is the longest side of a right triangle. It is always across from the 90-degree angle. In the formula a² + b² = c², the letter c stands for the hypotenuse.

Can I enter square roots as side lengths?

Yes. Use the Coefficient field for the number in front and the Under √ field for the number inside the radical. For example, to enter 3√2, type 3 as the coefficient and 2 under the √ sign. Leave the √ field blank if your side is a whole number.

What does the Exact (radical) output format do?

It keeps square roots in your answer instead of rounding to a decimal. For example, it will show √50 as 5√2 instead of 7.07. This is helpful for homework and math classes where your teacher wants simplified radical form.

Does the unit selector convert between units?

No. The unit dropdown only adds a label like cm, ft, or m to your results. It does not convert one unit to another. All your side lengths must already be in the same unit before you enter them.

What is a Pythagorean triple?

A Pythagorean triple is a set of three whole numbers that fit the formula a² + b² = c². Common examples are 3-4-5, 5-12-13, 8-15-17, and 7-24-25. You can try these using the Quick Pick Presets buttons in the calculator.

Why does the calculator say the hypotenuse must be longer than the leg?

In a right triangle, the hypotenuse is always the longest side. If you type a leg value that is equal to or bigger than the hypotenuse, the formula gives a negative number under the square root. That has no real answer, so the calculator shows an error.

How does the Right Triangle Check mode work?

Enter all three sides. The calculator treats the longest side as the hypotenuse. It squares all three sides and checks if the two smaller squares add up to the largest square. If they match, it is a right triangle. If not, it is not a right triangle.

How are the angles calculated?

For the three solve modes, the calculator uses inverse tangent to find each acute angle, and the right angle is always 90°. In the Right Triangle Check mode, it uses the law of cosines to find all three angles, since the triangle may not be a right triangle.

How is the area calculated?

When you solve for a missing side, the calculator uses A = a × b ÷ 2, which works for right triangles because the two legs form the base and height. In Right Triangle Check mode, it uses Heron's formula so the area is correct even if the triangle is not right-angled.

What does the square-area visual show?

It draws a square on each side of the triangle. The square on leg a has area a², the square on leg b has area b², and the square on the hypotenuse has area c². When the triangle is right-angled, the two smaller squares add up to the big one. This is a visual proof of a² + b² = c².

Can I use this calculator for non-right triangles?

Only the Right Triangle Check mode works with non-right triangles. It will tell you the triangle is not right-angled, and it still gives the area, perimeter, and angles. For full non-right triangle solving, use a law of cosines or law of sines calculator instead.

What are significant figures and when should I use them?

Significant figures (sig figs) are the meaningful digits in a number. Choose the Sig Figs format when your side lengths come from measurements and you need the answer rounded to match the precision of your data. You can pick between 3 and 9 significant figures.

What is the difference between the Clear and Reset buttons?

Clear empties all input fields and results but keeps your current mode and settings. Reset brings everything back to the default state — Find Hypotenuse mode with the 3-4-5 example, 2-decimal format, and all display options turned on.

Does the calculator update automatically as I type?

Yes. The calculator runs a silent update every time you change a number, switch modes, or pick a new format. If there is an error, it will not show a warning until you press Calculate or hit Enter.

Why are some preset buttons grayed out?

Each preset only works in certain modes. For example, the "2, 3, 4" preset is only for Right Triangle Check mode because those sides do not form a right triangle. If a preset does not fit your current mode, the button is disabled.