Pythagorean Theorem Calculator
Find a missing side of a right triangle.
Free online tool by SOCE. Check inputs and results before using them for important decisions.
Pythagorean Theorem Calculator – Find the Hypotenuse or Missing Side
The SOCE Pythagorean Theorem Calculator page provides a mathematical guide to finding unknown side lengths in right triangles using the Pythagorean theorem. This fundamental geometry relationship connects the lengths of the two perpendicular sides and the hypotenuse of a right triangle.
The Pythagorean theorem is expressed as:
a² + b² = c²
Where a and b are the two legs of a right triangle, and c is the hypotenuse, the side opposite the right angle.
The theorem is widely used in mathematics, civil engineering, architecture, surveying, construction, coordinate geometry, and computer-aided design.
This Pythagorean Theorem Calculator guide explains the formulas, step-by-step examples, inverse calculations, common mistakes, and practical applications.
What Is a Pythagorean Theorem Calculator?
A Pythagorean Theorem Calculator is a mathematical tool used to find an unknown side of a right triangle when the other two side lengths are known.
The three possible calculations are:
- Finding the hypotenuse from two perpendicular legs.
- Finding one perpendicular leg from the hypotenuse and the other leg.
- Checking whether three positive side lengths satisfy the Pythagorean relationship.
For example, consider a right triangle with legs of 3 cm and 4 cm.
Using:
c² = a² + b²
c² = 3² + 4²
c² = 9 + 16 = 25
Therefore:
c = 5 cm
This is the familiar 3–4–5 right triangle.
Understanding the Pythagorean Theorem
The Pythagorean theorem states:
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs.
Mathematically:
a² + b² = c²
What Is a Right Triangle?
A right triangle contains exactly one 90-degree interior angle.
The two sides forming that angle are called the legs.
The side opposite the right angle is called the hypotenuse.
What Is the Hypotenuse?
The hypotenuse is the longest side of a non-degenerate right triangle.
It is always opposite the 90-degree angle.
What Are the Legs?
The legs are the two sides that meet at the right angle.
They are represented by a and b.
When Does the Theorem Apply?
The Pythagorean theorem applies to right triangles.
It must not be used directly for a non-right triangle unless an appropriate perpendicular construction creates right triangles.
For general triangles, the law of cosines may be appropriate.
Pythagorean Theorem Calculator Formulas
| Calculation | Formula |
|---|---|
| Find hypotenuse | c = √(a² + b²) |
| Find leg a | a = √(c² − b²) |
| Find leg b | b = √(c² − a²) |
| Check right triangle | a² + b² = c² |
| Right triangle area | A = ab/2 |
| Right triangle perimeter | P = a + b + c |
| Rectangle diagonal | d = √(l² + w²) |
| Cuboid space diagonal | D = √(l² + w² + h²) |
Where:
a = first perpendicular leg.
b = second perpendicular leg.
c = hypotenuse.
l = rectangle length.
w = rectangle width.
h = cuboid height.
All dimensions must use compatible length units.
How to Use the Pythagorean Theorem
The general calculation procedure is:
- Confirm that the triangle has a right angle.
- Identify the two legs and the hypotenuse.
- Determine which side is unknown.
- Select the appropriate formula.
- Substitute the known side lengths.
- Square the required values.
- Add or subtract the squared values as appropriate.
- Take the positive square root.
- Express the answer in the correct length unit.
For example:
Leg a = 6 cm
Leg b = 8 cm
Hypotenuse:
c = √(6² + 8²)
c = √100
Answer = 10 cm
Hypotenuse Calculator
The hypotenuse is calculated from the two perpendicular legs.
Hypotenuse Formula
c = √(a² + b²)
Worked Example 1
a = 5 cm
b = 12 cm
c = √(5² + 12²)
c = √(25 + 144)
c = √169
Answer = 13 cm
Worked Example 2
a = 7 m
b = 9 m
c = √(7² + 9²)
c = √130
Answer ≈ 11.40 m
Why Is the Hypotenuse Longer?
Since a and b are positive:
a² + b² > a²
Therefore:
c² > a²
Hence:
c > a
Similarly:
c > b
The hypotenuse is longer than either leg.
Missing Side Calculator – Find Leg a
If the hypotenuse and one leg are known, the other leg can be calculated.
Starting with:
a² + b² = c²
Rearranging:
a² = c² − b²
Therefore:
a = √(c² − b²)
Worked Example
Hypotenuse = 13 cm
Leg b = 5 cm
a = √(13² − 5²)
a = √(169 − 25)
a = √144
Answer = 12 cm
For a non-degenerate right triangle, the hypotenuse must be longer than either leg.
Missing Side Calculator – Find Leg b
If the hypotenuse and leg a are known:
b = √(c² − a²)
Worked Example
Hypotenuse = 10 cm
Leg a = 8 cm
b = √(10² − 8²)
b = √(100 − 64)
b = √36
Answer = 6 cm
Pythagorean Theorem Calculator with Steps
Consider a right triangle with:
a = 9 cm
b = 12 cm
Unknown hypotenuse c.
Step 1: Write the Formula
c² = a² + b²
Step 2: Substitute Values
c² = 9² + 12²
Step 3: Square the Values
c² = 81 + 144
Step 4: Add
c² = 225
Step 5: Take the Square Root
c = √225
Final Answer
c = 15 cm
Verification
9² + 12² = 15²
81 + 144 = 225
225 = 225
The result satisfies the Pythagorean theorem.
Pythagorean Triples
A Pythagorean triple is a set of three positive integers satisfying:
a² + b² = c²
Examples include:
| Leg a | Leg b | Hypotenuse c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 6 | 8 | 10 |
| 7 | 24 | 25 |
| 8 | 15 | 17 |
| 9 | 12 | 15 |
| 20 | 21 | 29 |
Some triples are scaled versions of smaller triples.
For example:
3–4–5 multiplied by 2 gives 6–8–10.
Generating Pythagorean Triples
For positive integers m and n with m > n:
a = m² − n²
b = 2mn
c = m² + n²
These values satisfy the Pythagorean equation.
Example
m = 2
n = 1
a = 4 − 1 = 3
b = 2 × 2 × 1 = 4
c = 4 + 1 = 5
Therefore:
3–4–5
How to Check Whether a Triangle Is Right-Angled
If all three side lengths are known, arrange them so that c is the longest side.
Then check:
a² + b² = c²
Example 1
Side lengths:
6 cm, 8 cm, 10 cm
Check:
6² + 8² = 36 + 64 = 100
10² = 100
Therefore, the triangle is right-angled.
Example 2
Side lengths:
5 cm, 6 cm, 8 cm
Check:
5² + 6² = 25 + 36 = 61
8² = 64
Since 61 ≠ 64, these side lengths do not form a right triangle.
When using measured decimal values, account for measurement uncertainty and numerical tolerance rather than requiring exact equality.
Pythagorean Theorem and Rectangle Diagonals
A rectangle diagonal divides the rectangle into two right triangles.
Let:
l = rectangle length.
w = rectangle width.
The diagonal is:
d = √(l² + w²)
Worked Example
Length = 12 m
Width = 9 m
Diagonal:
d = √(12² + 9²)
d = √225
Answer = 15 m
This relationship is useful in geometric layout and construction setting-out.
Pythagorean Theorem and Square Diagonals
For a square with side length a:
d² = a² + a²
Therefore:
d = a√2
Worked Example
Square side = 10 cm
d = 10√2
Answer ≈ 14.14 cm
Finding Square Side from Diagonal
a = d/√2
Pythagorean Theorem in Three Dimensions
The Pythagorean relationship can be applied successively to calculate the space diagonal of a cuboid.
Let:
l = length.
w = width.
h = height.
First calculate the base diagonal:
d² = l² + w²
Then calculate the space diagonal:
D² = d² + h²
Therefore:
D = √(l² + w² + h²)
Worked Example
Length = 3 cm
Width = 4 cm
Height = 12 cm
D = √(3² + 4² + 12²)
D = √169
Answer = 13 cm
Pythagorean Theorem in Coordinate Geometry
The distance between two points in a Cartesian coordinate plane follows from the Pythagorean theorem.
For points:
P₁ = (x₁, y₁)
P₂ = (x₂, y₂)
The distance is:
d = √[(x₂ − x₁)² + (y₂ − y₁)²]
Worked Example
P₁ = (2, 3)
P₂ = (8, 11)
Horizontal difference:
Δx = 8 − 2 = 6
Vertical difference:
Δy = 11 − 3 = 8
Distance:
d = √(6² + 8²)
Answer = 10 units
Three-Dimensional Distance
For points in three-dimensional Cartesian coordinates:
D = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²]
This formula is useful in CAD, computational geometry, and engineering modelling.
Pythagorean Theorem vs Trigonometry
The Pythagorean theorem relates the three side lengths of a right triangle.
Trigonometric ratios relate side lengths to angles.
For a right triangle:
sin θ = opposite/hypotenuse
cos θ = adjacent/hypotenuse
tan θ = opposite/adjacent
The Pythagorean theorem is particularly useful when two side lengths are known.
Trigonometry is useful when side lengths and acute angles are involved.
Both methods are important in engineering and geometry.
Pythagorean Theorem Calculator for Civil Engineering
The Pythagorean theorem is widely used in civil engineering, architecture, surveying, and construction.
Rectangular Building Layout
For a rectangular building footprint:
Length = 12 m
Width = 9 m
Expected diagonal:
d = √(12² + 9²)
Answer = 15 m
Comparing measured diagonals with theoretical dimensions can help verify layout geometry.
Equal diagonals alone do not prove that an arbitrary quadrilateral is rectangular. Additional geometric conditions are required.
Structural Bracing
For an ideal rectangular frame:
Horizontal span = L
Vertical height = H
Diagonal brace centreline length:
d = √(L² + H²)
Worked Example
Frame span = 6 m
Frame height = 4 m
Diagonal:
d = √(6² + 4²)
Answer ≈ 7.21 m
Actual fabrication length depends on connection detailing and geometric offsets.
Stair Geometry
For a straight stair segment represented by a right triangle:
Horizontal run = R
Vertical rise = H
Inclined geometric length:
L = √(R² + H²)
This gives the straight-line sloping distance between the specified endpoints.
Roof Geometry
For an ideal straight roof slope:
Horizontal run = R
Vertical rise = H
Slope length:
L = √(R² + H²)
Surveying and Coordinate Measurements
The theorem supports distance calculations in Cartesian coordinate systems.
Actual ground-distance calculations may require consideration of projection, elevation, and surveying conventions.
CAD and Structural Modelling
The Pythagorean theorem is fundamental to coordinate distance calculations, geometry validation, and three-dimensional modelling.
Pythagorean Theorem Unit Conversion
Side lengths are linear measurements.
Common units include:
- Millimetres (mm).
- Centimetres (cm).
- Metres (m).
- Inches (in).
- Feet (ft).
Important Conversion Factors
1 m = 100 cm
1 cm = 10 mm
1 in = 2.54 cm exactly
1 ft = 12 in exactly
1 ft = 0.3048 m exactly
Worked Example
Leg a = 300 cm
Leg b = 4 m
First convert:
300 cm = 3 m
Then calculate:
c = √(3² + 4²)
Answer = 5 m
All input lengths must use compatible units.
Common Mistakes in Pythagorean Theorem Calculations
- Applying the theorem to a triangle that is not right-angled.
- Misidentifying the hypotenuse.
- Adding side lengths instead of their squares.
- Forgetting to take the square root.
- Adding squared values when finding a missing leg instead of subtracting.
- Using a hypotenuse shorter than a known leg.
- Mixing incompatible length units.
- Confusing diagonal length with perimeter.
- Using a two-dimensional distance formula for a three-dimensional problem.
- Ignoring measurement uncertainty in practical calculations.
- Rounding intermediate values too early.
- Treating geometric brace length as fabrication length without connection detailing.
Frequently Asked Questions About Pythagorean Theorem Calculator
1. What is a Pythagorean Theorem Calculator?
A Pythagorean Theorem Calculator is a mathematical tool used to find an unknown side length of a right triangle when the other two sides are known.
2. What is the Pythagorean theorem formula?
a² + b² = c².
3. How do you calculate the hypotenuse?
Use c = √(a² + b²).
4. How do you calculate a missing leg?
Use a = √(c² − b²) or b = √(c² − a²).
5. What is the hypotenuse?
The hypotenuse is the side opposite the right angle and is the longest side of a right triangle.
6. Does the Pythagorean theorem work for all triangles?
No. It applies directly to right triangles.
7. What is a 3–4–5 triangle?
It is a right triangle with side lengths proportional to 3, 4, and 5.
8. How do you check whether a triangle is right-angled?
Identify the longest side c and verify whether a² + b² = c².
9. What is the diagonal formula for a rectangle?
d = √(l² + w²).
10. What is the diagonal formula for a square?
d = a√2.
11. What is the space diagonal formula for a cuboid?
D = √(l² + w² + h²).
12. Can the theorem calculate distances between two points?
Yes. The Cartesian distance formula is derived from the Pythagorean theorem.
13. Can the Pythagorean theorem be used in construction?
Yes. It is useful for rectangular layout, diagonal measurement, structural bracing, and geometric verification.
14. What units should be used?
Any consistent length unit, such as mm, cm, m, in, or ft.
15. Why must the hypotenuse be the longest side?
The hypotenuse is opposite the largest angle, which is 90 degrees, and its squared length equals the sum of two positive squared leg lengths.
16. What is the difference between the Pythagorean theorem and trigonometry?
The Pythagorean theorem relates side lengths in a right triangle, while trigonometric ratios relate side lengths and angles.
Learn the Pythagorean Theorem with SOCE
The SOCE Pythagorean Theorem Calculator page provides a mathematical reference for understanding right triangle geometry, hypotenuse calculations, missing side formulas, and practical applications.
Use this Pythagorean Theorem Calculator guide to study right triangles, diagonal measurements, Pythagorean triples, coordinate geometry, and engineering calculations.
Explore additional mathematics and engineering resources through the SOCE Geometry Calculators collection.