Pythagorean Theorem Calculator

Updated July 2026

Enter any two sides of a right triangle and this tool solves the Pythagorean theorem for the third side, then works out the area, perimeter and both acute angles. Everything runs privately in your browser.

The Pythagorean theorem says a² + b² = c², where a and b are the legs and c is the hypotenuse. Enter any two sides to find the third, plus the area, perimeter and angles. For example, legs 3 and 4 give a hypotenuse of 5.
Fill in any two of the three boxes — the third is calculated. The hypotenuse must be the longest side.
Enter any two sides
Angle A (opposite a)
Angle B (opposite b)
Right angle
90°
Area
Perimeter
Hypotenuse

How this Pythagorean theorem calculator works

A right triangle has one 90° angle. The two sides that meet at that corner are the legs, written a and b, and the longest side — the one opposite the right angle — is the hypotenuse, written c. The Pythagorean theorem ties them together: a² + b² = c².

Because you have one equation in three sides, knowing any two sides fixes the third. If you enter both legs, the tool computes the hypotenuse as c = √(a² + b²). If you enter a leg and the hypotenuse, it rearranges the formula to find the missing leg as a = √(c² − b²) — and checks that the hypotenuse really is longer than the known leg, since otherwise no such triangle exists.

Once all three sides are known, the rest follows. The two acute angles come from trigonometry: the angle opposite leg a is atan(a / b) (equivalently asin(a / c)), and the two acute angles always sum to 90°. The legs are perpendicular, so they double as base and height, giving an area of ½ · a · b, and the perimeter is a + b + c.

Worked example: enter legs a = 3 and b = 4. The hypotenuse is √(3² + 4²) = √(9 + 16) = √25 = 5. Angle A = atan(3 / 4) ≈ 36.87°, angle B = atan(4 / 3) ≈ 53.13° (they add to 90°). The area is ½ · 3 · 4 = 6 and the perimeter is 3 + 4 + 5 = 12.

Some side lengths come out as whole numbers on all three sides. These are called Pythagorean triples, and they are handy for laying out or checking right angles without a protractor.

Triple (a-b-c)Leg aLeg bHypotenuse cCheck a² + b²
3-4-53459 + 16 = 25
5-12-135121325 + 144 = 169
8-15-178151764 + 225 = 289
7-24-257242549 + 576 = 625

Reference note: angles are shown in degrees and rounded for display. The Pythagorean theorem and these formulas apply only to right triangles — triangles with a 90° angle.

Frequently asked questions

What is the Pythagorean theorem?
It states that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c², where c is the side opposite the right angle and a and b are the two legs that meet at the right angle.
How do I find the hypotenuse?
When you know both legs, the hypotenuse is the square root of the sum of their squares: c = √(a² + b²). For example, legs of 3 and 4 give a hypotenuse of √25 = 5.
How do I find a leg?
If you know one leg and the hypotenuse, rearrange the formula: a = √(c² − b²). The hypotenuse c must be longer than the known leg, otherwise no right triangle exists.
What is a Pythagorean triple?
A set of three whole numbers a, b and c that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. They form right triangles with all-integer sides and are handy for checking right angles.
Does it only work for right triangles?
Yes. The theorem a² + b² = c² holds only for right triangles — those containing a 90° angle. For other triangles you need the law of cosines instead.
How do I find the angles?
One angle is always 90°. For the acute angle opposite leg a, use atan(a / b) or asin(a / c). The two acute angles always add up to 90°.
⚡ Pythagorean Theorem Calculator — by larely ↗

Related tools

Distance Formula Calculator

Find the distance between two points, plus the midpoint and slope.

Final Grade Calculator

Find the grade you need on the final, plus weighted-grade and GPA calculators.

Percentage Calculator

Percent of a number, percent change, and percentage increase or decrease.

Statistics Calculator

Mean, median, mode, range and standard deviation from a list of numbers.

Fraction Calculator

Add, subtract, multiply and divide fractions, with simplification.

Quadratic Equation Solver

Solve ax²+bx+c=0 with roots, discriminant, vertex and steps.

Area Calculator

Calculate the area of rectangles, circles, triangles and more.

Right Triangle Calculator

Pythagorean theorem solver: find sides, angles, area and perimeter.

Ratio Calculator

Solve proportions, simplify ratios and scale them up or down.

GPA Calculator

Calculate your weighted GPA on the 4.0 scale from your courses and credit hours.

Resistor Color Code Calculator

Decode 4- and 5-band resistor color codes into resistance and tolerance.

Dilution Calculator

Solve C1V1 = C2V2 for stock dilutions and the solvent volume to add.

Browse all 251 free tools →