Pythagorean Theorem Calculator

Pythagorean Theorem Calculator

Solve right triangle side lengths using a² + b² = c², hypotenuse, perimeter, and area.

Right Triangle Solution
Solved Side (c (hypotenuse))
5
Triangle Area
6
Perimeter
12

At a Glance

Category
Geometry
Best For
Students, builders, DIYers and anyone who needs the diagonal or hypotenuse of a right angle
Privacy
100% in your browser: nothing you enter is uploaded
Time Required
A few seconds
Cost
Free
Updated
November 2026

Quick Overview

What This Tool Does

Takes the two shorter sides (legs) of a right triangle and solves for the hypotenuse, the side opposite the right angle. It also reports the triangle's area and perimeter.

Who Should Use It

Geometry students, carpenters and tilers checking a square corner, designers working out screen or frame diagonals, and anyone solving a right-triangle problem.

When to Use It

When you know two perpendicular lengths and need the straight-line distance between their ends: a ladder against a wall, the diagonal of a rectangle, a ramp, a TV screen.

Why It Is Useful

It applies the theorem without manual squaring and square roots, and the area and perimeter come with the same entry.

Key Features & Capabilities

Hypotenuse from the legs

Solves c = √(a² + b²) instantly for any two positive leg lengths.

Area and perimeter included

Triangle area (½ × a × b) and perimeter (a + b + c) are shown together.

Works in any unit

Enter centimeters, inches, feet or meters; the results use the same unit.

Private

Calculated in your browser.

How to Use This Tool

1

Identify the legs

The legs are the two sides that meet at the right angle. The hypotenuse is the longest side, opposite it. Tip: If your triangle does not contain a right angle, use the law of cosines instead.

2

Enter both legs

Type the length of leg a and leg b, in the same unit. Tip: The order does not matter: a and b can be swapped.

3

Read the solution

The solved side c is the hypotenuse. The area and perimeter appear alongside it. Tip: The hypotenuse is always longer than either leg. If it is not, recheck your entries.

4

Apply it

Use c as the diagonal, slope length or straight-line distance in your project. Tip: For building work, add allowance for material thickness and cuts.

Worked Real-World Example

The 3-4-5 triangle

A carpenter marks 3 feet along one wall and 4 feet along the other from the corner and wants the diagonal that confirms the corner is square.

Sample Inputs
Leg a3 ft
Leg b4 ft
Hypotenusec = 5 (area 6, perimeter 12)
Calculation Breakdown
Square the legs: 3² + 4² = 9 + 16 = 25
Take the square root: √25 = c = 5 ft
Area: ½ × 3 × 4 = 6 sq ft
Perimeter: 3 + 4 + 5 = 12 ft
If the diagonal between the two marks measures exactly 5 feet, the corner is a true right angle. 3, 4, 5 is the best-known Pythagorean triple; another is 5, 12, 13, where the legs 5 and 12 give a hypotenuse of exactly 13.

How It Works (Math & Calculation Logic)

The hypotenuse is c = √(a² + b²). The area of a right triangle is half the product of the legs: ½ × a × b. The perimeter is a + b + c. Inputs must be positive numbers in the same unit.

Formula / Algorithma² + b² = c² c = √(a² + b²)
Variable & Logic Definitions
a, bLegs - The two sides that form the right angle (length)
cHypotenuse - The side opposite the right angle (length)

How to Interpret Your Results

Typical Benchmarks

The result is a length in the same unit as your inputs. A set of whole numbers that satisfies a² + b² = c² is called a Pythagorean triple, for example 3-4-5, 5-12-13 and 8-15-17.

Evaluating Your Output

A hypotenuse that equals or is shorter than one of the legs means an input is wrong. In construction, a diagonal that differs from the calculated value shows that the corner is not square.

Recommended Next Action

Measure carefully in a single unit, enter both legs, and compare the calculated diagonal with the one you measure. For long distances, small measuring errors grow, so measure to the same point each time.

Frequently Asked Questions

What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². It lets you find one side when you know the other two.
How do I find the hypotenuse?
Square both legs, add them, and take the square root. For legs 3 and 4: 9 + 16 = 25, and √25 = 5.
Does the theorem work for any triangle?
No, only for triangles with a 90-degree angle. For other triangles, use the law of cosines, which reduces to the Pythagorean theorem when the angle is 90 degrees.
What is a Pythagorean triple?
Three whole numbers a, b, c with a² + b² = c². The smallest is 3, 4, 5. Multiples such as 6, 8, 10 also work.
How do I use it to check a square corner?
Measure 3 units along one edge and 4 units along the other from the corner. If the distance between those two points is exactly 5 units, the corner is a right angle.

Complementary QuickForma Utilities