🔧Toolify

Pythagorean Theorem Calculator — Find Any Side

This calculator applies the Pythagorean theorem (a² + b² = c²) to find any missing side of a right triangle. Enter leg a and leg b to find the hypotenuse, or enter the hypotenuse and one leg to find the other leg. Results include area, perimeter, and all three angles in degrees.

C (90°)
|\
|  \
|    \  c (hypotenuse)
b |      \
|        \
A----------B
     a

Leave one field blank — the calculator will find it for you. The highlighted field shows the computed value.

Computed missing side
Hypotenuse c (c) = 5
Area
6
Perimeter
12

All sides

a
3
b
4
c
5

All angles

Angle A
36.869898°
Angle B
53.130102°
Angle C (right)
90° ✓

How it works

What is the Pythagorean theorem?

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The hypotenuse is always the side opposite the 90° angle and is always the longest side of the triangle.

This theorem works in one direction for finding the hypotenuse: c = √(a² + b²). It also works in reverse for finding a missing leg: a = √(c² − b²) or b = √(c² − a²). All three forms are available in this calculator — just leave the unknown field blank.

Beyond side lengths, every right triangle's angles are fully determined by its side ratios. Angle A = arctan(a/b), angle B = arctan(b/a), and angle C is always exactly 90°. Area is simply (a × b) / 2, since the two legs form a right angle and act as the base and height.

Real-life applications of the Pythagorean theorem

Construction and carpentry use the theorem constantly. To check whether a corner is perfectly square, carpenters use the 3-4-5 rule: if one leg is 3 units, the other 4, the diagonal should be exactly 5. Scaling up (6-8-10, 9-12-15, and so on) still gives a right angle. This trick predates written mathematics and appears in ancient Egyptian and Babylonian records.

Screen and display technology relies on the theorem to calculate diagonal size. A monitor advertised as '27 inches' is 27 inches measured diagonally — the actual width and height are legs of a right triangle. Enter width and height into this calculator to verify any display's diagonal.

Navigation and mapping use the theorem to find straight-line distances. On a grid map, the shortest path between two points forms the hypotenuse of a right triangle whose legs are the east-west and north-south distances. GPS receivers perform millions of similar calculations per second to track position.

History of the theorem

Although named after the Greek mathematician Pythagoras (c. 570–495 BC), the relationship was known well before him. Babylonian clay tablets from around 1800 BC list Pythagorean triples — integer solutions like 3-4-5, 5-12-13, and 8-15-17. The ancient Egyptians used knotted ropes divided in 12 equal lengths to lay out right angles in construction.

Pythagoras or his followers are credited with the first general proof that the relationship holds for ALL right triangles, not just the integer cases. Over 300 different proofs exist today, including geometric, algebraic, and even one by US President James Garfield in 1876.

The theorem generalizes in many directions. In three dimensions, the space diagonal of a box with sides a, b, c is √(a² + b² + c²). In Einstein's special relativity, a modified form appears in the spacetime interval formula. The theorem is also the foundation of the distance formula used throughout coordinate geometry and data science.

Frequently asked questions

What is the formula for the Pythagorean theorem?

The formula is a² + b² = c², where a and b are the two shorter sides (legs) and c is the hypotenuse — the longest side opposite the right angle. To find c: c = √(a² + b²). To find a missing leg: a = √(c² − b²).

How do I find the hypotenuse if I know both legs?

Enter a value in Side a and Side b, and leave the Hypotenuse c field blank. The calculator computes c = √(a² + b²) automatically.

How do I find a leg when I know the hypotenuse and the other leg?

Enter the hypotenuse in the c field and the known leg in either the a or b field. Leave the unknown leg blank. The calculator uses a = √(c² − b²) or b = √(c² − a²).

Why does the calculator say the hypotenuse is too small?

The hypotenuse must always be longer than either leg. If you enter c = 3 and a = 4, that is impossible because c < a. Double-check which value is the hypotenuse — it is always the side opposite the right (90°) angle.

What are Pythagorean triples?

Pythagorean triples are sets of three positive integers that satisfy a² + b² = c². The most famous is 3-4-5: 9 + 16 = 25. Others include 5-12-13, 8-15-17, and 7-24-25. Multiples of any triple also work: 6-8-10, 9-12-15, and so on.

Can I use this for non-right triangles?

No — the Pythagorean theorem applies only to right triangles. For triangles without a 90° angle, use the law of cosines (available in our triangle calculator). A right triangle is identified by one angle measuring exactly 90°.

How precise are the results?

The calculator uses 64-bit floating-point arithmetic, which gives about 15–16 significant digits of precision. Results are displayed with up to 6 decimal places. For practical purposes, this far exceeds the precision of physical measurements.

Does this tool store my data?

No. All calculations happen locally in your browser. No input values are sent to a server or stored anywhere.

Related tools

Last updated:

Try our AI prompts →