Smekys
Ad Space

Pythagorean Theorem Calculator

Free Pythagorean theorem calculator: enter legs a and b to instantly solve hypotenuse c, both acute angles, area and perimeter of a right triangle.

Enter Values

units

The first perpendicular leg of the right triangle (opposite angle A).

units

The second perpendicular leg of the right triangle (opposite angle B).

Pick the unit your legs are measured in. All length outputs are reported in centimeters (cm); angles are unitless.

Result

Hypotenuse c (cm)
5
Angle at A (opposite leg a)
36.9°
Angle at B (opposite leg b)
53.1°
Area (cm²)
6
Perimeter (cm)
12

The Pythagorean theorem is one of the oldest and most useful facts in mathematics: in any right triangle, the square of the longest side (the hypotenuse) equals the sum of the squares of the two shorter sides (the legs). Written as a² + b² = c², it lets you find a missing side the moment you know the other two — and this calculator does it instantly, while also solving both acute angles, the area, and the perimeter.

Whether you are a student checking homework, a carpenter laying out a square corner, or a designer sizing a diagonal brace, you only need to type two numbers. Enter leg a and leg b (the two sides that meet at the right angle), pick the length unit your legs are measured in (centimeters, meters, inches, or feet), and the result card updates in real time with c, the two interior angles, the area, and the full perimeter. All length and area outputs are reported in centimeters (cm) and square centimeters (cm²) so the same numbers are comparable regardless of the unit you measured in; angles are unitless degrees.

How to Use

  1. Enter Leg a — the first side that forms the right angle. In the classic diagram this sits vertically, but orientation does not matter; a and b are interchangeable.
  2. Enter Leg b — the second side perpendicular to leg a. Any non-negative number works, including decimals such as 2.5 or 0.75.
  3. Pick the Length Unit for a and b: centimeters (cm), meters (m), inches (in), or feet (ft). The engine converts both legs to centimeters internally using 1 m = 100 cm, 1 in = 2.54 cm, and 1 ft = 30.48 cm, then runs the theorem on the converted values.
  4. Read Hypotenuse c (cm), highlighted at the top of the result card. This is the straight-line distance between the two ends of the legs, opposite the right angle, reported in centimeters.
  5. Check Angle at A and Angle at B. These are the two acute angles in degrees; they always add up to 90°, so they are a quick sanity check on your inputs. Angles do not depend on the unit you picked.
  6. Review Area (cm²) and Perimeter (cm). The area equals half of a × b (in square centimeters), and the perimeter is a + b + c (in centimeters), useful for tiling, painting, or material estimates.
  7. To reverse a problem — for example, finding a leg when you know the hypotenuse and one leg — reorder the known sides or use the advanced right-triangle formulas explained below.

If you type a negative number, the calculator stops and asks for a non-negative value, because a side length cannot be negative in Euclidean geometry.

The Pythagorean Theorem Explained

For a right triangle with legs a and b and hypotenuse c, the theorem states:

a² + b² = c²

To solve for the hypotenuse you take the square root of both sides:

c = √(a² + b²)

A quick mental check: the hypotenuse is always longer than either leg, but never longer than the two legs added together. With a = 3 and b = 4, a² = 9 and b² = 16, so c² = 25 and c = 5 — the famous 3-4-5 triangle that masons still use to lay out a true 90° corner.

You can also rearrange the formula to find a missing leg:

  • a = √(c² − b²) when you know the hypotenuse and leg b.
  • b = √(c² − a²) when you know the hypotenuse and leg a.

Watch out for a common trap: the hypotenuse is not a + b. In the 3-4-5 triangle, the hypotenuse of 5 is about 25% shorter than the two legs combined (7), yet it is still about 66.7% longer than leg a itself. That gap — between adding lengths and squaring-then-square-rooting them — is exactly why the theorem feels unintuitive until you have used it a few times.

Solving the Two Acute Angles

Because every triangle's interior angles sum to 180° and the right angle is already 90°, the two remaining angles must sum to 90°. Using the legs you entered:

  • Angle at A (opposite leg a) = arctangent of (a ÷ b), written atan2(a, b).
  • Angle at B (opposite leg b) = arctangent of (b ÷ a), which is simply 90° minus angle A.

