1. What Is the Pythagorean Theorem?
The Pythagorean theorem is one of the fundamental results of Euclidean geometry. It describes the relationship between the three side lengths of a right triangle.
For a right triangle, the two sides that meet at the 90° angle are called the legs, while the side opposite the 90° angle is the hypotenuse. The hypotenuse is always the longest side.
where:
- a = length of one leg
- b = length of the other leg
- c = length of the hypotenuse
Because the theorem relates the three side lengths algebraically, knowing any two appropriate side lengths is enough to determine the third.
3² + 4² = c²
9 + 16 = c²
25 = c²
c = √25 = 5
So the missing hypotenuse is 5. This is the classic 3-4-5 right triangle and is one of the most useful Pythagorean triples.
2. How to Use This Pythagorean Theorem Calculator
The main solver is designed for the most common right-triangle calculation: finding one missing side when two side lengths are known.
Enter any two valid side lengths.
To find the hypotenuse: c = √(a² + b²)
To find leg a: a = √(c² − b²)
To find leg b: b = √(c² − a²)
The calculator then reports the solved side and additional right-triangle measurements when they can be determined.
For a right triangle with legs a and b, the area is: A = ½ab.
The perimeter is: P = a + b + c.
The altitude from the right angle to the hypotenuse can be calculated from the relationship: h_c = ab/c.
The result is displayed numerically and, when appropriate, in exact radical form.
3. When Can You Use the Pythagorean Theorem?
The Pythagorean theorem is specifically a right-triangle theorem. That means the triangle must contain a 90° angle. It should not be applied directly to an arbitrary acute or obtuse triangle simply because three side lengths are available.
For a valid right triangle:
a > 0, b > 0, c > 0
a² + b² = c²
The hypotenuse must also be the longest side. For example: 5² + 12² = 13² (25 + 144 = 169), so 5-12-13 forms a valid right triangle.
By contrast, the side lengths 3, 4, and 6 do not form a right triangle because:
3² + 4² = 25
but 6² = 36
Since 25 ≠ 36, those three values cannot satisfy the Pythagorean theorem.
4. Solve for the Missing Hypotenuse
When both legs are known, the hypotenuse is found by taking the square root of the sum of the squared legs:
Example:
a = 6, b = 8
c = √(6² + 8²)
c = √(36 + 64)
c = √100
c = 10
Therefore, a right triangle with legs 6 and 8 has a hypotenuse of 10. The calculator also identifies whether the resulting integer sides form a familiar Pythagorean triple.
5. Solve for a Missing Leg
When the hypotenuse and one leg are known, rearrange the theorem instead of adding the squared values.
To find a: a = √(c² − b²)
To find b: b = √(c² − a²)
Example:
c = 13, b = 12
a = √(13² − 12²)
a = √(169 − 144)
a = √25
a = 5
So the three sides are 5, 12, and 13. A common mistake is subtracting the wrong squared quantity. The hypotenuse must appear in the positive c² term, because the theorem is a² + b² = c².
6. Exact Radical Results vs Decimal Results
Not every right-triangle calculation produces an integer answer. For example: a = 1, b = 1.
c = √(1² + 1²)
c = √2
Decimal approximation: c ≈ 1.4142
The exact answer is √2, while its decimal approximation is approximately 1.4142. Exact radical form is mathematically valuable because it preserves the exact result rather than replacing it with a rounded decimal. Use the calculator's precision controls when you need a shorter decimal presentation, while retaining the exact radical where supported.
7. Right Triangle Side + Acute Angle Solver
When one side and an acute angle are known, trigonometric ratios can determine the remaining sides. This calculator uses the following explicit convention:
- Leg a = opposite the selected acute angle θ
- Leg b = adjacent to θ
- Hypotenuse c = opposite the 90° angle
sin(θ) = a/c
cos(θ) = b/c
tan(θ) = a/b
For example, if c = 10, θ = 30°:
a = c × sin(30°) = 10 × 0.5 = 5
b = c × cos(30°) ≈ 10 × 0.866025 ≈ 8.66025
The result should always be checked against the Pythagorean theorem: 5² + 8.66025² ≈ 10². The two acute angles in a right triangle also add to 90°.
8. Pythagorean Theorem and Trigonometry
The Pythagorean theorem and right-triangle trigonometry complement one another. The theorem uses side lengths: a² + b² = c². Trigonometry connects angles and side ratios:
sin θ = opposite / hypotenuse
cos θ = adjacent / hypotenuse
tan θ = opposite / adjacent
This means a right triangle can often be solved from combinations of side and angle information. For example, if the hypotenuse and one acute angle are known, sine and cosine provide the missing legs. Once the legs are known, the Pythagorean theorem provides an independent mathematical check. This cross-checking is particularly useful in engineering, surveying, geometry, physics, navigation, and technical drawing.
9. Pythagorean Triples
A Pythagorean triple is a set of positive integers satisfying a² + b² = c². Common examples include:
3, 4, 5
5, 12, 13
8, 15, 17 (8² + 15² = 64 + 225 = 289 = 17²)
7, 24, 25
These triples are useful because they produce exact integer side lengths without requiring square-root approximations. The calculator includes a Pythagorean triple generator based on Euclid's parameterization:
a = m² − n²
b = 2mn
c = m² + n²
with: m > n > 0
For suitable integer values of m and n, this generates Pythagorean triples. For example, m = 2, n = 1 gives a = 2² - 1² = 3, b = 2(2)(1) = 4, c = 2² + 1² = 5, resulting in (3, 4, 5).
10. 3D Pythagorean Distance
The same idea extends naturally from two dimensions to three dimensions. For coordinate differences x, y, z, the Euclidean distance from one point to another is:
For example, x = 3, y = 4, z = 12:
First calculate the 2D base distance: d₂ = √(3² + 4²) = √25 = 5
Then: d = √(5² + 12²) = √(25 + 144) = √169 = 13
This makes the 3D solver useful for coordinate geometry, spatial measurements, computer graphics, navigation, and other applications involving Cartesian distance.
11. Area, Perimeter and Altitude of a Right Triangle
Once the three side lengths are known, several additional geometric quantities become available.
A = ½ab
For 3-4-5: A = ½(3)(4) = 6 square units.
P = a + b + c
For 3-4-5: P = 3 + 4 + 5 = 12 units.
h = ab/c
For 3-4-5: h = (3 × 4)/5 = 2.4 units.
These calculations turn a simple missing-side solver into a more complete right-triangle geometry tool.
12. How to Check Whether a Triangle Is Right-Angled
The converse of the Pythagorean theorem provides a useful test. Given three positive side lengths, identify the longest side as c. Then calculate a² + b² and compare it with c². If a² + b² = c², the triangle is right-angled.
Example: a = 7, b = 24, c = 25:
7² + 24² = 49 + 576 = 625
25² = 625
Therefore, 7-24-25 is a right triangle.
This is also why the calculator validates side relationships instead of treating every set of three numbers as a valid right triangle.
13. Common Pythagorean Theorem Mistakes
14. Practical Applications of the Pythagorean Theorem
The Pythagorean theorem is used far beyond classroom exercises:
Builders use right-triangle relationships to check whether corners, frames, foundations, and layouts are square. The 3-4-5 relationship is especially useful because multiplying all three values by the same factor preserves the right angle (e.g. 6-8-10, 9-12-15).
Engineers and surveyors resolve distances, vertical/horizontal offsets, dimensions, and topography coordinates using right-triangle geometry.
Straight-line distance between locations represented by coordinate differences is calculated using Euclidean distance norms.
Vector magnitudes are computed via |v| = √(x² + y² + z²), and orthogonal force components are synthesized in mechanics.
15. Pythagorean Theorem with Units
The side lengths of a triangle must use compatible units before applying the theorem. For example, suppose a = 3 m and b = 400 cm. The second measurement must first be converted:
400 cm = 4 m
c = √(3² + 4²) = 5 m
The calculator includes a length-unit conversion tool so that measurements can be expressed consistently before further geometric calculations. Common conversions include:
1 m = 100 cm
1 m = 1000 mm
1 m ≈ 3.28084 ft
1 m ≈ 39.3701 in
1 m ≈ 1.09361 yd
16. Worked Examples
Given: a = 9, b = 12
c = √(9² + 12²) = √(81 + 144) = √225 = 15
Answer: c = 15
Given: b = 8, c = 17
a = √(17² − 8²) = √(289 − 64) = √225 = 15
Answer: a = 15
Given: a = 2, b = 3
c = √(2² + 3²) = √13 ≈ 3.6055
Answer: The exact answer is √13.
Given: c = 10, θ = 60°
If a is opposite θ: a = 10 × sin(60°) ≈ 8.6603
If b is adjacent: b = 10 × cos(60°) = 5
Check: 8.6603² + 5² ≈ 100
Answer: Therefore the calculations are consistent.
Given coordinate differences: x = 6, y = 8, z = 10
First: d₂ = √(6² + 8²) = 10
Then: d = √(10² + 10²) = √200 = 10√2 ≈ 14.1421
Answer: d ≈ 14.1421
17. Pythagorean Theorem vs. Other Triangle Methods
Use the Pythagorean theorem when:
- the triangle is right-angled
- two side lengths are known
- you need the third side
Use trigonometric ratios when:
- one acute angle and one side are known
- you need an unknown side
- you need an angle from side ratios
For non-right triangles, the Law of Sines or Law of Cosines may be more appropriate.
For broader triangle calculations, see the Triangle Calculator, and for coordinate-based measurements, use the Distance Calculator.
For right-triangle-specific calculations, this Pythagorean Theorem Calculator is designed to keep the side relationships, derived metrics, and validation in one place.
19. Quick Reference Formula Sheet
a² + b² = c²
c = √(a² + b²)
a = √(c² − b²)
b = √(c² − a²)
A = ½ab
P = a + b + c
h_c = ab/c
sin θ = a/c | cos θ = b/c | tan θ = a/b
d = √(x² + y² + z²)
a = m² − n², b = 2mn, c = m² + n²
20. Final Summary
The Pythagorean theorem provides a direct relationship between the side lengths of a right triangle: a² + b² = c².
From that single relationship, you can solve for a missing hypotenuse or leg, verify whether side lengths form a right triangle, and calculate other measurements such as area, perimeter, and altitude.
This calculator extends those core ideas with a side-and-angle right-triangle solver, exact and decimal results, 3D Euclidean distance, Euclid's Pythagorean triple generator, and length-unit conversion.
The most important rule to remember is simple: if the triangle is right-angled, identify the two legs and the hypotenuse correctly before applying the formula.
For broader geometry work, use the Triangle Calculator and Area Calculator. For coordinate-based measurements, use the Distance Calculator.
The Pythagorean Theorem Calculator is designed to make those calculations faster while still showing the underlying mathematical relationships so you can verify the result rather than treating the answer as a black box.
Trust & Mathematical Sources
Mathematical definitions and core relationships were checked against established educational references including OpenStax's treatments of the Pythagorean theorem and right-triangle trigonometry.
- OpenStax, Prealgebra — Use Properties of Angles, Triangles, and the Pythagorean Theorem.
- OpenStax, Contemporary Mathematics — Right Triangle Trigonometry.
All calculations run locally within your browser using IEEE 754 double-precision floating-point arithmetic with rational radical reduction, verified against independent mathematical reference models.