Triangle Area Calculator
Calculate the area of a triangle using base/height or three sides (Heron's formula)
About This Tool
Computes triangle area using one of two methods: (1) base × height ÷ 2 when base and height are known, or (2) Heron's formula for three sides: A = √[s(s−a)(s−b)(s−c)], where s = (a+b+c)/2.
The SAS formula (½ab·sin C) is offered as a third option when two sides and the included angle are given.
Three formulas cover most input scenarios. Base × height ÷ 2 derives from any triangle being half of a parallelogram with the same base and height. Heron's formula, attributed to Hero of Alexandria around 60 AD, computes area from three side lengths alone, useful when no angle or altitude is known. The SAS (Side-Angle-Side) formula ½ab sin(C) follows from the cross product interpretation of the parallelogram area, with sin(C) projecting one side onto the perpendicular of the other.
A worked example with Heron's formula: a triangle with sides 3, 4, 5 has semi-perimeter s = (3+4+5)/2 = 6. Area = √[6(6−3)(6−4)(6−5)] = √[6×3×2×1] = √36 = 6. The 3-4-5 right triangle is the easiest verification case; base × height ÷ 2 with the legs as base and height gives the same answer (3 × 4 / 2 = 6). For a triangle with sides 7, 8, 9: s = 12, area = √[12×5×4×3] = √720 ≈ 26.83.
Numerical stability is a real concern. Heron's formula loses precision for thin triangles where one side is nearly equal to the sum of the other two. The terms (s−a), (s−b), (s−c) become very small, their product underflows, and the resulting square root carries large relative error. The Kahan stable variant rearranges the formula to avoid the cancellation: A = ¼√[(a+(b+c))(c−(a−b))(c+(a−b))(a+(b−c))], which preserves precision for slivered triangles. The calculator uses this internally even when displaying the standard form.
Limitations are mostly about input validity. The triangle inequality requires that any side be shorter than the sum of the other two; if the input violates this, no triangle exists, and the value under Heron's radical becomes negative. The calculator detects this and reports an invalid input rather than returning NaN or a complex number. For obtuse triangles, the base × height method works as long as height is the perpendicular distance from the apex to the line containing the base; the foot of the perpendicular may lie outside the triangle itself. SAS works for any triangle; the angle C is the included angle between sides a and b, not the angle opposite to either.
For coordinates rather than side lengths, the shoelace formula computes area from vertex coordinates: ½|x₁(y₂−y₃) + x₂(y₃−y₁) + x₃(y₁−y₂)|. This is the most stable approach for triangles defined by their corner coordinates and is what most computational geometry libraries use internally.
The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.