Pythagorean Theorem Calculator
Find the hypotenuse or a missing leg of a right triangle using a² + b² = c².
Step-by-step working
- c = √(a² + b²) = √(3² + 4²) = √25 = 5
Mathematical Formula
Overview & Explanation
In a right triangle the square of the hypotenuse equals the sum of the squares of the other two sides.
How It Works
- Square the known sides.
- Add (for c) or subtract (for a leg).
- Take the square root.
Practical Applications
- Construction layout (3-4-5 rule).
- Distance between points.
- Screen diagonal sizes.
The theorem
In any right-angled triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². To find the hypotenuse, c = √(a² + b²). To find a missing leg, a = √(c² − b²).
The theorem only applies to right triangles. For other triangles, the law of cosines c² = a² + b² − 2ab cos C is the general version; when C is 90°, the cosine term disappears and you get Pythagoras back.
Worked examples
A ladder reaching 4 m up a wall with its foot 3 m from the wall has length √(9 + 16) = 5 m. A 55-inch TV with a 16:9 screen: the diagonal is 55, and the sides are in ratio 16:9, so width = 55 × 16 ÷ √(16² + 9²) = 55 × 16 ÷ 18.36 ≈ 47.9 inches and height ≈ 27.0 inches.
Practical uses
Builders use the 3-4-5 rule to check that corners are square: mark 3 units along one wall and 4 along the other, and the diagonal should be exactly 5. The same idea gives straight-line distance on a flat grid, which is the basis of the distance formula in coordinate geometry.
Example 1: legs 3 and 4
The 3-4-5 triangle.
Inputs
Solve for: Hypotenuse c · Leg a: 3 · Leg b (when solving for c): 4
Step 1
c = √(a² + b²) = √(3² + 4²) = √25 = 5
Hypotenuse c
Result
Example 2: c = 13, a = 5
Missing leg.
Inputs
Solve for: Missing leg b · Leg a: 5 · Hypotenuse c (when solving for b): 13
Step 1
b = √(c² − a²) = √(13² − 5²) = √144 = 12
Missing leg b
Result
How it's calculated & sources
c = √(a² + b²); b = √(c² − a²).
Frequently Asked Questions
Does it work for any triangle?
What is a Pythagorean triple?
Units?
Related Calculators
Triangle Area Calculator (Heron’s Formula)
Calculate the area and perimeter of any triangle from its three sides using Heron’s formula.
Slope Calculator (Two Points)
Find the slope, line equation, distance and angle between two points.
Square Root Calculator
Calculate principal square roots sqrt(x) and nth roots of positive numbers.
Percentage Calculator
Calculate percentages, percentage change, and percentage of a number instantly.