Skip to content
Calcapedia
Math

Pythagorean Theorem Calculator

Find the missing side of a right triangle from the other two, in decimal and exact radical form, or check whether three sides make a right triangle.

Level: Grade 8

  • Common Core standard 8.G.B.7Apply the Pythagorean Theorem to determine unknown side lengths in right triangles in real-world and mathematical problems in two and three dimensions.
Printable worksheet

Pythagorean Theorem Calculator

Know the answer you need? Pick an input to work backward.

Inputs
Solve for

One of the two sides that meet at the square (90°) corner.

Result

Hypotenuse c

5

Sides 3, 4 and 5: the hypotenuse is 5.

Area
6 square units
Perimeter
12
Angle opposite leg a
36.8699 °
Angle opposite leg b
53.1301 °
Height from the right angle to the hypotenuse
2.4
Pythagorean triple
Yes: 3, 4, 5

See the step-by-step solution ↓

Step-by-step solution

  1. Start from the Pythagorean rule: the two legs (a and b) squared add up to the hypotenuse (c) squared

    c2=a2+b2
  2. Put in the two legs and square each one (multiply it by itself)

    c2=32+42=9+16=25
  3. Take the square root to undo the squaring and get the hypotenuse

    c=25=5
  4. Find the area: the two legs act as the base and the height, so multiply them and halve it

    3×42=6
  5. Find the perimeter, the distance all the way around, by adding the three sides

    3+4+5=12
  6. Find the angle across from leg a. Divide a by b, then use the tan⁻¹ (inverse tangent) button to turn that into an angle

    A=tan⁻¹(34)=36.8699°
  7. The two smaller angles always add up to 90°, so subtract to get the angle across from leg b

    90−36.8699=53.1301°

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

How to solve this on a calculator

The keys to press to get this page's worked-example answer on an ordinary calculator, with what the display should show after each step. A named-model tab follows that calculator's official guidebook.

A missing leg with √(c² − a²)

Problem
A 13-foot ladder leans against a wall with its foot 5 feet from the wall. How high up the wall does it reach?
Formula
b = √(c² − a²)
Example values
c = 13 ft (the ladder (hypotenuse)); a = 5 ft (the distance along the ground). These are the fixed values from the worked example on this page, so the keys stay the same whatever you type into the calculator above.
Why a scientific calculator
The x² and √ keys do the squaring and the root, and one bracket keeps the subtraction under the root. It also works on a statistics calculator (not on this site yet) or graphing calculator.
The whole sequence
√13x²−5x²)=

