Geometry & right triangle solver

Pythagorean Theorem Calculator

Find the missing side of a right triangle using the Pythagorean theorem. Calculate the hypotenuse or either leg, check whether three sides make a right triangle, and explore area, perimeter, angles and step-by-step working with a visual triangle.

Find a, b or cRight triangle checkerSteps & diagramArea & perimeterPythagorean triples

Find a missing right-triangle side

Enter perpendicular legs a and b. The calculator solves hypotenuse c, the side opposite the 90° angle.

Both known sides must use the same unit.
Calculation uses unrounded side lengths; only the display is rounded.
Hypotenuse c5 cm

—

Leg a—
Leg b—
Hypotenuse c—
Area—
Perimeter—
Acute angles (A / B)—

Right triangle diagram

Right triangle with labeled legs and hypotenuse A right triangle with a vertical leg a, a horizontal leg b and hypotenuse c. The right angle is shown at the lower left. a = 3 b = 4 c = 5 90°
Diagram shows the solved right triangle. For extreme side ratios it is schematic, not drawn to exact scale.
a² = 9b² = 16c² = 25

Step-by-step solution

Pythagorean theorem formula: a² + b² = c², where a and b are perpendicular legs and c is the hypotenuse. To find c, use c = √(a² + b²). For legs 3 and 4, c = √(9 + 16) = √25 = 5.

What is the Pythagorean theorem?

The Pythagorean theorem is a fundamental relationship between the three sides of a right-angled triangle. The two sides that meet at the 90-degree angle are the legs, often called a and b. The side directly opposite that angle is the hypotenuse, called c, and is always the longest side.

The theorem states that the sum of the squares of the two legs equals the square of the hypotenuse. You can use it to calculate a missing side when the other two side lengths are known, or check whether three measurements are consistent with a right triangle.

Pythagorean theorem formulas for a, b and c

Find the hypotenuse c

c = √(a² + b²)

Use when both perpendicular legs are known.

Find missing side a

a = √(c² − b²)

Use when leg b and hypotenuse c are known.

Find missing side b

b = √(c² − a²)

Use when leg a and hypotenuse c are known.

In these formulas, all three lengths must be measured in the same unit, such as centimetres, metres or feet. The theorem only applies to triangles with a confirmed 90-degree angle. If you are solving for a leg, make sure the hypotenuse is longer than the known leg before subtracting squares.

How to use this Pythagorean theorem calculator

  1. Choose whether to find the hypotenuse c, the missing leg a, the missing leg b, or check a three-side set.
  2. Enter the known side lengths as positive numbers. The missing side does not need to be entered.
  3. Select a common length unit and your preferred decimal precision.
  4. Click Calculate triangle to see the missing side, formula, calculation steps and related right-triangle measures.
  5. Use the diagram to identify which side is the hypotenuse and where the right angle lies.

Example 1: Find the hypotenuse using 3 and 4

Consider a right triangle with perpendicular sides a = 3 cm and b = 4 cm. Square each leg to get 9 and 16. Add those values to get 25, then take its positive square root. This gives c = 5 cm. The completed sides form the well-known 3–4–5 Pythagorean triple.

StepWorkingResult
1Write the theorema² + b² = c²
2Substitute known sides3² + 4² = c²
3Square and add9 + 16 = 25
4Take the positive square rootc = √25 = 5 cm
5Calculate area3 × 4 ÷ 2 = 6 cm²
6Calculate perimeter3 + 4 + 5 = 12 cm

Example 2: Find a missing leg

If a right triangle has a hypotenuse of 13 cm and one leg of 12 cm, the other leg can be found by rearranging the Pythagorean theorem. Subtract the square of the known leg from the square of the hypotenuse: a² = 13² − 12² = 169 − 144 = 25. Therefore, a = 5 cm.

It is important to subtract the squares before taking the square root. Simply subtracting the side lengths (13 − 12) would give the wrong answer.

Common Pythagorean triples table

A Pythagorean triple consists of three positive whole numbers that satisfy a² + b² = c². They are useful for learning, surveying and checking right-angle measurements.

Leg aLeg bHypotenuse cCheck
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
9404181 + 1,600 = 1,681
202129400 + 441 = 841

Area, perimeter and angles of a right triangle

Triangle area

Area = (a × b) ÷ 2

Uses the two perpendicular legs as base and height.

Triangle perimeter

Perimeter = a + b + c

Adds the lengths of all three sides.

Acute angles

A = arctan(a ÷ b), B = 90° − A

Angles A and B are opposite legs a and b respectively.

For a 3–4–5 triangle, area is 6 square units and perimeter is 12 length units. The acute angles are approximately 36.87° and 53.13°, adding up to 90° because the remaining angle is a right angle.

How to check if three sides form a right triangle

Choose the Check triangle tab, enter legs a and b and the candidate longest side c. The tool checks that the three positive lengths can form a triangle and compares the entered c with √(a² + b²). If the values match within numerical tolerance, the sides are consistent with a right triangle.

For example, 3, 4 and 5 form a right triangle because 9 + 16 = 25. However, 2, 3 and 4 form a valid triangle that is not right-angled, because 4² is greater than 2² + 3². Three lengths that fail the triangle inequality do not form a triangle at all.

Real-world uses of the Pythagorean theorem

Construction and ladders

Estimate diagonal spans and ladder lengths when horizontal and vertical distances form a verified right angle.

Room diagonals

Find the diagonal of a rectangular floor, display or other right-angled shape from its length and width.

Maths and geometry

Verify a right triangle, understand Pythagorean triples and practise rearranging the theorem.

Common mistakes when solving right triangles

  • Applying the theorem to any triangle: the basic Pythagorean theorem requires a right angle of 90°.
  • Confusing the hypotenuse: c is opposite the right angle and must be longer than either leg.
  • Adding side lengths directly: finding c requires squaring both legs, adding the squares and taking a square root.
  • Subtracting instead of squaring: finding a leg uses c² minus the other leg's square, not c minus that side.
  • Mixing units: convert all known lengths to the same unit before calculating.
  • Rounding too early: carry the full precision through intermediate calculations and round only the final display.

Related maths calculators

Frequently Asked Questions

What is the Pythagorean theorem?

It states that for a right triangle, a² + b² = c², where a and b are legs and c is the hypotenuse.

How do I find the hypotenuse?

Use c = √(a² + b²). For legs of lengths 3 and 4, c is 5.

How do I solve for a or b instead?

Use a = √(c² − b²) or b = √(c² − a²). The hypotenuse must be strictly longer than the known leg.

What are Pythagorean triples?

They are positive whole-number side lengths satisfying the theorem, including 3–4–5, 5–12–13 and 8–15–17.

Can I calculate area and perimeter?

Yes. For a right triangle, area = a × b ÷ 2 and perimeter = a + b + c.

Does the theorem work for every triangle?

No. It applies to right-angled triangles. Different methods are required to solve triangles without a right angle.

Can I check if three sides form a right triangle?

Yes. Enter a, b and longest side c in Check triangle mode to compare c with √(a² + b²), including triangle-inequality validation.

Last updated: October 18, 2026. Calculations assume a geometric right triangle when solving for a missing side. Results are rounded for display, while the internal calculations use full floating-point precision. Physical measurements may have uncertainty.