Built in Lahore, PakistanHow we check the math
Math

Pythagorean Theorem Calculator

Find the missing side of a right triangle from the other two, using a² + b² = c², and get its area, perimeter and angles as well.

Find

5Hypotenuse c = √(a² + b²)

Sidesa = 3, b = 4, c = 5
Area6
Perimeter12
Angles36.87°, 53.13°, 90°

How this calculator works

In a right triangle — one with a 90° corner — the square of the hypotenuse (the side opposite the right angle, always the longest) equals the sum of the squares of the other two sides, called the legs. In symbols: a² + b² = c². This is the Pythagorean theorem, named for Pythagoras of Samos (sixth century BC); versions of it appear in Babylonian, Chinese and Indian mathematics centuries earlier.

To find the hypotenuse when both legs are known: c = √(a² + b²). On legs of 3 and 4 the hypotenuse is √(9 + 16) = √25 = 5.

To find a missing leg when the hypotenuse and the other leg are known: b = √(c² − a²). The hypotenuse must be larger than either leg, so if your "hypotenuse" value is smaller than the leg you entered, the input is wrong, not the triangle.

Area and perimeter. The two legs are perpendicular to each other, so they serve as base and height. Area = a × b ÷ 2. Perimeter = a + b + c.

Angles. With all three sides known, every angle can be found by trigonometry. The two acute angles add to 90°. One acute angle is arctan(a ÷ b); the other is 90° minus that. For a 3-4-5 triangle those angles are 36.87° and 53.13°.

The theorem works in reverse too: a triangle with sides satisfying a² + b² = c² is a right triangle (the "converse of the Pythagorean theorem"). This is the basis for the 3-4-5 trick carpenters use to square a corner on site.

Worked example

Legs of 3 and 4

  1. Hypotenuse: c = √(3² + 4²) = √(9 + 16) = √25 = 5.
  2. Area: (3 × 4) ÷ 2 = 6 square units.
  3. Perimeter: 3 + 4 + 5 = 12 units.
  4. Angles: arctan(3 ÷ 4) = 36.87°, then 90° − 36.87° = 53.13°, plus the right angle = 90°.

Common mistakes

  • Treating a leg as the hypotenuse. The hypotenuse is always opposite the right angle and is the longest side; the two legs meet at the right angle.
  • Taking the square root of (a² − b²) instead of (a² + b²) when both are legs. The theorem adds the squares, not subtracts.
  • Using the theorem on a triangle without a right angle. The result will be wrong — use the law of cosines instead.

Limitations of this calculator

  • Applies only to right triangles. For general triangles use the law of cosines or the law of sines.
  • Returns Euclidean distances only. Does not model Earth's curvature; for long distances on a globe use great-circle distance.
  • Assumes flat (plane) geometry. In spherical or hyperbolic geometry a² + b² ≠ c² even in a "right" triangle.

For your specific situation, consult a tax professional or financial advisor.

Questions people ask

How do builders check for a square corner on site?

The 3-4-5 method: measure 3 units along one wall from the corner and mark it, measure 4 units along the other wall from the same corner and mark it, then measure the straight-line distance between the two marks. If it is exactly 5 units, the corner is 90°; if not, nudge one wall until it is. The method scales — 6-8-10 and 9-12-15 work the same way.

Does the theorem work for non-right triangles?

No. For a triangle with any angle C, use the law of cosines: c² = a² + b² − 2ab·cos(C). When C = 90°, cos(C) = 0 and the law collapses back to Pythagoras.

What is a Pythagorean triple?

Three positive whole numbers that satisfy a² + b² = c². The best-known are 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Any triple times a whole number is also a triple, so 6-8-10 (double of 3-4-5) and 15-36-39 (triple of 5-12-13) both qualify.

How do I find a TV or screen diagonal from its width and height?

Treat width and height as the two legs. A screen 48 inches wide and 27 inches high (standard 16:9) has a diagonal of √(48² + 27²) = √3,033 ≈ 55 inches. TV marketing uses this diagonal number as the screen "size".

Does it work in three dimensions?

Yes, with an extra term: the length of the space diagonal of a box with sides a, b, c is √(a² + b² + c²). Used by shippers to check whether a parcel fits inside a given carton.

Sources

Last reviewed October 2, 2026 · Last reviewed by Muhammad Ahmad on October 31, 2026