Skip to content
OmniCalcX

Pythagorean Theorem Calculator

Given any two sides of a right triangle, find the third side instantly. Also calculates area and perimeter.

OmnicalcX
Side c (Solved)
5
Area
6sq units
Perimeter
12units
a = 3b = 4c = 5Solved for c

Step-by-Step Solution

  1. 1.Given: a = 3, b = 4
  2. 2.Apply the Pythagorean theorem: a² + b² = c²
  3. 3.Substitute: 3² + 4² = c²
  4. 4.Calculate: 9 + 16 = 25
  5. 5.c = √25
  6. 6.c = 5
  7. 7.Area = (a × b) / 2 = (3 × 4) / 2 = 6
  8. 8.Perimeter = a + b + c = 3 + 4 + 5 = 12

a² + b² = c²


How to Use This Pythagorean Theorem Calculator

This Pythagorean theorem calculator lets you find any missing side of a right triangle when you know the other two sides. It also computes the triangle's area and perimeter automatically, and displays a visual diagram with all side lengths labeled. Whether you are solving a homework problem, planning a construction project, or checking your manual work, this tool gives you instant, accurate results with a full step-by-step breakdown.

Steps:

  1. Select which side you want to solve for using the buttons at the top (hypotenuse c, leg a, or leg b)
  2. Enter the two known side lengths in the input fields that appear
  3. The missing side, area, and perimeter are calculated instantly
  4. Review the step-by-step solution and the triangle diagram below the results

What Is the Pythagorean Theorem?

The Pythagorean theorem is one of the most fundamental results in all of mathematics. It states that in a right triangle (a triangle with one 90-degree angle), the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides (the legs). In equation form: a² + b² = c², where c is the hypotenuse and a and b are the two legs.

This theorem is named after the ancient Greek mathematician Pythagoras of Samos, who lived in the 6th century BCE. However, evidence suggests that the relationship was known to Babylonian mathematicians over a thousand years earlier, as clay tablets (such as Plimpton 322) contain lists of integer solutions to the equation a² + b² = c². The theorem has hundreds of known proofs, ranging from geometric constructions to algebraic arguments, making it one of the most-proven theorems in mathematics.

The Pythagorean theorem only applies to right triangles. For non-right triangles, you would use the Law of Cosines (a generalization of the Pythagorean theorem) or trigonometric relationships. The theorem is a cornerstone of Euclidean geometry and is essential for understanding distance, vectors, and coordinate geometry.

Finding the Hypotenuse

When you know both legs of a right triangle, finding the hypotenuse is straightforward. Square each leg, add the results, and take the square root of the sum. The formula is: c = √(a² + b²).

Example: If leg a = 5 and leg b = 12, then c = √(5² + 12²) = √(25 + 144) = √169 = 13.

The hypotenuse is always the longest side of a right triangle. This is because the sum of the squares of two positive numbers is always greater than either square individually, so √(a² + b²) is always greater than both a and b. This fact provides a quick check: if your calculated hypotenuse is not the longest side, there is an error in your work.

In practical applications, finding the hypotenuse is equivalent to finding the straight-line distance between two points in a plane. If you walk 3 blocks east and 4 blocks north, the straight-line distance from your starting point is √(3² + 4²) = 5 blocks. This principle is the basis for the distance formula in coordinate geometry.

Finding a Missing Leg

When you know the hypotenuse and one leg, you can find the other leg by rearranging the Pythagorean theorem. Subtract the square of the known leg from the square of the hypotenuse, then take the square root. The formulas are:

  • Finding a: a = √(c² − b²)
  • Finding b: b = √(c² − a²)

Example: If the hypotenuse c = 10 and leg a = 6, then b = √(10² − 6²) = √(100 − 36) = √64 = 8.

An important constraint applies here: the hypotenuse must always be longer than each leg individually. If you enter values where the hypotenuse is shorter than or equal to a leg, the calculator will display an error because no valid right triangle can have those dimensions. Geometrically, this makes sense: in a right triangle, the hypotenuse spans the longest possible path between any two vertices.

Finding missing legs is especially common in construction, carpentry, and engineering. For instance, if you know the diagonal length of a rectangular frame and one side length, you can calculate the other side. This is the same math behind ensuring that corners are square using the 3-4-5 rule.

Real-World Applications

