Math CalculatorsPythagorean Theorem Calculator

Pythagorean Theorem Calculator

Triangle Sides
Enter any 2 sides to calculate the third
Calculation Results

Ready to Calculate

Enter any 2 side lengths to see real-time results

This Pythagorean theorem calculator finds the missing side of a right triangle when the lengths of the other two sides are known. It applies the Pythagorean theorem formula, a² + b² = c², to solve for either leg or the hypotenuse depending on which values are entered. This calculation is used in construction to confirm right-angle measurements on a job site, in navigation to determine straight-line distance between two points, and in geometry coursework where students need to verify or derive triangle dimensions without working through the algebra by hand.

What Is the Pythagorean Theorem?

A right triangle is a triangle that contains one 90-degree angle, also called a right angle. The two sides that form this angle are known as the legs, typically labeled a and b. The side opposite the right angle, always the longest of the three sides, is the hypotenuse, labeled c.

The Pythagorean theorem describes the fixed relationship between these three sides. It states that the square of the hypotenuse equals the sum of the squares of the two legs:

a² + b² = c²

This holds true for every right triangle, regardless of its size or proportions. If the lengths of any two sides are known, the third can be calculated directly from this equation.

The theorem is named after Pythagoras, a Greek mathematician who lived in the sixth century BC. Evidence suggests the relationship was already in use by Babylonian and Indian mathematicians before his time, but the theorem carries his name due to its association with the Pythagorean school. It remains one of the most widely applied principles in geometry and trigonometry.

How to Use the Pythagorean Theorem Calculator

To find a missing side, enter values for any two of the three sides. The calculator will solve for the third automatically.

  1. Enter two known side lengths. Input values for any two of the three sides: side a, side b, or the hypotenuse (c). You do not need to know all three, only two.
  2. Select your unit of measurement. Choose from metric units (cm, m, mm, km) or imperial units (in, ft, yd, mi), depending on what your measurements are in.
  3. Review the result. The calculator returns the length of the missing side. If area and perimeter are shown, these are calculated automatically from the three side lengths once the missing value is found.

Only two known values are required to solve the triangle. Entering just one side length will not produce a result, since a single measurement does not provide enough information to determine the other two under the Pythagorean theorem. If you know an angle instead of a second side length, you will need a right triangle calculator that accepts angle inputs rather than this one.

Pythagorean Theorem Formula and How It Works

The calculator requires two of the three side lengths to solve a right triangle. Which formula it applies depends on which side is missing.

Solving for the hypotenuse. When both legs are known, the hypotenuse formula is used:

c = √(a² + b²)

The two leg values are squared, added together, and the square root of that sum gives the length of the hypotenuse.

Solving for a leg. When the hypotenuse and one leg are known, the equation is rearranged to isolate the missing leg:

a = √(c² - b²)

b = √(c² - a²)

The known leg is squared and subtracted from the squared hypotenuse, and the square root of the result gives the length of the missing leg.

In each case, the result represents the length of the unknown side, expressed in whatever unit was selected for the input values. Changing the unit before entering values changes the unit of the output as well.

Some versions of this calculator also return two additional values once all three sides are known:

OutputFormulaWhat it represents
AreaA = ab / 2The space enclosed by the triangle
PerimeterP = a + b + cThe total distance around the triangle

These are not part of the Pythagorean theorem itself but are commonly included since they can be calculated directly once all three side lengths are established.

Worked Example

Consider a right triangle with leg a = 3 and leg b = 4. To find the hypotenuse, substitute these values into the formula:

c = √(a² + b²)

c = √(3² + 4²)

c = √(9 + 16)

c = √25

c = 5

This is one of the most recognized right triangle examples, often called a 3-4-5 triangle because all three sides are whole numbers.

The same method applies when solving for a leg instead of the hypotenuse. If the hypotenuse and one leg are known, the values are substituted into the rearranged formula, squared, and subtracted before taking the square root, following the same step by step process shown above. Only the position of the known and unknown values changes.

