Pythagorean theorem calculator

a² + b² = c². Enter any two sides of a right triangle to solve the missing side, then explore the area, perimeter, proof, and geometry behind the result.

⚑ Report error
Hypotenuse c
—
Longest side
Area
—
A = ab / 2
Perimeter
—
P = a + b + c

Right-triangle geometry

Live diagram from your side lengths
Live
Right angle at the cornera, b → c

Squared-side balance

The theorem in area form
Live
a² + b²= c²

Area as side a changes

Keeping side b fixed at the current value
Live
Area = ½abUpdates with every input
LIVE GEOMETRY CHECK

What the numbers are telling you

Updates live
Triangle typeRight triangleone angle is exactly 90°
Longest side—the hypotenuse c
Area share—square units
Theorem check—a² + b² compared with c²
Enter any two positive side lengths to see the theorem update in real time.

Calculated parts

3 values
PartSymbolValueFormula

Right triangle — any two sides

One leg of the right triangle
The other leg, perpendicular to a
Longest side, opposite 90°
Enter any two side lengths; the calculator solves the missing side.
THE CONCEPT

What is the Pythagorean theorem?

The Pythagorean theorem describes the relationship between the three sides of a right triangle. If a and b are the perpendicular legs and c is the hypotenuse, then the sum of the squares of the legs equals the square of the hypotenuse.

a² + b² = c²

The theorem only applies directly to right triangles. The hypotenuse is always the side opposite the 90° angle, and it is therefore the longest side. This distinction matters: if you put the wrong side in the role of c, the calculation will not represent the geometry correctly.

a²b²c²The area of the square on c equals the two squares on a and b
The geometric interpretation is powerful: the area of the square built on the hypotenuse equals the combined areas of the squares built on the two legs.
90°

Key idea: “Right triangle” is not optional here. A triangle with no 90° angle does not satisfy a² + b² = c² in this direct form. For general triangles, the law of cosines is the broader relationship.

THE FORMULAS

Pythagorean theorem formulas

The same equation can be rearranged depending on which side is missing. Keeping the algebra visible makes it easier to understand what the calculator is doing.

a² + b² = c²
a
first leg
b
second leg
c
hypotenuse, opposite 90°
c = √(a² + b²)Find the hypotenuse when both legs are known.
a = √(c² − b²)Find leg a when c and b are known.
b = √(c² − a²)Find leg b when c and a are known.
A = ab/2Area of a right triangle.
Unit rule: If side lengths are measured in cm, the area is in cm². If they are measured in m, the area is in m². Squaring a length also squares its unit.
WORKED EXAMPLES

Pythagorean theorem examples

Working through the algebra step by step is useful because it reveals why the calculator produces the number, not just what the number is.

Example 01 · 3–4–5

Find the hypotenuse

3² + 4² = c²
9 + 16 = 25
c = √25 = 5

The familiar 3–4–5 triangle is the smallest positive integer Pythagorean triple.

Example 02 · Missing leg

c = 13, a = 5 → find b

5² + b² = 13²
25 + b² = 169
b = √144 = 12

This gives the 5–12–13 Pythagorean triple.

Example 03 · Decimal

a = 7, b = 9 → find c

c = √(7² + 9²)
c = √150
c ≈ 12.247

Not every right triangle has integer side lengths; the theorem works equally well with decimals.

Example 04 · Area

a = 8, b = 15

A = ab/2 = (8 × 15)/2
A = 60 square units

The same two legs determine the area immediately once their product is known.

PATTERNS & TRIPLES

Pythagorean triples

A Pythagorean triple is a set of positive integers (a, b, c) that satisfies a² + b² = c². They are useful for recognizing exact right-triangle dimensions without a calculator.

TripleCheckMeaning
3, 4, 59 + 16 = 25Smallest positive integer triple
5, 12, 1325 + 144 = 169Common construction and geometry example
8, 15, 1764 + 225 = 289Another exact integer right triangle
7, 24, 2549 + 576 = 625Useful when a larger leg is involved

Multiplying every member of a triple by the same positive number creates another valid right triangle. For example, 3–4–5 scaled by 2 becomes 6–8–10.

GEOMETRY IN PRACTICE

Where the Pythagorean theorem is used

The theorem appears whenever two perpendicular distances form a right triangle and the straight-line distance is needed.

📐 Construction

A 3–4–5 triangle can establish a reliable right angle on a site. Longer scaled triples work the same way.

🪜 Ladders

A wall, ground distance, and ladder form a right triangle when the wall is vertical and the ground is level.

🖥️ Diagonals

The diagonal of a rectangle with side lengths a and b is √(a²+b²).

🗺️ Coordinate geometry

The distance formula is a direct application of the theorem to horizontal and vertical differences.

Δ

Coordinate connection: For two points (x₁,y₁) and (x₂,y₂), the distance is √[(x₂−x₁)² + (y₂−y₁)²]. The horizontal and vertical differences form the two legs of a right triangle.

FAQ

Pythagorean theorem FAQ

Does the Pythagorean theorem work for every triangle?

No. The direct equation a² + b² = c² applies to right triangles. For a general triangle, the law of cosines is the broader relationship.

Which side is the hypotenuse?

It is the side opposite the 90° angle, and it is always the longest side of a right triangle.

Can I enter the hypotenuse and one leg?

Yes. Enter c and either a or b. The calculator rearranges the equation and takes the square root of the remaining difference.

Why can’t the hypotenuse be shorter than a leg?

Because c² = a² + b², and both a² and b² are positive. Therefore c² is greater than either leg square, so c is greater than either leg.

What happens if c² − a² is negative?

Those values cannot form a real right triangle with a as a leg and c as the hypotenuse. The calculator flags the input instead of returning a non-real length.