A triangle calculator finds the area and perimeter of a triangle from the lengths of its three sides. Formula: s = (a+b+c)/2. Area = sqrt(s(s-a)(s-b)(s-c)). Perimeter = a+b+c. Sides of 7, 8 and 9 give an area of about 26.83 and a perimeter of 24.
On this page

How to use the triangle calculator
- Enter side a, side b and side c in the same unit.
- Read the area and perimeter.
- Fix the sides if the tool says they do not form a triangle.
How the triangle calculator works
The triangle calculator takes the three side lengths of a triangle and returns its area and perimeter. It first checks that all sides are positive and that each pair of sides adds up to more than the third, the triangle inequality. It then uses Heron’s formula: with semi-perimeter s = (a + b + c) ÷ 2, area = √(s(s − a)(s − b)(s − c)). Results are shown to four decimal places.
Triangle calculator worked example
For sides 7, 8 and 9, the perimeter is 24 and s = 12. Area = √(12 × 5 × 4 × 3) = √720 ≈ 26.8328. For the classic 3-4-5 right triangle, s = 6 and the area is √(6 × 3 × 2 × 1) = 6, the same as half of 3 × 4. The triangle calculator gives these values directly.
| a | b | c | Area | Perimeter |
|---|---|---|---|---|
| 3 | 4 | 5 | 6 | 12 |
| 5 | 5 | 6 | 12 | 16 |
| 7 | 8 | 9 | 26.8328 | 24 |
| 10 | 10 | 10 | 43.3013 | 30 |
| 6 | 8 | 12 | 21.3307 | 26 |
The triangle inequality
Three lengths form a triangle only if the sum of any two is greater than the third. Sides of 2, 3 and 6 fail, because 2 + 3 is less than 6, and the tool shows an error. When two sides exactly equal the third, the shape collapses into a straight line with zero area, which the tool also rejects.
Why Heron’s formula is useful
Heron’s formula needs no angles and no height, so it works when you can measure only sides, such as a garden bed or a roof gable. For a right triangle, half the product of the two legs gives the same result. For an equilateral triangle with side a, the area is √3 ÷ 4 × a², about 43.3013 for a side of 10.
Finding the angles
This tool reports area and perimeter only. To find an angle from three sides, use the law of cosines: cos C = (a² + b² − c²) ÷ (2ab). For sides 7, 8 and 9, the angle opposite 9 is about 73.4 degrees. The three angles always add to 180 degrees.
Units and precision
Use the same unit for all three sides. The perimeter is in that unit and the area is in square units, such as square feet or square meters. Very thin triangles, where one side is almost the sum of the others, are sensitive to rounding in the measurements, so measure carefully.
Practical uses
Surveyors and builders often measure a plot by splitting it into triangles. Measure every side of each triangle, find each area with the triangle calculator and add them up. This works for any polygon, as long as you draw diagonals that stay inside the shape. A gable end of a roof is a triangle too: with a 24-foot base and two 15-foot rafters, the area is 108 square feet, which helps you estimate siding.
In a classroom, Heron’s formula is a good check on other methods. Compute area as half the base times the height, then run the triangle calculator on the same triangle. If the results disagree, one of the measurements is wrong.
If your measurements are in mixed units, such as feet and inches, convert everything to one unit first. Ten feet six inches is 10.5 feet or 126 inches. Mixing units is the most common reason a result looks far too large or too small.
Tips
- Label the sides before measuring.
- Check the triangle inequality if you get an error.
- Round the area to the precision of your measurements.
Related converters and calculators
Related calculators:
- Right triangle calculator: right angles
- Pythagorean calculator: hypotenuse
- Area calculator: shapes
- Circle calculator: circles
Sources
OpenStax Precalculus 2e, 8.2: Law of cosines and Heron’s formula; OpenStax Prealgebra 2e, 9.4: Rectangles, triangles and trapezoids.
Questions about this calculator
What formula does it use?
Heron’s formula.
What is the area of a 3-4-5 triangle?
6 square units.
Why do I get an error?
The sides break the triangle inequality or are not positive.
Does it give angles?
No; use the law of cosines.
What units are used?
Any, as long as all three sides match.
Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.
Report a calculation issue