The Pythagorean theorem appears in countless real-world situations across many fields:

  • Construction and carpentry: Builders use the 3-4-5 rule to ensure corners are perfectly square. By measuring 3 feet along one wall and 4 feet along the adjacent wall, the diagonal should be exactly 5 feet if the corner is a true right angle.
  • Navigation: GPS systems and pilots use the theorem to calculate straight-line distances. If you travel east and then north, the theorem gives the direct distance between your start and end points.
  • Architecture: Architects use right triangle geometry to determine roof pitches, stair angles, and structural support dimensions. The theorem ensures that designs are mathematically sound.
  • Computer graphics: The distance between pixels on a screen is calculated using the Pythagorean theorem. This is fundamental for rendering, collision detection in games, and image processing algorithms.
  • Physics: Vector decomposition in physics relies on the theorem. When a force is applied at an angle, its components along the x and y axes form a right triangle with the resultant force as the hypotenuse.
  • Surveying: Land surveyors use the theorem to measure distances across uneven terrain by creating right triangles and measuring accessible sides.

Common Pythagorean Triples

A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a² + b² = c². These are especially useful because they produce exact integer side lengths with no decimals or square roots involved. Memorizing the most common triples can save significant time on tests and in practical work.

Leg aLeg bHypotenuse cCommon Use
345Construction, basic geometry
51213Staircase layout, framing
81517Roof pitch calculations
72425Larger-scale construction
6810Multiple of (3, 4, 5)
91215Multiple of (3, 4, 5)
94041Advanced geometry problems
202129Engineering applications

Any multiple of a Pythagorean triple is also a Pythagorean triple. For example, since (3, 4, 5) is a triple, then (6, 8, 10), (9, 12, 15), (30, 40, 50), and so on are all triples as well. There are infinitely many primitive (non-multiple) Pythagorean triples, and they can be generated using Euclid's formula: for any two positive integers m and n where m > n, the triple is (m² − n², 2mn, m² + n²).

Frequently Asked Questions

Does the Pythagorean theorem work for all triangles?

No, the Pythagorean theorem (a² + b² = c²) applies only to right triangles, which have exactly one 90-degree angle. For acute triangles (all angles less than 90°), a² + b² > c². For obtuse triangles (one angle greater than 90°), a² + b² < c². For general triangles, use the Law of Cosines: c² = a² + b² − 2ab · cos(C).

What is the hypotenuse?

The hypotenuse is the longest side of a right triangle, and it is always opposite the 90-degree (right) angle. In the formula a² + b² = c², the hypotenuse is represented by c. The hypotenuse can never be shorter than either of the two legs.

Can the sides of a right triangle be decimals?

Yes. The Pythagorean theorem works with any positive real numbers, not just integers. For example, if a = 1.5 and b = 2, then c = √(1.5² + 2²) = √(2.25 + 4) = √6.25 = 2.5. Many real-world measurements involve decimals, and this calculator handles them seamlessly.

How do I know if a triangle is a right triangle?

If you know all three side lengths, you can check whether a² + b² = c² (where c is the longest side). If the equation holds true, the triangle is a right triangle. For example, sides of 7, 24, and 25 satisfy 7² + 24² = 49 + 576 = 625 = 25², confirming it is a right triangle.

What is the difference between area and perimeter of a right triangle?

The area measures the space inside the triangle and is calculated as Area = (a × b) / 2 for a right triangle (half the product of the two legs). The perimeter is the total distance around the outside of the triangle and is calculated as Perimeter = a + b + c (the sum of all three sides). Area is measured in square units (e.g., m²), while perimeter is measured in linear units (e.g., m).

Can the Pythagorean theorem be used in three dimensions?

Yes. The theorem extends naturally to three dimensions. For a rectangular box with sides of length x, y, and z, the space diagonal (the distance from one corner to the opposite corner through the interior) is d = √(x² + y² + z²). This is sometimes called the 3D Pythagorean theorem and is widely used in physics, engineering, and computer graphics for calculating distances in three-dimensional space.

Why does the calculator show an error when solving for a leg?

When solving for a missing leg, the hypotenuse must be strictly longer than the known leg. If you enter a hypotenuse that is shorter than or equal to the known leg, the expression under the square root (c² − b² or c² − a²) would be zero or negative, which means no valid right triangle exists with those dimensions. This is a geometric impossibility: the longest side of a right triangle is always the hypotenuse.