Triangle Calculator
Enter three side lengths to check if they form a valid triangle and find its perimeter and area using Heron's formula.
What the triangle calculator does
Enter the lengths of sides a, b and c. The tool first checks whether they can form a triangle, then returns the perimeter and area. The default 3, 4, 5 triangle has a perimeter of 12 and an area of 6.
The triangle inequality
Three lengths make a triangle only if each side is shorter than the sum of the other two. Sides 3, 4 and 8 fail because 3 + 4 is less than 8. When this test fails, the calculator reports that the triangle is not valid.
Perimeter
The perimeter is the sum of the three sides. For 3, 4 and 5 it is 12 units.
Area with Heron's formula
First compute the semi-perimeter s, which is half the perimeter. The area is the square root of s × (s − a) × (s − b) × (s − c). For 3, 4 and 5, s is 6, and the area is the square root of 6 × 3 × 2 × 1, which is the square root of 36, so 6. The formula needs no height or angle.
Types of triangle
An equilateral triangle has three equal sides, an isosceles one has two, and a scalene one has none. A triangle is right-angled if a² + b² = c² for its longest side c, as 3, 4, 5 does.
Other area formulas
If you know the base and height, the area is half of base times height. With two sides and the angle between them, it is half of a times b times the sine of the angle.
Units
Use the same unit for all sides. The area will be in square units.
Worked example: Finding area, perimeter, and angles of a 7–8–9 scalene triangle
Suppose a triangular garden plot has side lengths `a = 7 m`, `b = 8 m`, and `c = 9 m`:
- Step 1 — Triangle inequality check: The two shorter sides (`7 + 8 = 15`) are strictly greater than the longest side (`9`), so a valid closed triangle exists.
- Step 2 — Perimeter and semi-perimeter (`s`): Perimeter `P = 7 + 8 + 9 =` 24 m; semi-perimeter `s = 24 ÷ 2 = 12 m`.
- Step 3 — Area via Heron's formula: `Area = √(s(s − a)(s − b)(s − c)) = √(12 × (12 − 7) × (12 − 8) × (12 − 9)) = √(12 × 5 × 4 × 3) = √720 =` 26.8328 m².
- Step 4 — Interior angles via the Law of Cosines (`cos C = (a² + b² − c²) / (2ab)`): For the largest angle opposite side `c = 9`: `cos C = (49 + 64 − 81) ÷ (2 × 7 × 8) = 32 ÷ 112 = 0.285714`, so `C = arccos(0.285714) =` 73.40° (with `A = 48.19°` and `B = 58.41°`, summing to `180.00°`). Since all three angles are under `90°`, it is an acute scalene triangle.
Limits and what this tool cannot do
- Requires all three side lengths (SSS input): This calculator solves triangles from three known side lengths (`a, b, c`). It does not take angle-side-angle (ASA) or side-angle-side (SAS) inputs directly; if you have SAS (`a, b`, and included angle `C`), find the third side first with `c = √(a² + b² − 2ab cos C)`.
- Degenerate and impossible triangles (`a + b ≤ c`): Entering sides like `3, 4, 8` (`3 + 4 < 8`) cannot connect to form a triangle, and `3, 4, 7` (`3 + 4 = 7`) collapses into a flat line of zero area.
- All three sides must use the same unit of length: Do not mix feet and inches (convert everything to inches or decimal feet first).
Frequently asked questions
Can any three lengths form a triangle?
No. Each side must be shorter than the sum of the other two.
What is Heron's formula?
A formula for the area of a triangle from its three sides.
How do I know if a triangle is right-angled?
Check whether the squares of the two shorter sides add up to the square of the longest.
Does the order of the sides matter?
No.
How can you tell if a triangle is acute, right, or obtuse just from the three sides?
Square all three sides (`a²`, `b²`, and the longest side `c²`). If `a² + b² = c²` (like `3² + 4² = 5²`), it is a right-angled triangle; if `a² + b² > c²`, it is acute; if `a² + b² < c²`, the angle opposite `c` is obtuse (`> 90°`).
How do I find the height (altitude) of the triangle from Heron's area?
Since `Area = 0.5 × base × height`, divide `2 × Area` by whichever side you choose as the base. In the 7–8–9 example (`Area = 26.8328 m²`), the altitude to the 9 m base is `(2 × 26.8328) ÷ 9 = 5.9628 m`.
Why didn't Heron's formula need any angles or heights?
Because three fixed side lengths uniquely lock the geometry of a rigid triangle (SSS congruence), its area is completely determined by `a`, `b`, and `c` alone.