Step by step

  1. √

    Press √. Everything up to the closing bracket goes under the root.

    Display: √(

  2. 13x²

    Type the hypotenuse, 13, and press x².

    Display: √(13^2

  3. −5x²)

    Subtract the known leg squared: − 5 x². Then close the bracket.

    Display: √(13^2−5^2)

  4. =

    Press =. The ladder reaches 12 feet up the wall.

    Display: 12

If your answer looks wrong

  • If you get −12, the bracket closed too early: √(13²) − 5² is 13 − 25.
  • Adding instead, √(13² + 5²) ≈ 13.9283882772, gives a hypotenuse. When the long side is known, subtract.

How this is checked: an automated test presses these keys on this site's scientific calculator, checks every display along the way, and confirms the answer matches the calculator on this page (last checked 2026-10-19). It has not been checked on any particular brand or model, and real calculators label some keys differently.

What this calculator does

Find the missing side of a right triangle when you know the other two sides. A right triangle has one square corner, a 90° angle. The two sides that make that corner are called the legs. The long side across from it is the hypotenuse. They always follow one rule, so any two sides are enough to find the third.

Choose whether you want the hypotenuse or a leg, then enter the two sides you know. You get the missing length as a decimal. For whole-number sides, you also get the exact answer with a square root, such as 5√2. The calculator also gives the area, the perimeter, both angles and the height to the hypotenuse. It tells you when the sides are a Pythagorean triple: three whole numbers that fit the rule. A third option checks whether three sides make a right triangle. If they don't, it says whether the biggest angle is narrower or wider than a square corner. Every line of the math is shown.

Where it's used

Why this math matters outside the classroom:

  • Ladder placement. A 4 m ladder standing 1 m out from a wall reaches √(16 − 1), about 3.87 m, up the wall.
  • Screen sizes. A TV screen 48 in wide and 27 in tall measures about 55 in on the diagonal, the size stores advertise.
  • Squaring a corner. Builders check a corner is square by marking 3 ft along one wall and 4 ft along the other, then confirming the diagonal is 5 ft.
  • Shortcuts. Walking diagonally across a 120 m by 50 m park covers 130 m instead of 170 m around the edge.
  • Ramp length. A ramp that rises 0.5 m over a 6 m run needs a sloped surface about 6.02 m long.

Grade level and standards: Grade 8; Common Core State Standards for Mathematics 8.G.B.7. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

How to use it

  1. Pick what you want to find. Choose the hypotenuse if you know both legs. Choose a missing leg if you know one leg and the hypotenuse. Or check three sides you already have.
  2. Enter the sides you know. Any length unit works, as long as every side uses the same one.
  3. Read the missing side and its exact form. Below it are the area, perimeter, angles and height. In check mode, read the yes-or-no answer and the comparison of squares.
  4. Open the steps to see the rule rearranged, your numbers put in and the square root taken.

What the inputs mean

Leg a
Either of the two shorter sides that meet at the square corner. It doesn't matter which leg you call a.
Hypotenuse c
The hypotenuse is always the longest side. If the number you enter isn't longer than the leg, no right triangle can exist, and the calculator will tell you. In check mode you can enter the three sides in any order. The longest one is treated as the possible hypotenuse.

Formula and method

c² = a² + b²
c = √(a² + b²)
b = √(c² − a²) = √((c − a)(c + a))
area = a × b ÷ 2,  perimeter = a + b + c
height to the hypotenuse = a × b ÷ c
right triangle if a² + b² = c² (acute if greater, obtuse if less)

In the formulas, a and b are the two legs and c is the hypotenuse. A small ² means "times itself", so 5² is 25, and √ means square root. The first line is the rule itself: the two legs squared add up to the hypotenuse squared. Taking the square root of both sides gives the hypotenuse.

To find a missing leg, subtract a² from c² and take the square root. Behind the scenes, the calculator uses the form (c − a)(c + a). It gives the same answer, but stays accurate when the leg is almost as long as the hypotenuse.

The two legs meet at a square corner, so one can be the base and the other the height. That's why the area is half of a × b. The angle across from leg a comes from the tangent button on a calculator (written arctan or tan⁻¹), using a ÷ b. The two smaller angles always add up to 90°.

The rule also works backwards. If the two shorter sides squared add up to the longest side squared, the triangle has a square corner. If the sum is bigger, the largest angle is acute, meaning less than 90°. If it's smaller, that angle is obtuse, meaning more than 90°. The largest angle itself comes from a related rule called the law of cosines.

Worked example

A 13-foot ladder leans against a wall, with its foot 5 feet from the wall. How high up the wall does it reach?

  1. The ladder is the hypotenuse (c = 13). The distance along the ground is one leg (a = 5). Find the other leg.
  2. b² = c² − a² = 13² − 5² = 169 − 25 = 144.
  3. b = √144 = 12 feet.
  4. The triangle under the ladder has an area of 5 × 12 ÷ 2 = 30 square feet. Its perimeter is 5 + 12 + 13 = 30 feet.

Result: The ladder reaches 12 feet up the wall. Because 5, 12 and 13 are all whole numbers, they form a Pythagorean triple. The angle at the wall is about 22.6199°, and the angle at the ground is about 67.3801°.

Understanding the result

The hypotenuse is always longer than either leg, but shorter than the two legs added together. If an answer falls outside that range, check that the hypotenuse is in the right box.

Whole-number answers like 3-4-5 or 5-12-13 are Pythagorean triples. Most sides give lengths with endless decimals, so the decimal is rounded to the precision you choose. The exact square-root form, such as √2 for legs of 1 and 1, is the form most homework asks for.

Assumptions and limitations

  • The triangle has an exact 90° angle between legs a and b.
  • All sides use the same unit. The area is in that unit squared, such as square feet.
  • This tool needs two sides. If you know a side and an angle instead, you need trigonometry (sine, cosine or tangent), not this rule alone.
  • The exact square-root form is only shown when the sides you know are whole numbers.
  • The right-triangle check allows for tiny rounding differences. So measured sides that are very close to a square corner, but not exact, may still be called acute or obtuse.

Frequently asked questions

Which side is the hypotenuse?

It's the side straight across from the square corner, and it's always the longest of the three. The two sides that form the square corner are the legs.

Why do I get an error when the leg equals the hypotenuse?

To find the other leg, the calculator works out √(c² − a²). If a equals c, that comes out to zero. If a is bigger, the number under the square root is negative. Neither one makes a real triangle, so the calculator asks you to check your sides.

Does the theorem work for triangles without a right angle?

No. For other triangles, a wider rule called the law of cosines takes its place. It says c² = a² + b² − 2ab·cos(C), where C is the angle across from side c. When C is 90°, its cosine is zero, and the rule shrinks back to the Pythagorean theorem.

Can I use it to find the distance between two points?

Yes. How far apart the points are across and up-and-down are the two legs. The straight-line distance between them is the hypotenuse. The slope calculator does this for you from coordinates.

How do I check if three sides make a right triangle?

Square the two shorter sides, add them, and compare with the longest side squared. For 5, 12 and 13: 25 + 144 = 169 = 13², so it's a right triangle. For 4, 5 and 6: 16 + 25 = 41, which is more than 36. So that triangle is acute instead.

How do I give the answer in simplest radical form?

"Radical form" means leaving the square root in the answer. To simplify it, pull out any perfect square, like 4, 9 or 25. Legs of 5 and 5 give c = √50 = √(25 × 2) = 5√2. If no perfect square other than 1 divides the number, as with √5, it's already as simple as it gets.

What are some common Pythagorean triples?

3-4-5, 5-12-13, 8-15-17 and 7-24-25 are the smallest ones. Any multiple of a triple is also a triple, so 6-8-10 and 9-12-15 work too. Builders use 3-4-5 to check that corners are square.

How this calculator is checked

Method: Pythagorean theorem and its converse (Euclid, Elements I.47–48); right-triangle area, altitude and arctangent angle definitions; law of cosines for the largest angle. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Pythagorean Theorem Calculator on your own website or blog for free. Paste this code where you want it to appear: