Mathematics · Updated 2026

Pythagorean Theorem Calculator

Find any side of a right triangle. Enter any two sides and calculate the third using a² + b² = c². Step-by-step solution, Pythagorean triples, all angles shown.

Last updated

Find Any Side
Step-by-Step Solution
All Angles Shown
Pythagorean Triples
Our networkdiscount5Fresh deals. Five at a time.Price drops and coupon codes, ending soonest first.See today’s deals
a²+b²
Pythagorean Theorem
a² + b² = c² · Enter any two sides
a b c leg a leg b hypotenuse 90°
Side a (leg)
Side b (leg)
Side c (hyp.)
Common Pythagorean Triples: click to load
3·4·5
Classic
5·12·13
Common
8·15·17
Classic
7·24·25
Classic
20·21·29
Classic
9·40·41
Classic
6·8·10
Scaled
10·24·26
Scaled

Enter any two sides of the right triangle to calculate the missing one.

The Pythagorean Theorem Explained

In a right triangle, a² + b² = c², so the hypotenuse is c = √(a² + b²). Legs of 3 and 4 give a hypotenuse of 5, and a missing leg is √(c² − b²). Enter any two sides above and the calculator finds the third, plus both acute angles, the area and the perimeter, with every step shown.

In any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The hypotenuse (c) is always the longest side and always sits opposite the 90° angle.

Known to Babylonian mathematicians nearly 4,000 years ago, the theorem is named after Pythagoras (about 570 to 495 BC), who is traditionally credited with its first formal proof. It is arguably the most used theorem in all of mathematics.

Finding the Hypotenuse

c = √(a² + b²). With legs 3 and 4: c = √(9+16) = √25 = 5. The result is always positive and always larger than either leg.

Finding a Leg

a = √(c² − b²). With c=13 and b=12: a = √(169−144) = √25 = 5. The hypotenuse must be larger than either leg.

Pythagorean Triples

Integer solutions: 3-4-5, 5-12-13, 8-15-17. Any multiple of a triple is also a triple. Used in construction to create perfect 90° angles.

Real-World Uses

Architecture, navigation, surveying, screen diagonal sizes, GPS distance calculation, and game physics all rely on the Pythagorean theorem daily.

All Primitive Pythagorean Triples Up to 100

A primitive triple has no common factor. There are exactly 16 with a hypotenuse of 100 or less. Each comes from Euclid’s formula a = m² − n², b = 2mn, c = m² + n² with the m and n shown. The angle column is the smallest angle of the triangle.

Sides a, b, cm, nSmallest angle
3, 4, 52, 136.87°
5, 12, 133, 222.62°
8, 15, 174, 128.07°
7, 24, 254, 316.26°
20, 21, 295, 243.60°
12, 35, 376, 118.92°
9, 40, 415, 412.68°
28, 45, 537, 231.89°
11, 60, 616, 510.39°
16, 63, 658, 114.25°
33, 56, 657, 430.51°
48, 55, 738, 341.11°
13, 84, 857, 68.80°
36, 77, 859, 225.06°
39, 80, 898, 525.99°
65, 72, 979, 442.08°

Multiply any row by a whole number to get another triple: 3, 4, 5 becomes 6, 8, 10 or 30, 40, 50. The angles stay the same.

Special Right Triangles

TriangleSide ratioExample
45°, 45°, 90°1 : 1 : √2legs 5 and 5, hypotenuse 7.07
30°, 60°, 90°1 : √3 : 2legs 5 and 8.66, hypotenuse 10
3, 4, 53 : 4 : 5angles 36.87° and 53.13°

The diagonal of any square is its side times √2 (1.4142). A square with 10 ft sides has a 14.14 ft diagonal.

Worked Examples

How high a ladder reaches

A 12 ft ladder with its foot 3 ft from the wall reaches √(12² − 3²) = √135 = 11.62 ft up the wall. Setting the foot out one quarter of the ladder’s length is the OSHA rule of thumb for a safe angle, about 76°.

TV screen width and height

A 65 inch TV is measured on the diagonal. With a 16:9 screen, width = 65 × 16 ÷ √(16² + 9²) = 56.65 in and height = 31.87 in.

Room diagonal, flat and in 3D

A 12 by 16 ft floor has a corner to corner diagonal of √(144 + 256) = 20 ft. With an 8 ft ceiling, the longest straight line from a floor corner to the opposite ceiling corner is √(12² + 16² + 8²) = 21.54 ft.

Baseball diamond

The bases are 90 ft apart on a square, so the throw from home plate to second base is 90 × √2 = 127.28 ft.

Common Mistakes

  • Adding before squaring. √(3 + 4)² is 7, not 5. Square each side first, then add.
  • Adding when you should subtract. To find a leg, subtract: a² = c² − b².
  • Putting the longest side in the wrong place. The hypotenuse is always opposite the right angle and always the longest side.
  • Using it on a triangle without a 90° angle. For other triangles use the Law of Cosines in the triangle calculator.
  • Mixed units. Convert feet and inches to one unit before squaring.
Method and sources. Theorem: a² + b² = c² for a right triangle (Euclid, Elements I.47) and its converse (I.48). Triples generated with Euclid’s formula for coprime m > n of opposite parity, then checked by squaring. Angles use arctan(a/b). The Babylonian date refers to the Plimpton 322 clay tablet (about 1800 BC). Ladder angle rule: OSHA 29 CFR 1926.1053(b)(5)(i). Every figure on this page was computed with node.

Pythagorean Theorem Questions

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The hypotenuse (c) is the longest side, always opposite the right angle (90°). Pythagoras of Samos (570 to 495 BC) is credited with the first formal proof, though the relationship was known to Babylonians, Egyptians, and Chinese mathematicians centuries earlier. It is one of the most proved theorems in mathematics, with over 370 known proofs.

Use c = √(a² + b²). Step-by-step: (1) Square both legs: a² and b². (2) Add them: a² + b². (3) Take the square root of the sum. Example: legs 6 and 8. c = √(36 + 64) = √100 = 10. The hypotenuse is always the longest side and is always greater than either leg but less than their sum. If c ≥ a + b, you have made an error.

Rearrange the formula: a = √(c² − b²). The hypotenuse (c) must be greater than the known leg (b). Example: c = 13, b = 12. a = √(169 − 144) = √25 = 5. If c ≤ b, the values are invalid: no such right triangle can exist. This is how GPS systems calculate distances: measuring horizontal and vertical components then applying the theorem to find actual distance.

A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². The simplest is 3-4-5 (9+16=25). Multiples of any triple also form triples: 6-8-10, 9-12-15, 12-16-20. Other primitive triples (not multiples of smaller ones): 5-12-13, 8-15-17, 7-24-25, 20-21-29. Euclid gave a formula for generating all primitives: a = m²−n², b = 2mn, c = m²+n² for coprime integers m > n > 0 that are not both odd.

Construction: builders use 3-4-5 triangles to verify right angles. Architecture: calculating roof slopes, staircase dimensions, and ramp gradients. Navigation: calculating straight-line distance from east-west and north-south components. Screen sizes: a TV described as "65 inches" refers to the diagonal, calculated using the theorem from width and height. Game physics: calculating distances between objects. GPS: computing distances between coordinates. Basically any time you need to find the straight-line distance between two points in a flat plane.

Only for right triangles (those with exactly one 90° angle). For other triangles: if a² + b² > c², the angle opposite c is acute (less than 90°). If a² + b² < c², the angle is obtuse (greater than 90°). For any triangle (not just right), the generalized law of cosines applies: c² = a² + b² − 2ab×cos(C), which reduces to a² + b² = c² when C = 90° (since cos(90°) = 0).

The 3-4-5 rule is a practical application of the Pythagorean theorem for creating perfect 90° angles on building sites. Measure 3 units along one wall, 4 units along the adjacent wall. If the diagonal distance between those two endpoints is exactly 5 units, the angle is a perfect right angle. Any scale works: 30cm-40cm-50cm, or 3ft-4ft-5ft, or 6m-8m-10m. This method has been used since ancient Egypt: construction workers who knew and used this trick were called "rope stretchers."

In a right triangle, one angle is always 90°. The other two angles (A and B) are complementary (they add to 90°). Using trigonometry: angle A = arctan(a/b) = arcsin(a/c) = arccos(b/c). Angle B = 90° − A. Example: legs a=3, b=4, hypotenuse c=5. Angle A = arctan(3/4) ≈ 36.87°. Angle B = 90° − 36.87° = 53.13°. This calculator shows all angles in the results panel.

Area = ½ × a × b (the two legs are the base and height, since they meet at 90°). Example: legs 3 and 4. Area = ½ × 3 × 4 = 6 square units. Perimeter = a + b + c. Example: 3 + 4 + 5 = 12 units. Note: for the area formula, always use the two legs (the sides adjacent to the right angle), not the hypotenuse. The hypotenuse is only the base of a right triangle when the triangle is positioned differently.

The converse states: if a² + b² = c² for a triangle with sides a, b, c, then the triangle is a right triangle with the right angle opposite side c. This allows you to verify right angles without a protractor. Example: do sides 5, 12, and 13 form a right triangle? 5² + 12² = 25 + 144 = 169 = 13². Yes. Do sides 5, 6, 7 form a right triangle? 5² + 6² = 25 + 36 = 61 ≠ 49 = 7². No, it is a non-right (scalene) triangle.

The diagonal splits a rectangle into two right triangles, so d = √(length² + width²). An 8 by 5 ft rectangle has a diagonal of √(64 + 25) = √89 = 9.43 ft. Enter the length and width as legs a and b above to get it.

Yes. The space diagonal of a box is √(l² + w² + h²), which is the theorem applied twice. A room 12 by 16 ft with an 8 ft ceiling has a floor diagonal of 20 ft and a corner to corner space diagonal of √(400 + 64) = 21.54 ft.