
Herons Formula Calculator
Use our free Herons formula calculator (Heron's formula calculator) to find triangle semiperimeter s and area from all 3 side lengths a, b, and c.
Open toolEnter First side (a), Second side (b), and Third side (c) into this triangle perimeter calculator and perimeter of a triangle calculator to sum P = a + b + c after verifying the strict triangle inequality (a + b > c). Test the preloaded 3-4-5 right triangle returning 12, or check equilateral, isosceles, and scalene framing spans up to 12 significant digits in your browser.
Enter the inputs, then select Calculate.
Result will appear here
Learning how to calculate the perimeter of a triangle requires two steps: first confirming that the three line segments can actually close into a nondegenerate two-dimensional triangle, and second summing their lengths. By the Euclidean strict triangle inequality (see our Triangle Inequality Checker), the sum of the two shorter sides must strictly exceed the longest side.
P = a + b + c, s = P / 2 = (a + b + c) / 2 (where max(a, b, c) < (a + b + c) / 2)
In batch11-core.js, the triangle() helper sorts your three inputs in descending order x ≥ y ≥ z and tests z <= x − y (a rearrangement that prevents floating-point overflow near 1e9) along with Kahan's factored Heron area formula before returning P = a + b + c. Invalid inputs return "Sides must satisfy the strict triangle inequality."
Compare 10 verified triangle configurations to see how this perimeter calculator triangle checks the strict triangle inequality (y + z > x), computes the semiperimeter s = P / 2, and outputs #result-main:
| First Side (#a) | Second Side (#b) | Third Side (#c) | Triangle Classification | Semiperimeter (s = P / 2) | Perimeter (#result-main) | Inequality & Engineering Status |
|---|---|---|---|---|---|---|
| 3 (preloaded) | 4 (preloaded) | 5 (preloaded) | Pythagorean right (3² + 4² = 5²) | 6 | 12 | Valid (3 + 4 = 7 > 5; area = 6) |
| 5 | 12 | 13 | Pythagorean right (5² + 12² = 13²) | 15 | 30 | Valid (5 + 12 = 17 > 13; area = 30) |
| 8 | 15 | 17 | Pythagorean right (8² + 15² = 17²) | 20 | 40 | Valid (8 + 15 = 23 > 17; area = 60) |
| 6 | 6 | 6 | Equilateral (a = b = c) | 9 | 18 | Valid (P = 3a = 18; area = 9√3 ≈ 15.59) |
| 10 | 10 | 12 | Isosceles gable truss (a = b) | 16 | 32 | Valid (10 + 10 = 20 > 12; altitude h = 8) |
| 7 | 8 | 9 | Acute scalene triangle | 12 | 24 | Valid (7 + 8 = 15 > 9; area = 12√5 ≈ 26.83) |
| 13 | 14 | 15 | Heronian scalene triangle | 21 | 42 | Valid (13 + 14 = 27 > 15; integer area = 84) |
| 18.5 ft | 18.5 ft | 30 ft | Symmetric roof rafter & tie beam | 33.5 ft | 67 ft | Valid (18.5 + 18.5 = 37 > 30) |
| 3 | 4 | 7 | Degenerate collinear segments | N/A | Rejected | Fails strict inequality (3 + 4 = 7, area = 0) |
| 2 | 3 | 10 | Open unclosed segments | N/A | Rejected | Fails strict inequality (2 + 3 = 5 < 10) |
Follow these three steps to run the perimeter of a triangle calculator in the workspace above.
Type the first side length a (1e-9 to 1,000,000,000) into First side (#a, preloaded with 3).
Enter the remaining two side lengths into Second side (#b, preloaded with 4) and Third side (#c, preloaded with 5) using the same length unit.
Click Calculate to output the 12-significant-digit perimeter in #result-main, then copy the result or convert units with our Length Converter.
These three worked examples show how the perimeter of triangle calculator evaluates the preloaded 3-4-5 layout triangle, a timber roof truss, and an invalid collinear input.
Carpenters and masons use a 3-4-5 triangle to square 90° corners. With First side = 3, Second side = 4, and Third side = 5, the two shorter sides sum to 3 + 4 = 7 > 5, passing the strict triangle inequality and returning a perimeter of 12 units.

A symmetric timber roof truss has two sloped upper rafters of 18.5 ft each and a horizontal bottom tie beam of 30 ft. Because 18.5 + 18.5 = 37 > 30, entering 18.5, 18.5, and 30 outputs 67 feet of outer framing lumber per truss.

If a user enters First side = 3, Second side = 4, and Third side = 7, the two shorter segments lie flat along the third segment (3 + 4 = 7, enclosed area = 0). The solver halts and outputs "Sides must satisfy the strict triangle inequality."

When your problem provides fewer than three explicit side lengths, find the missing side first and then enter all three sides above:
How to Calculate the Perimeter of a Right Triangle From Two Legs (a, b): If you know the two perpendicular legs a and b of a right triangle, compute the hypotenuse c = √(a² + b²) with our Pythagorean Theorem Calculator. The total perimeter is P = a + b + √(a² + b²). If you instead know the hypotenuse c and one leg a, the other leg is b = √(c² − a²).
Equilateral, Isosceles, and SAS Triangles: For an equilateral triangle with side length a, enter a into all three fields (P = 3a). For an isosceles triangle with two equal legs a and base b (where 2a > b), enter a, a, b (P = 2a + b). When two sides a and b and their included angle γ are known, use our Triangle Side Calculator to evaluate the Law of Cosines c = √(a² + b² − 2ab cos γ), then sum P = a + b + c.

Watch out for these three common mistakes when calculating triangle perimeter:
Three arbitrary positive numbers do not automatically form a triangle: always verify that the longest side is strictly less than the sum of the other two sides. Also note that given only a general scalene triangle's base b and altitude h (see our Triangle Height Calculator), the area A = (1/2)bh is fixed, but the perimeter is not uniquely determined unless you also know whether the triangle is right or isosceles.
Chain your triangle calculations with our Heron's Formula Calculator or Similar Triangles Calculator linked below.


Use our free Herons formula calculator (Heron's formula calculator) to find triangle semiperimeter s and area from all 3 side lengths a, b, and c.
Open tool
Find the opposite side with the cosine rule.
Open tool
Check whether three positive side lengths form a nondegenerate triangle.
Open toolChoose another tool for your next calculation, conversion, or text task.

Calculate perpendicular triangle altitude h = 2A / b from area and base with our free triangle height calculator, 10-row reference table, and worked examples.
Open tool
Find triangle inradius r = area / semiperimeter.
Open tool
Find triangle circumradius R = abc / (4 × area).
Open tool
Use our similar triangles calculator to compute the target/reference scale factor k = b/a and missing corresponding side x for target or reference triangles.
Open toolAnswers about using Triangle Perimeter Calculator and understanding its results.
Add the lengths of all three sides using the same measurement unit: P = a + b + c, provided the sides satisfy the strict triangle inequality (a + b > c, a + c > b, and b + c > a). For a = 3, b = 4, c = 5, P = 3 + 4 + 5 = 12.
When the two perpendicular legs a and b are given, compute the hypotenuse c = √(a² + b²) via the Pythagorean theorem and sum P = a + b + √(a² + b²). When the diagonal hypotenuse c and one leg a are given, substitute √(c² − a²) for the unknown leg.
Triple the side length for an equilateral shape (P = 3a), or double the repeated leg length and add the base span for an isosceles shape (P = 2a + b, subject to 2a > b).
Three line segments can close into a nondegenerate triangle if and only if the two shorter sides add up to strictly more than the longest side (y + z > x). If y + z ≤ x, the segments either cannot touch or collapse into a flat line of zero area.
The semiperimeter s is half of the triangle's perimeter: s = P / 2 = (a + b + c) / 2. It is the primary input for Heron's area formula A = √(s(s − a)(s − b)(s − c)) and the inscribed circle radius formula r = A / s.
Choose another tool for your next calculation, conversion, or text task.