Pythagorean Triples

A Pythagorean triple is a set of three positive whole numbers that satisfy the equation a² + b² = c². When all three side lengths of a right triangle happen to be integers, the triangle is described as a Pythagorean triple.

The most common examples include:

  • 3, 4, 5
  • 5, 12, 13
  • 8, 15, 17

Each of these sets can be scaled up by multiplying all three numbers by the same factor. For example, doubling the 3-4-5 triple gives 6, 8, 10, which is also a valid right triangle.

Pythagorean triples are useful for checking a calculation quickly without running the full formula. If a set of three side lengths matches a known triple, or a multiple of one, the triangle can be confirmed as a right triangle by recognition alone. This is a practical shortcut in fields like construction, where a 3-4-5 ratio is commonly used to square corners without measuring angles directly.

Common Uses of the Pythagorean Theorem

The Pythagorean theorem is applied wherever a right angle needs to be confirmed or a distance needs to be calculated without a direct measurement.

Construction. Builders use the theorem to check that corners and frames are square, and to calculate diagonal bracing lengths where a direct measurement is not practical. A diagonal length calculator based on this formula is a standard tool on job sites for confirming that a rectangular structure has true right angles.

Navigation. When movement occurs along two perpendicular paths, such as traveling a set distance east and then north, the theorem gives the shortest straight-line distance between the starting and ending points. This type of navigation distance calculation is a direct application of the distance formula, which is itself derived from the Pythagorean theorem.

Screen and display sizing.Screen diagonal calculation relies on the same principle. A display's advertised size refers to the diagonal measurement, which can be calculated from the screen's width and height using a² + b² = c².

Geometry and trigonometry coursework. The theorem is a foundation for right triangle trigonometry, where it supports concepts such as sine, cosine, and tangent ratios. Students encounter it early in geometry and continue to rely on it throughout more advanced coursework.

Frequently Asked Questions

What is the Pythagorean theorem used for in real life?

It is used any time a right angle needs to be confirmed or a straight-line distance needs to be found without a direct measurement. Common applications include construction, navigation, and calculating the diagonal of a screen or display.

Can the Pythagorean theorem be used on any triangle?

No. It applies only to right triangles, meaning triangles with one 90-degree angle. For triangles without a right angle, other methods such as the law of cosines are needed to find a missing side or angle.

What is the formula to find the hypotenuse?

The hypotenuse formula is c = √(a² + b²). This calculator, sometimes referred to as a hypotenuse calculator when used specifically for this purpose, applies this formula automatically once the two leg values are entered.

How do you find a missing leg instead of the hypotenuse?

The formula is rearranged to isolate the unknown leg: a = √(c² - b²) or b = √(c² - a²). The known leg is sometimes called the adjacent side and the unknown leg the opposite side, depending on which angle is used as the reference point in a right triangle diagram.

What are Pythagorean triples and how are they used?

A Pythagorean triple is a set of three whole numbers, such as 3-4-5, that satisfy a² + b² = c². They are used as a quick way to confirm a right angle without running the full calculation, which is why they show up often in construction measurements.

Does the Pythagorean theorem work in three dimensions?

Not in its basic form. The standard equation applies to flat, two-dimensional right triangles. Three-dimensional problems, such as finding the diagonal of a box, require an extended version of the formula and are better suited to a dedicated geometry calculator rather than a standard right angle calculator.

What happens if I only know one side of the triangle?

A single side length is not enough to solve the triangle. Two known values, whether two legs, or one leg and the hypotenuse, are required before a free Pythagorean theorem calculator can return a result.

How is the Pythagorean theorem related to the distance formula?

The distance formula used to find the distance between two points on a coordinate plane is derived directly from the Pythagorean theorem. The horizontal and vertical distances between the points act as the two legs of a right triangle, and the straight-line distance between them is the hypotenuse. Our distance calculator applies this same logic directly, computing distance between two points rather than solving for a triangle's side length.