Pythagorean Theorem Calculator

Your values

Solve for

Use the same unit for both sides. Decimals and fractions are kept exact.

Open the right triangle calculator for a labeled diagram

Result

Hypotenuse c

c=52=213≈7.211103c=\sqrt{52}=2\sqrt{13}\approx7.211103
Exact form
2√13
Angle α (opposite a)
33.6901°
Angle β (opposite b)
56.3099°
Area
12
Perimeter
17.21110255

Step by step

  1. Start from the Pythagorean theorem.
    c2=a2+b2c^2=a^2+b^2
  2. Substitute the known sides and work out the squares.
    c2=42+62=16+36=52c^2=4^2+6^2=16+36=52
  3. Take the square root and simplify the radical.
    c=52=213≈7.211103c=\sqrt{52}=2\sqrt{13}\approx7.211103

About this tool

The Pythagorean theorem says that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs. It lets you find any side from the other two, which is why it turns up in geometry homework, carpentry, navigation and screen-size calculations. This calculator solves for the hypotenuse or a leg and shows the substituted equation, the exact radical answer and its decimal value.

How it works

Choose which side to find: the hypotenuse c, the longest side opposite the right angle, or one of the legs a and b. Then enter the two sides you know, in the same unit.

For the hypotenuse the calculator adds the squares of the legs, c2=a2+b2c^2 = a^2 + b^2. For a leg it subtracts, for example b2=c2−a2b^2 = c^2 - a^2. It then takes the square root and, when the result is not a whole number, simplifies the radical by taking out square factors, so 50\sqrt{50} becomes 525\sqrt{2}. The decimal value, both acute angles, the area and the perimeter are shown as well.

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

Example

Legs of 4 and 6 give c2=42+62=16+36=52c^2 = 4^2 + 6^2 = 16 + 36 = 52. Since 52=4×1352 = 4 \times 13, the hypotenuse is c=52=213≈7.2111c = \sqrt{52} = 2\sqrt{13} \approx 7.2111.

To find a leg, a ladder 10 m long with its foot 4 m from the wall reaches a height of b=102−42=84=221≈9.165b = \sqrt{10^2 - 4^2} = \sqrt{84} = 2\sqrt{21} \approx 9.165 m.

Assumptions and limits

The theorem holds only for right triangles. Both sides must be positive and in the same unit, and the hypotenuse must be longer than each leg. The exact radical form is given when the squared result has a manageable size (up to about 101210^{12} after clearing fractions); otherwise only the decimal is shown. For angles from a side and an angle, use a trigonometry tool.

Frequently asked questions

How do you find the hypotenuse?

Square both legs, add them and take the square root: c=a2+b2c = \sqrt{a^2 + b^2}. Legs of 3 and 4 give c=25=5c = \sqrt{25} = 5.

How do you find a missing leg?

Subtract the square of the known leg from the square of the hypotenuse, then take the square root: a=c2−b2a = \sqrt{c^2 - b^2}. With c=13c = 13 and b=12b = 12, a=169−144=5a = \sqrt{169 - 144} = 5.

What is a Pythagorean triple?

Three whole numbers that fit the theorem exactly, such as 3, 4, 5; 5, 12, 13; 8, 15, 17 and 7, 24, 25. Any multiple of a triple, such as 6, 8, 10, is also a triple.

What does the simplified radical form mean?

It writes a square root with the largest possible whole number outside the root. Because 50=25×250 = 25 \times 2, 50=52\sqrt{50} = 5\sqrt{2}. Teachers often ask for this exact form instead of a rounded decimal.

Does the Pythagorean theorem work for other triangles?

No. For a triangle without a right angle use the law of cosines, c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C, which reduces to the Pythagorean theorem when C is 90 degrees.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
solve_forwhat to calculate: hypotenuse, leg_a, leg_b; give the other 2 valuesdefault hypotenuse
leg_aLeg afraction or decimal: 3/4, 1 1/2 or 0.75give 2 of leg_a, leg_b, hypotenuse
leg_bLeg bfraction or decimal: 3/4, 1 1/2 or 0.75give 2 of leg_a, leg_b, hypotenuse
hypotenuseHypotenuse cfraction or decimal: 3/4, 1 1/2 or 0.75give 2 of leg_a, leg_b, hypotenuse

Examples

  • ?leg_a=5&leg_b=12
  • ?leg_a=8&hypotenuse=17
  • ?solve_for=leg_a&leg_b=1.5&hypotenuse=2.5

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="pythagorean_theorem_calculator"]