Pythagorean Theorem Calculator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free Pythagorean theorem calculator. Enter any two sides of a right triangle to find the third, plus both angles, the area, perimeter and height.

Angle A
0
Angle B
0
Area
0
Perimeter
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the Pythagorean theorem calculator

  1. Fill in any two sides of a right-angled triangle: the two legs (a and b, which meet at the right angle) or one leg and the hypotenuse (c, the longest side, opposite the right angle).
  2. Leave the third box empty.
  3. Read the result. The Pythagorean theorem calculator finds the missing side and also shows both acute angles, the area, the perimeter and an explanation of the working.

The sides can be in any unit (centimetres, inches, metres, feet), as long as they're all the same. The answer comes back in that unit.

The Pythagorean theorem

In a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides:

a² + b² = c²

So:

  • Hypotenuse: c = √(a² + b²)
  • A leg: a = √(c² − b²), or b = √(c² − a²)

For legs of 3 and 4: c = √(9 + 16) = √25 = 5.

For a hypotenuse of 13 and a leg of 12: a = √(169 − 144) = √25 = 5.

The theorem only works for right-angled triangles. If the triangle doesn't have a 90° angle, you need the law of cosines instead.

Pythagorean triples

Some right triangles have whole-number sides. These are called Pythagorean triples:

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

Any multiple of a triple is also a triple: 6, 8, 10 and 30, 40, 50 are versions of 3, 4, 5. Builders have used the 3-4-5 triangle for thousands of years to set out perfect right angles.

Angles, area and perimeter

Once all three sides are known, the rest follows:

  • Angle A (opposite side a) = arctan(a ÷ b). For 3, 4, 5: arctan(0.75) = 36.87°.
  • Angle B = 90° − angle A = 53.13°.
  • Area = a × b ÷ 2 = 3 × 4 ÷ 2 = 6.
  • Perimeter = a + b + c = 12.

The calculator also works out the height from the right angle to the hypotenuse (a × b ÷ c), which is useful in some geometry problems. For other angle units, such as radians, the angle converter helps.

Checking for a right angle

The theorem works in reverse: if a² + b² = c², the triangle has a right angle. That's the 3-4-5 method used in building and carpentry:

  1. Measure 3 units along one wall from the corner and mark it.
  2. Measure 4 units along the other wall and mark it.
  3. The distance between the marks should be exactly 5 units. If it's more, the angle is wider than 90°; if less, it's narrower.

Use bigger multiples (6-8-10 or 9-12-15) for more accuracy on large jobs, such as setting out a foundation, a deck or a patio.

Everyday uses

  • Screen sizes: TVs and monitors are measured on the diagonal. A screen 48 inches wide and 27 inches tall is about 55 inches diagonally.
  • Ladders: a 6 m ladder with its foot 2.4 m from the wall reaches about 5.5 m up.
  • Distance on a map: walking 3 km east and 4 km north puts you 5 km from the start in a straight line.
  • Roof pitch and rafters: the rafter is the hypotenuse of the rise and the run.
  • Diagonal braces on gates, shelves and frames.
  • Ramps: checking a wheelchair ramp's length from its rise and run.

Common mistakes

  • Mixing up the hypotenuse. c is always the longest side, opposite the right angle. If you put the hypotenuse in a or b, the result is wrong. The Pythagorean theorem calculator warns you if the hypotenuse isn't the longest side.
  • Adding before squaring. (a + b)² isn't a² + b².
  • Forgetting the square root at the end.
  • Mixing units, such as one side in feet and another in inches.

In three dimensions

The theorem extends to 3D. The diagonal of a box with sides x, y and z is √(x² + y² + z²). A box 30 × 40 × 120 cm has an inside diagonal of √(900 + 1,600 + 14,400) = 130 cm, which tells you the longest rod that will fit. Apply the Pythagorean theorem calculator twice: first for the floor diagonal (50 cm), then with that and the height (120 cm).

Tips

  • Round only at the end for the most accurate answers.
  • Use the same unit for all sides.
  • For square roots shown as simplified radicals, use the square root calculator.
  • For circles, see the circle calculator.

