Triangle Calculator
Enter the three side lengths of a triangle to calculate its area, perimeter, angles and type.
Reviewed by the ToolNestr Editorial Team — July 2026
How triangle calculations work
This calculator uses Heron's formula to find the area from the three side lengths: area = √(s(s−a)(s−b)(s−c)), where s = (a + b + c)/2 is the semi-perimeter. The law of cosines determines each angle: cos(C) = (a2 + b2 − c2) / (2ab), and similarly for the other angles.
The triangle type is determined by comparing side lengths (scalene, isosceles, equilateral) and by the largest angle (acute, right, obtuse). For a right triangle, the Pythagorean theorem (a2 + b2 = c2) provides a direct check. The calculator also verifies the triangle inequality to ensure a valid triangle.
Worked example
A right triangle has legs 5 and 12. Find the hypotenuse, area and perimeter.
How common each triangle type is
Triangles come in different shapes depending on their side lengths and angles. Here is how often each type appears in practice.
Architect
Verify right angles in building layouts using the 3-4-5 rule and calculate roof pitch angles from side measurements.
Student
Check geometry homework, verify triangle classifications and practise applying Heron\'s formula and the law of cosines.
Surveyor
Calculate land parcel areas from measured boundary lengths without needing to survey every angle in the field.
Graphic Designer
Compute precise angles for geometric logo designs, triangular UI elements and isometric illustration grids.
| Triangle Type | Side Properties | Angle Properties |
|---|---|---|
| Equilateral | All three sides equal | All angles are 60° |
| Isosceles | Two sides equal | Two base angles equal |
| Scalene | All sides different | All angles different |
| Right | Satisfies a² + b² = c² | One angle = 90° |
| Acute | Any valid triangle | All angles < 90° |
| Obtuse | One side squared > sum of squares of other two | One angle > 90° |
| Degenerate | One side equals sum of the other two | Area = 0, points are collinear |
How to use the triangle calculator
Enter the three sides
Type the lengths of sides a, b and c into the input fields. Use decimals if needed — any positive number works.
Check the results
The area, perimeter, triangle type and all three interior angles are calculated and displayed instantly.
Validate your triangle
If the sides do not satisfy the triangle inequality, the calculator tells you exactly why no triangle can exist.
Tips for accuracy
Check the triangle inequality first
Every side must be shorter than the sum of the other two. If one side equals the sum exactly, the triangle is degenerate (area = 0).
Use consistent units for all sides
If side a is in metres and side b in centimetres, convert first. The area is in square units of the unit you entered for all three sides.
Test with a 3-4-5 triangle first
A 3-4-5 triangle should give a right angle (90° at the corner opposite the longest side) and area of exactly 6 — a great sanity check.
When to use the triangle calculator
Triangle calculations have practical applications in many fields beyond the classroom. Architects and construction professionals use triangle geometry to verify right angles in building layouts using the 3-4-5 rule, calculate roof pitch angles from rise and run measurements, and determine material quantities for triangular structural elements. Surveyors measure land parcel boundaries and compute areas without needing to survey every interior angle, relying on side-length measurements and Heron's formula for accurate area calculations. Students from middle school through college use triangle calculators to check geometry homework, verify triangle classifications, and develop intuition about the relationship between side lengths and angles. Graphic designers and UI developers compute precise angles for triangular UI components, logo shapes, and isometric illustration grids where accurate geometry determines visual balance. Engineers in mechanical and civil disciplines apply triangle calculations to force vector decomposition, truss analysis, and determining resultant forces in structural systems. Navigation and GPS applications fundamentally depend on triangulation principles, where knowing distances between points enables position determination. Woodworkers and DIY enthusiasts use triangle calculations when cutting rafters, building frames, or designing furniture with triangular bracing for structural stability. Game developers and 3D modelers work extensively with triangles as the basic rendering primitive, where understanding triangle properties helps optimize mesh geometry and collision detection. Even artists and craftspeople benefit from triangle calculations when creating geometric patterns, tessellations, or sculptures based on precise angular relationships.
Limitations and considerations
Several limitations affect the triangle calculator's use. The triangle inequality theorem must hold for any valid triangle: each side must be shorter than the sum of the other two sides. If one side equals the sum exactly, the triangle is degenerate with zero area and collinear vertices, which the calculator correctly identifies as invalid. Floating-point arithmetic in JavaScript can introduce tiny rounding errors, particularly for extreme values or triangles with very small or very large side ratios. For example, a triangle with sides 0.1, 0.2, and 0.3 should be degenerate, but floating-point precision may report a very small area instead of exactly zero. The calculator requires all three side lengths; it cannot compute missing sides from partial information such as two sides and an included angle. Users needing side-angle-side or angle-side-angle calculations should use a full scientific calculator with trigonometric functions. Unit consistency is critical: mixing measurement units like meters and centimeters produces incorrect results because the calculator treats all inputs as abstract numeric values without unit awareness. The area is reported in square units of the input, so entering sides in centimeters yields area in square centimeters, but the calculator does not label or convert units automatically. Angles are reported in degrees rounded to four decimal places, which provides sufficient precision for most practical purposes but may not satisfy exacting scientific requirements. Users working with extremely large or small numbers should be aware that JavaScript number precision degrades beyond roughly 15 significant digits, potentially affecting calculations for astronomical-scale or microscopic triangles.
Frequently asked questions
How is the area calculated?
From the three sides we use Heron's formula, which gives the exact area without needing the height.
How are the angles found?
Using the law of cosines, which calculates each angle from the three side lengths.
Why does it say "not a valid triangle"?
For a triangle to exist, each side must be shorter than the sum of the other two (the triangle inequality). If that fails, no triangle is possible.
What does "scalene" mean?
A scalene triangle has all three sides of different lengths. If two sides are equal, it's isosceles; if all three are equal, it's equilateral.
Can I enter decimal side lengths?
Yes — use decimal values like 4.5 for any side. The calculator handles decimals perfectly.
What does "obtuse" and "acute" mean?
An acute triangle has all angles less than 90°. An obtuse triangle has one angle greater than 90°. A right triangle has exactly one 90° angle.
What is Heron's formula?
Heron's formula uses the semi-perimeter s = (a + b + c) / 2 and computes area as √(s(s-a)(s-b)(s-c)). It works for any triangle.
Can I enter sides in any order?
Yes — the calculator labels angles A, B, C opposite sides a, b, c respectively, but the order of entry does not matter.
What if I only know two sides and an angle?
This calculator requires all three side lengths. Use the Scientific Calculator with trig functions for side-angle-side problems.
What units does the result use?
The area is in square units of whatever you entered (e.g., cm² if sides are in cm). Angles are shown in degrees.