Skip to main content

DigitalCalculators.net

Pythagorean Theorem Calculator

Find any missing side of a right triangle, with the area, perimeter and full steps.

Results

ItemValue

Steps

StepWorking
All sides must use the same unit. Answers are rounded to 6 decimal places.

Quick Answer

The Pythagorean theorem says a² + b² = c² in a right triangle, where c is the longest side. With legs of 3 and 4, c² = 9 + 16 = 25, so the hypotenuse is 5. To find a leg, subtract: with c = 13 and a = 5, b = √(169 − 25) = 12.

Last updated: 2 November 2026 ·How we calculate this: the Pythagorean theorem

Table of Contents

How This Pythagorean Theorem Calculator Works

In a right triangle, the two shorter sides are the legs, and the longest side is the hypotenuse. Enter any two sides, and the calculator finds the third. It also gives the area and perimeter.

Quick explanation: a² + b² = c².

  • Legs a and b: the sides that form the right angle.
  • Hypotenuse c: the side opposite the right angle.
  • For other triangles: use our Triangle Calculator.

How to Use the Pythagorean Theorem Calculator

  1. Choose which side you want to find: the hypotenuse or one of the legs.
  2. Enter the two sides you know, in the same unit.
  3. Press Calculate.
  4. Read the missing side, the area and the perimeter.
  5. Check the steps table to see the working.

Core Formulas

  • Hypotenuse: c = √(a² + b²)
  • Missing leg: a = √(c² − b²)
  • Area: a × b ÷ 2
  • Perimeter: a + b + c

Key Terms

  • Right triangle: a triangle with one angle of exactly 90 degrees.
  • Legs (a and b): the two sides that meet at the right angle.
  • Hypotenuse (c): the longest side, opposite the right angle.
  • Square of a number: the number multiplied by itself, such as 4² = 16.
  • Square root: the number that gives the original value when squared, such as √16 = 4.
  • Pythagorean triple: three whole numbers that fit a² + b² = c², such as 5, 12 and 13.

Worked Example

A ladder is 13 ft long, and its base is 5 ft from the wall. How high does it reach?

  • b² = 13² − 5² = 169 − 25 = 144
  • b = √144 = 12 ft

Real-Life Examples

  • Squaring a corner: builders mark 3 ft along one wall and 4 ft along the other. If the diagonal is exactly 5 ft, the corner is square. For bigger layouts, use 6-8-10 or 9-12-15.
  • TV screen size: a screen 47.9 in wide and 27 in tall has a diagonal of about 55.0 in, sold as a 55-inch TV.
  • Ramp length: a ramp that rises 2 ft over 24 ft of ground needs a surface about 24.08 ft long.
  • Walking distance: crossing a 120 m by 50 m park diagonally is 130 m, instead of 170 m around the edge.

Pythagorean Theorem vs Law of Cosines

  • Pythagorean theorem: only for right triangles: a² + b² = c².
  • Law of cosines: works for any triangle: c² = a² + b² − 2ab × cos(C).
  • The link: when angle C is 90°, cos(C) is 0, and the law of cosines becomes the Pythagorean theorem.
  • Which to use: use this calculator for right triangles, and our Triangle Calculator for others.

Diagonal of Common Rectangles

Same unit throughout, such as feet.

Width × lengthDiagonal
3 × 45.00
5 × 1213.00
8 × 1012.81
10 × 1215.62
12 × 1620.00
12 × 2023.32
16 × 2025.61
20 × 3036.06

Common Pythagorean Triples

These whole-number sets are right triangles, so they make quick checks:

  • 3, 4, 5
  • 5, 12, 13
  • 8, 15, 17
  • 7, 24, 25

Common Mistakes to Avoid

  • Using it on a triangle without a right angle. The theorem only works for right triangles.
  • Putting the hypotenuse in the wrong place. c is always the longest side, opposite the right angle.
  • Adding instead of subtracting for a leg. For a missing leg, subtract: a² = c² − b².
  • Forgetting the square root. a² + b² gives c², not c.
  • Mixing units. Convert inches and feet to the same unit first.

Frequently Asked Questions

In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c².

Square both legs, add them, and take the square root.

Square the hypotenuse, subtract the square of the known leg, and take the square root.

No. It only works on right triangles. For others, use the Law of Cosines in our Triangle Calculator.

It is a set of three whole numbers that fit a² + b² = c², such as 3, 4 and 5.

Square the two shorter sides and add them. If the total equals the square of the longest side, it is a right triangle.

No. The hypotenuse is always the longest side of a right triangle.

Yes. The diagonal of a box is √(length² + width² + height²). For example, a box measuring 3 × 4 × 12 has a diagonal of exactly 13.

It is the side length × √2, or about 1.414 × the side.

References & Sources

SourceUsed ForLink
Wikipedia, Pythagorean theorem The theorem and its use. https://en.wikipedia.org/wiki/Pythagorean_theorem
Wikipedia, Pythagorean triple Whole-number examples. https://en.wikipedia.org/wiki/Pythagorean_triple