Triangle Calculator

Calculate area, perimeter, angles, and height of a triangle from its three sides. Automatically identifies triangle type.

Triangle Sides

Enter the length of all three sides

About Triangle Calculator

A triangle calculator is a powerful geometry tool that helps you calculate all properties of a triangle when you know its three sides. Using mathematical formulas like Heron's formula and the law of cosines, this calculator can determine the area, perimeter, angles, height, and even identify the type of triangle you're working with.

Triangle Properties and Formulas

Triangles are fundamental shapes in geometry with several key properties that can be calculated from their sides:

  • Area (Heron's Formula): First calculate the semi-perimeter s = (a + b + c) / 2, then Area = √[s(s-a)(s-b)(s-c)]
  • Perimeter: Simply add all three sides: P = a + b + c
  • Height: Can be calculated as h = 2 × Area / base
  • Angles (Law of Cosines): cos(A) = (b² + c² - a²) / (2bc), then convert from radians to degrees
  • Semi-perimeter: Half of the perimeter, used in Heron's formula: s = P / 2

Types of Triangles by Sides

  • Equilateral Triangle: All three sides are equal in length (a = b = c). All three angles are also equal at 60° each. This is the most symmetric type of triangle.
  • Isosceles Triangle: Two sides are equal in length, and the two angles opposite those sides are also equal. This triangle has one line of symmetry.
  • Scalene Triangle: All three sides have different lengths, and all three angles are different. This is the most general type of triangle with no symmetry.

Types of Triangles by Angles

  • Right Triangle: One angle is exactly 90°. The side opposite the right angle is called the hypotenuse. Follows the Pythagorean theorem: a² + b² = c².
  • Acute Triangle: All three angles are less than 90°. The sum still equals 180°, but each individual angle is acute.
  • Obtuse Triangle: One angle is greater than 90° (but less than 180°). The other two angles must be acute to maintain the 180° sum.

Triangle Inequality Theorem

For three lengths to form a valid triangle, they must satisfy the triangle inequality theorem: the sum of any two sides must be greater than the third side. This means:

  • a + b > c
  • a + c > b
  • b + c > a

If any of these conditions is not met, the three lengths cannot form a triangle. Our calculator automatically checks this before performing calculations.

Heron's Formula Explained

Heron's formula is a remarkable mathematical formula that allows you to calculate the area of a triangle when you only know the lengths of its three sides, without needing to know any angles or heights. The formula is:

  • Step 1: Calculate the semi-perimeter: s = (a + b + c) / 2
  • Step 2: Apply the formula: Area = √[s × (s-a) × (s-b) × (s-c)]

This formula was discovered by Hero of Alexandria in the 1st century AD and remains one of the most elegant solutions in geometry.

Law of Cosines

The law of cosines is used to find the angles of a triangle when all three sides are known. It's a generalization of the Pythagorean theorem:

  • c² = a² + b² - 2ab × cos(C)
  • Rearranged: cos(C) = (a² + b² - c²) / (2ab)
  • Then: C = arccos[(a² + b² - c²) / (2ab)]

This formula works for all types of triangles, not just right triangles. When the angle is 90°, it reduces to the Pythagorean theorem.

Practical Applications

  • Construction and Architecture: Calculate roof angles, structural supports, and triangular frameworks in buildings and bridges.
  • Land Surveying: Determine distances and areas of triangular land plots using measured side lengths.
  • Navigation: Triangulation methods use triangle properties to determine positions and distances in GPS and maritime navigation.
  • Engineering: Design triangular trusses, supports, and mechanical components with specific angle requirements.
  • Computer Graphics: Triangles are the fundamental building blocks of 3D models and mesh generation.
  • Physics: Analyze force vectors, calculate resultant forces, and solve problems involving triangular motion paths.
  • Education: Learn and practice geometry concepts, verify homework solutions, and understand triangle properties.

Special Triangles

  • 3-4-5 Right Triangle: The most famous Pythagorean triple. Sides of 3, 4, and 5 units form a perfect right triangle. Any multiple (6-8-10, 9-12-15) also works.
  • 5-12-13 Right Triangle: Another common Pythagorean triple used in construction and carpentry.
  • 30-60-90 Triangle: A right triangle with angles of 30°, 60°, and 90°. Side ratios are 1 : √3 : 2.
  • 45-45-90 Triangle: An isosceles right triangle with two 45° angles. Side ratios are 1 : 1 : √2.
  • Golden Triangle: An isosceles triangle where the ratio of the longer side to the shorter side is the golden ratio (φ ≈ 1.618).

Triangle Calculation Examples

  • Example 1: Triangle with sides 3, 4, 5 → Area = 6 sq units, Perimeter = 12 units, Type = Scalene Right Triangle
  • Example 2: Triangle with sides 5, 5, 8 → Area ≈ 12 sq units, Perimeter = 18 units, Type = Isosceles Acute Triangle
  • Example 3: Triangle with sides 6, 6, 6 → Area ≈ 15.59 sq units, Perimeter = 18 units, Type = Equilateral Triangle (all angles 60°)
  • Example 4: Triangle with sides 7, 8, 12 → Area ≈ 26.83 sq units, Perimeter = 27 units, Type = Scalene Obtuse Triangle

Tips for Using the Triangle Calculator

  • Always ensure your three sides can form a valid triangle using the triangle inequality theorem
  • Use consistent units for all three sides (all in cm, meters, inches, etc.)
  • For right triangles, verify using the Pythagorean theorem: a² + b² = c²
  • Remember that the sum of all angles in any triangle always equals 180°
  • The largest angle is always opposite the longest side
  • For equilateral triangles, you can use the simplified formula: Area = (√3/4) × a²
  • Double-check your inputs if you get unexpected results

Common Mistakes to Avoid

  • Entering sides that don't satisfy the triangle inequality theorem
  • Mixing different units of measurement for the three sides
  • Confusing the semi-perimeter with the perimeter
  • Forgetting that angles are measured in degrees, not radians
  • Assuming all triangles with equal perimeters have equal areas
  • Trying to calculate properties of degenerate triangles (where sides form a straight line)

Historical Context

Triangles have been studied for thousands of years. Ancient Egyptians used the 3-4-5 triangle to create right angles when building pyramids. Greek mathematicians like Pythagoras, Euclid, and Hero made fundamental discoveries about triangle properties. Today, triangles remain essential in modern mathematics, engineering, and computer science, particularly in fields like trigonometry, calculus, and computational geometry.