Everyday utility

Pythagorean Theorem Calculator

Solve for any missing side of a right triangle: find the hypotenuse from both legs, or find a missing leg from the hypotenuse and the other leg. Enter two known sides and the calculator does the rest.

Last reviewed May 19, 2026 by ToolSpilo Editorial Team.

Review method: Reviewed against right-triangle geometry, Pythagorean triple verification, and inverse-trig angle derivation.

Calculator tool

How this calculator works

Use the explanation to understand the formula, assumptions, and practical limits behind the calculator result.

The Pythagorean Theorem

For any right triangle with legs aa and bb and hypotenuse cc:

a2+b2=c2a^2 + b^2 = c^2

The hypotenuse (cc) is the side opposite the 90° angle and is always the longest side. The two shorter sides are called legs.

Three Things You Can Solve

What's unknownFormula
Hypotenuse ccc=a2+b2c = \sqrt{a^2 + b^2}
Leg aaa=c2b2a = \sqrt{c^2 - b^2}
Leg bbb=c2a2b = \sqrt{c^2 - a^2}

Worked Examples

Find the hypotenuse — legs 3 and 4:

c=32+42=9+16=25=5c = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5

Find a missing leg — hypotenuse 13, one leg 5:

b=13252=16925=144=12b = \sqrt{13^2 - 5^2} = \sqrt{169 - 25} = \sqrt{144} = 12

Common Pythagorean Triples

These integer combinations satisfy a2+b2=c2a^2 + b^2 = c^2 exactly — no rounding needed.

Leg aaLeg bbHypotenuse cc
345
51213
81517
72425
94041

Any multiple also works: 6-8-10, 9-12-15, and so on.

Real-World Uses

The theorem appears everywhere measurements involve right angles:

  • Construction: checking if a corner is truly 90° using a 3-4-5 tape measure check
  • Navigation: finding the straight-line distance between two points on a grid
  • Screen size: TV and monitor diagonal measurements come from width and height via this formula
  • Roofing: calculating rafter length from run and rise
  • Physics: finding the resultant of two perpendicular forces or velocities

Validation

A leg cannot equal or exceed the hypotenuse — that would violate the geometry. If the inputs describe an impossible triangle, the calculator reports the error rather than showing a wrong result.

Frequently asked questions

How do I know which side is the hypotenuse?

The hypotenuse is the side directly across from the right angle (the 90° corner). It is always the longest side of any right triangle. In diagrams it is usually labeled cc. If you see a small square drawn in a corner, the side opposite that square is the hypotenuse.

What if my inputs describe an impossible triangle?

A leg cannot be longer than or equal to the hypotenuse, because a2+b2=c2a^2 + b^2 = c^2 requires c>ac > a and c>bc > b. For example, a hypotenuse of 4 with a leg of 5 is impossible — the leg is already longer than the hypotenuse. The calculator detects this and shows an error instead of a mathematically nonsensical result.

Does the theorem work for non-right triangles?

No — a2+b2=c2a^2 + b^2 = c^2 holds only when the angle between the two legs is exactly 90°. For acute triangles a2+b2>c2a^2 + b^2 > c^2, and for obtuse triangles a2+b2<c2a^2 + b^2 < c^2. These inequalities are used to classify triangles. To solve an arbitrary (non-right) triangle you need the Law of Cosines: c2=a2+b22abcos(C)c^2 = a^2 + b^2 - 2ab\cos(C).

Where do the angles come from in the results?

Once all three sides are known, the acute angles follow from inverse trigonometry. Angle AA (opposite leg aa) is arctan(a/b)\arctan(a/b), and angle BB (opposite leg bb) is arctan(b/a)\arctan(b/a). Together with the 90° right angle, the three angles always sum to 180°.

What is a Pythagorean triple?

A Pythagorean triple is a set of three positive integers (aa, bb, cc) that satisfy the theorem exactly — no decimals. The most famous is 3-4-5. Others include 5-12-13, 8-15-17, and 7-24-25. Multiples of any triple (like 6-8-10 or 9-12-15) also work. Builders use the 3-4-5 triple to verify square corners quickly with just a tape measure.

How is this different from the right-triangle calculator?

This calculator focuses specifically on the Pythagorean theorem — solving for a missing side from two known sides. The right-triangle calculator on this site solves the triangle from two legs using both the theorem and trigonometry, outputting all angles and the hypotenuse in one step.