Three ways in, one area
Every triangle has one area, but which formula gets you there depends on what you were able to measure. On paper you usually have a base and a height. In the field you almost never do — you have three tape measurements between stakes, or two distances and the angle a total station read between them. Each of those is a complete description of the triangle, so each yields the area without needing the others.
Base and height is the definition: a triangle is exactly half the parallelogram built on the same base with the same height, so A = ½bh. The height must be perpendicular to the base and it may fall outside the triangle on an obtuse one, which is why it is so often measured wrongly.
Three sides uses Heron's formula, which needs no angle and no height at all. That makes it the workhorse of land measurement: split any polygon into triangles, tape the sides, and you have the area without ever setting up an instrument.
Two sides and the included angle uses A = ½ab·sin C. This is the natural fit for instrument work and for CNC layout, and it is the formula from which the other two are most easily derived. The law of cosines calculator completes the same triangle's remaining side and angles.
How the three formulas connect
Start with A = ½ab·sin C. Drop a perpendicular from the vertex between sides a and b onto side a. Its length is b·sin C, so the area is ½ × base a × height b·sin C. That single line turns the SAS formula into the base-height formula, and it also shows why the area peaks at C = 90°: sin C is largest there. Two sticks of fixed length hinged at one end enclose the most area when they are perpendicular.
Heron's formula follows from the same identity plus the law of cosines. Substitute cos C = (a² + b² − c²)/(2ab) into sin²C = 1 − cos²C, put that into A = ½ab·sin C, and the algebra collapses to A = √[s(s−a)(s−b)(s−c)] with s the semiperimeter. The formula is over two thousand years old and still the fastest way to get an area from a tape.
The textbook form has a numerical flaw worth knowing about. On a long thin triangle — sides 100, 100 and 0.0001, say — the factors (s−a) and (s−b) are differences of nearly equal numbers, and in floating point they lose most of their significant digits. This calculator uses Kahan's rearrangement, which sorts the sides descending and evaluates ¼√[(a+(b+c))(c−(a−b))(c+(a−b))(a+(b−c))]. It is algebraically identical and numerically stable, and it matters for sliver triangles in survey and mesh work.
The tool also enforces the triangle inequality before it computes: the longest side must be shorter than the other two added together. If it is not, no triangle exists and the product under the root goes negative — a real answer is impossible, and reporting one would be worse than reporting nothing.
Worked example: a 7-8-9 plot, three ways
A triangular plot measures 7 m, 8 m and 9 m on the tape.
- Check it closes. Longest side 9 < 7 + 8 = 15. Valid.
- Semiperimeter. s = (7 + 8 + 9)/2 = 24/2 = 12 m.
- Heron's product. s(s−a)(s−b)(s−c) = 12 × (12−7) × (12−8) × (12−9) = 12 × 5 × 4 × 3 = 720.
- Area. A = √720 = 26.8328 m².
- Cross-check with SAS. Find the angle opposite the 9 m side: cos C = (7² + 8² − 9²)/(2·7·8) = (49 + 64 − 81)/112 = 32/112 = 0.285714, so C = 73.398° and sin C = 0.958315. Then A = ½ × 7 × 8 × 0.958315 = 28 × 0.958315 = 26.8328 m². Same answer.
- Cross-check with base and height. The altitude onto the 9 m side is h = 2A/9 = 53.6656/9 = 5.9628 m, and ½ × 9 × 5.9628 = 26.8328 m².
Notice that each side has its own altitude and the product side × altitude is constant at 2A = 53.6656: onto the 7 m side the altitude is 7.6665 m, onto the 8 m side it is 6.7082 m, onto the 9 m side 5.9628 m. That identity is the quickest way to convert between the three-sides picture and the base-height picture without redrawing anything.
Choosing the method, and what the numbers imply
Pick the method with the smallest measurement error, not the one you remember. Distances taped on the ground are typically good to a few parts per thousand; a perpendicular height paced off a sloping site is far worse, because finding the true foot of the perpendicular by eye is unreliable. That is why Heron dominates field work despite needing more arithmetic.
Angle precision matters most near 0° and 180°, not near 90°. Because area ∝ sin C, the sensitivity dA/dC is proportional to cos C, which is zero at 90°: a one-degree error in a near-right included angle changes the area by only 1 − cos 1° = 0.015%, while the same error at C = 10° changes it by cot 10° × (π/180) = about 10%. If your angle is shallow, measure the third side and switch to Heron instead.
The semiperimeter is worth reading on its own. Each factor (s − a) is positive exactly when side a is shorter than the other two combined, so watching those three factors is the triangle inequality in another form. When one of them approaches zero the triangle is nearly degenerate, the area collapses, and any area computed from measured lengths becomes very sensitive to their errors.
Finally, area and perimeter are not proxies for each other. Among all triangles with a fixed perimeter of 24, the equilateral one (8-8-8) is the largest at 27.7128, the 7-8-9 gives 26.8328, and the near-degenerate 1-11-12 gives zero. Perimeter caps the area but does not determine it.
Areas of common triangles
| Sides | Semiperimeter s | Area | Note |
|---|---|---|---|
| 3, 4, 5 | 6 | 6.0000 | Right triangle; also ½(3)(4) |
| 5, 12, 13 | 15 | 30.0000 | Right triangle; ½(5)(12) |
| 6, 8, 10 | 12 | 24.0000 | 3-4-5 scaled by 2, so area ×4 |
| 5, 5, 6 | 8 | 12.0000 | Isosceles; height on the 6 side is 4 |
| 7, 8, 9 | 12 | 26.8328 | Scalene, √720 |
| 10, 10, 10 | 15 | 43.3013 | Equilateral, (√3/4)·100 |
| 2, 3, 4 | 4.5 | 2.9047 | Obtuse; √8.4375 |
| 8, 8, 8 | 12 | 27.7128 | Largest area for perimeter 24 |
Compare the last two rows against 7-8-9: all three have a perimeter of 24, and the equilateral triangle takes the maximum area.
Mistakes that produce a wrong area
- Using a side as the height. Only in a right triangle is a leg also an altitude. On any other triangle the perpendicular height is shorter than both adjacent sides.
- Using the wrong angle in the SAS formula. A = ½ab·sin C needs the angle between a and b. Feeding it a different angle gives a plausible-looking number that is simply wrong.
- Ignoring the triangle inequality. Sides of 2, 3 and 9 cannot close. Heron's product goes negative and a calculator that takes the root regardless returns nonsense.
- Halving the perimeter after subtracting. The semiperimeter is half of (a + b + c) computed first; the subtractions come afterwards.
- Forgetting the obtuse case. On an obtuse triangle the foot of the altitude lies outside the base, so a measured height taken inside the figure is too short.
- Trusting the textbook Heron form on slivers. Near-collinear triangles lose precision badly in the standard arrangement; use the sorted form this calculator applies.
Related methods and where they take over
When the triangle is right-angled, everything gets simpler: the area is half the product of the legs and no trigonometry is needed. The Pythagorean theorem calculator finds the missing side and the right triangle calculator completes the angles. For the two classroom special cases, use the 30-60-90 triangle calculator and its 45-45-90 counterpart.
When you have coordinates rather than lengths, skip all of this and use the cross-product form, A = ½|x₁(y₂−y₃) + x₂(y₃−y₁) + x₃(y₁−y₂)|, which is the three-point case of the shoelace formula. It is exact, needs no square root, and extends to any polygon.
When you need the altitude itself rather than the area, the triangle height calculator inverts the relationship h = 2A/b. And when the triangle is not fully determined — two sides and a non-included angle, the ambiguous SSA case — you cannot get a unique area from it at all; the law of sines calculator shows both triangles that fit those measurements so you can pick the right one before computing area.