In the 3-4-5 example, angle A comes out to roughly 36.87° and angle B to 53.13°. If both legs are equal, as in a 10-10 right triangle, both angles are exactly 45° — the familiar isosceles right triangle. If one leg is 0, the triangle collapses into a straight line: angle A becomes 0° and angle B becomes 90°, which the calculator handles without an error.

Examples

Example 1 — A ladder against a wall. A ladder reaches 12 feet up a wall, and its base sits 5 feet from the wall. Treat the wall and the ground as the two legs (a = 12, b = 5). The ladder itself is the hypotenuse: c = √(12² + 5²) = √(144 + 25) = √169 = 13 feet. The angle the ladder makes with the ground is about 67.4°, and the angle with the wall is about 22.6°.

Example 2 — Diagonal of a rectangular screen. A monitor measures 16 inches wide and 9 inches tall. Its diagonal is c = √(16² + 9²) = √(256 + 81) = √337 ≈ 18.36 inches — which is exactly how TV and monitor sizes are advertised. The screen area is 72 in², and roughly 61.9% of the rectangle's bounding strip is covered by the diagonal measurement convention.

Example 3 — Large-scale surveying. Two property lines run 1,000 meters east and 1,000 meters north at a perfect right angle. The straight-line distance between the endpoints is c = √(1,000,000 + 1,000,000) = √2,000,000 ≈ 1,414.21 meters, with both angles a clean 45°. This is the value surveyors and GPS units rely on to convert grid coordinates into ground distance.

FAQ

What is the Pythagorean theorem in simple terms?

In a triangle with one 90° right angle, the square of the longest side (hypotenuse c) equals the sum of the squares of the two shorter sides (legs a and b): a² + b² = c². Enter a and b here and the calculator returns c = √(a² + b²) instantly.

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

Square each leg, add the results, and take the square root: c = √(a² + b²). For a = 6 and b = 8, c = √(36 + 64) = √100 = 10. The 6-8-10 triangle is just a scaled 3-4-5 triangle.

How do I find a missing leg when I know the hypotenuse?

Use the rearranged formulas: a = √(c² − b²) or b = √(c² − a²). For example, if c = 13 and b = 5, then a = √(169 − 25) = √144 = 12. Make sure c is the largest value before subtracting, or the result becomes imaginary.

Does this work for any triangle, or only right triangles?

Only right triangles. The theorem assumes one angle is exactly 90°. For non-right triangles you need the law of cosines, c² = a² + b² − 2ab·cos(C), where C is the angle between the known sides.

Why do the two angles always add up to 90°?

A triangle's interior angles sum to 180°, and a right triangle already spends 90° on the right angle. The two remaining acute angles must therefore share the other 90° between them. The calculator shows both angles so you can confirm they total 90°.

What if I enter a negative number?

A side length cannot be negative in standard geometry, so the calculator rejects negative legs and asks for a non-negative value. Zero is allowed: it describes a degenerate, flat triangle and still produces a valid hypotenuse equal to the other leg.

Can I use inches, feet, or meters interchangeably?

Yes. Pick the unit your legs are measured in from the Length Unit dropdown (cm, m, in, or ft) and the calculator converts both legs to centimeters internally — using 1 m = 100 cm, 1 in = 2.54 cm, and 1 ft = 30.48 cm — before applying a² + b² = c². All length outputs (hypotenuse, perimeter) and the area are then reported in centimeters and square centimeters. For example, entering a = 3 ft and b = 4 ft gives c = 152.4 cm (5 ft), area = 5,574.18 cm², and perimeter = 365.76 cm. Angles are unchanged by the unit choice.

Disclaimer

This Pythagorean theorem calculator is provided for informational purposes only and does not constitute engineering, surveying, or professional mathematical advice. Results are computed from the standard formula c = √(a² + b²) using the values you enter and are rounded for display. Always verify critical measurements — such as structural bracing, ladder safety angles, or property boundaries — with a qualified professional and appropriate tools before relying on them in construction or legal contexts.

Related Calculators

Disclaimer

Results are estimates for illustration only. Verify important figures independently.