Privacy and accuracy

Your numbers stay in your browser. The Pythagorean theorem calculator uses the browser's hypot function for the hypotenuse, which avoids overflow and rounding errors with very large or small numbers, and a difference-of-squares form for the legs. No AI is involved. Students, builders, carpenters, designers and DIYers use it free on any device.

Distance between two points

The distance formula is the Pythagorean theorem in disguise. For points (x₁, y₁) and (x₂, y₂):

Distance = √((x₂ − x₁)² + (y₂ − y₁)²)

From (1, 2) to (7, 10): the differences are 6 and 8, so the distance is √(36 + 64) = 10. Enter 6 and 8 as the legs in the Pythagorean theorem calculator to check it. The same idea measures distances on maps, screens and game boards.

Why the theorem is true

There are hundreds of proofs. One of the simplest arranges four copies of the triangle inside a large square of side a + b. The space left in the middle is a square of side c. The large square's area is (a + b)², which equals the four triangles (4 × ab ÷ 2 = 2ab) plus c². Expanding (a + b)² = a² + 2ab + b², and subtracting 2ab from both sides leaves a² + b² = c².

Accuracy in practice

Measuring sides with a tape gives small errors, and squaring them can enlarge those errors. For building work, measure each side twice, use the largest triangle you can, and let the Pythagorean theorem calculator do the arithmetic so rounding doesn't add to the problem.

Quick reference

  • Legs (a, b): the two sides that form the right angle.
  • Hypotenuse (c): the longest side, opposite the right angle.
  • a² + b² = c²: the theorem.
  • Converse: if a² + b² = c², the triangle has a right angle.
  • Pythagorean triple: whole-number sides, such as 3, 4, 5.

Common questions

Is the hypotenuse always longest? Yes, in every right triangle. Can the theorem find angles? Not directly, but once all three sides are known, trigonometry gives the angles, and the Pythagorean theorem calculator shows them. Does it work in feet and inches? Yes, as long as every side uses the same unit, so convert 5 ft 6 in to 66 inches first.

Pythagoras in design and screens

Screen sizes, paper diagonals and photo frames all rely on the theorem. A 16:9 screen has a width-to-height ratio of 16 to 9, so its diagonal is √(16² + 9²) ≈ 18.36 units; a 27-inch monitor is therefore about 23.5 inches wide and 13.2 inches tall. A4 paper is 210 × 297 mm, so its diagonal is about 363.7 mm. Designers and builders use the Pythagorean theorem calculator to check that layouts, frames and furniture fit, before cutting anything.

Checking homework

After solving by hand, enter the two known sides into the Pythagorean theorem calculator to confirm the third, and compare the angles too.

A worked example

A homeowner is buying a ladder to clean gutters 5.5 m up. Safety guidance says the foot of a ladder should be about a quarter of the working height from the wall, so roughly 1.4 m, but her patio only allows 2.4 m. She wants to know if a 6 m ladder will reach.

She enters b = 2.4 and c = 6 into the Pythagorean theorem calculator, leaving a empty. The ladder reaches a ≈ 5.50 m up the wall, at an angle of about 66.4° to the ground. Enough to reach, but a bit flatter than the ideal 75°, so she decides to move the foot closer to the wall and set it on a stable mat.

For a TV she's buying, she checks a screen 48 inches wide and 27 inches tall: the diagonal comes out at about 55.07 inches, matching the "55 inch" label.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.

Frequently asked questions

What is the Pythagorean theorem?

In a right-angled triangle, a² + b² = c², where c is the hypotenuse. The Pythagorean theorem calculator solves it for any missing side.

How do I find the hypotenuse?

c = √(a² + b²). For legs of 6 and 8, the hypotenuse is 10.

How do I find a missing leg?

a = √(c² − b²). For a hypotenuse of 10 and a leg of 6, the other leg is 8.

Does it work for any triangle?

No, only for right-angled triangles.

What is a Pythagorean triple?

Three whole numbers that fit a² + b² = c², such as 3, 4, 5 or 5, 12, 13.

Is the Pythagorean theorem calculator free?

Yes, completely free, with no sign-up.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep