Last updated: July 31, 2026
Is it a Right Triangle Calculator
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Formula
Sort sides, verify a + b > c, then compare c² with a² + b²
Where:
- a=Smaller side after sorting(units)
- b=Middle side after sorting(units)
- c=Largest side after sorting(units)
- a^2+b^2=Sum of squares of the smaller sides(square units)
- c^2=Square of the largest side(square units)
Worked Examples
Classic 3-4-5 triangle
The Pythagorean theorem matches exactly.
- 1Sort the sides so the largest side is 5.
- 2Compare 5² = 25 with 3² + 4² = 25.
- 3Because the values match, the triangle is right.
Equilateral triangle check
Equal sides create an acute triangle, not a right triangle.
- 1All sides are equal, so the largest side is still 1.
- 2Compare 1² = 1 with 1² + 1² = 2.
- 3Because 1 is less than 2, the triangle is acute.
Obtuse triangle example
A long third side pushes the largest square above the other two combined.
- 1Sort the sides: 5, 5, 8.
- 2Compare 8² = 64 with 5² + 5² = 50.
- 3Because 64 is greater than 50, the triangle is obtuse.
Invalid triangle inequality
Some side sets cannot form any triangle at all.
- 1Sort the sides: 2, 3, 5.
- 2Check the triangle inequality: 2 + 3 = 5.
- 3Because the sum is not strictly greater, the inputs are invalid.
Introduction
The Is it a Right Triangle Calculator tests three side lengths and classifies the triangle as right, acute, or obtuse. It first checks the triangle inequality so impossible side combinations are rejected before any classification is attempted. Then it compares the largest side squared to the sum of the squares of the other two sides using the Pythagorean relationship.
Why triangle validity is checked first
A side set must form a real triangle before it can be classified by angle type.
Sort the sides from smallest to largest.
Check whether a + b > c.
If the sum is equal to or less than c, no triangle exists.
Positive side lengths are also required.
This avoids misleading right-triangle results.
How classification works
After sorting, the calculator compares c² with a² + b².
If c² equals a² + b², the triangle is right.
If c² is greater, the triangle is obtuse.
If c² is smaller, the triangle is acute.
A tiny tolerance handles rounding noise.
The largest side is always treated as c.
What makes a right triangle
A right triangle has one 90-degree angle, which is captured numerically by the Pythagorean theorem.
3-4-5 is the classic example.
5-12-13 is another exact right triangle.
Right triangles are common in construction and trigonometry.
The longest side is the hypotenuse.
Exact equality is tested with a small numerical tolerance.
How acute and obtuse cases differ
Triangles that are not right can still be classified by comparing the same squared lengths.
Acute triangles satisfy c² < a² + b².
Obtuse triangles satisfy c² > a² + b².
Equilateral triangles are always acute.
A longer largest side tends to push the triangle toward obtuse.
The classification depends only on side lengths, not angle input.
What each output means
The calculator reports both the classification and the numeric comparison values used to justify it.
triangleType gives the final label.
largestSide shows which side was treated as c.
sumOfSquares reports a² + b².
largestSquare reports c².
description explains the comparison in one sentence.
Practical uses
Side-based classification is useful in geometry, drafting, and quick field checks.
Checking layout triangles in carpentry.
Reviewing geometry homework.
Verifying Pythagorean triples.
Classifying triangles in coding exercises.
Cross-checking survey or CAD measurements.
Common mistakes to avoid
Users often skip sorting or forget that invalid side sets should not be classified at all.
Comparing the wrong side as c.
Ignoring the triangle inequality.
Assuming every nearly-right set is exactly right.
Using zero or negative side lengths.
Confusing side classification with angle classification.
FAQs
How does the calculator decide if a triangle is right?
It sorts the sides, checks the triangle inequality, then tests whether the largest side squared equals the sum of the squares of the two smaller sides.
Why does the calculator sort the sides first?
Sorting guarantees the largest side is compared as c in the Pythagorean-style test.
What if the sides do not make a triangle?
The calculator returns an error because the triangle inequality must be satisfied before any classification is valid.
What is an acute triangle?
An acute triangle has all angles less than 90°, which corresponds to c² being less than a² + b².
What is an obtuse triangle?
An obtuse triangle has one angle greater than 90°, which corresponds to c² being greater than a² + b².
Why is there a tolerance for right triangles?
The tolerance helps treat tiny floating-point rounding differences as equal when the triangle is mathematically right.
Can I use decimals for the side lengths?
Yes. Decimal sides are allowed as long as they are finite, positive, and satisfy the triangle inequality.