The Standard Engine.
MathematicsFinanceHealthPhysicsEngineeringBrowse all

Mathematics · Geometry & Trigonometry · Plane Geometry

Triangle Area Calculator

Calculates the area of a triangle using base and height, three sides (Heron's formula), or two sides and an included angle.

Calculator

Advertisement

Formula

For Base-Height: b is the base length and h is the perpendicular height. For Heron's formula: a, b, c are the three side lengths and s is the semi-perimeter. For SAS: a and b are two known side lengths and C is the included angle between them in degrees.

Source: Euclid, Elements Book I; Hero of Alexandria, Metrica (c. 60 AD); standard secondary and university geometry curriculum.

How it works

The area of a triangle is one of the most fundamental quantities in plane geometry. Unlike a rectangle or square, a triangle's area cannot be read off directly from just its side lengths — the shape and orientation of the triangle matter. Three distinct formulas cover the most common scenarios encountered in practice, each requiring a different set of known measurements.

The Base-Height formula, A = ½ × b × h, is the simplest approach. Here, b is any side chosen as the base, and h is the perpendicular (right-angle) distance from that base to the opposite vertex. This formula works for all triangle types — acute, obtuse, and right — as long as you can measure or derive the perpendicular height. Heron's formula, A = √(s(s−a)(s−b)(s−c)) where s = (a+b+c)/2, is invaluable when only the three side lengths are known. The intermediate quantity s is called the semi-perimeter. This formula was described by Hero of Alexandria around 60 AD and remains widely used in surveying and computational geometry. The SAS formula, A = ½ × a × b × sin(C), applies when two sides and the angle between them are known. It derives directly from the definition of the sine function and is standard in trigonometry curricula worldwide.

Practical applications span an enormous range: land area calculation from survey coordinates, structural engineering of roof trusses and bridge gussets, computer graphics mesh calculations, navigation and cartography, and classroom geometry problems. Understanding which formula to apply depends entirely on which measurements are available — all three formulas are mathematically equivalent for a given triangle; they simply use different input data.

Worked example

Example 1 — Base and Height: A triangle has a base of 10 m and a perpendicular height of 6 m. Area = ½ × 10 × 6 = 30 m².

Example 2 — Heron's Formula: A triangle has sides a = 7 m, b = 8 m, and c = 9 m. First calculate the semi-perimeter: s = (7 + 8 + 9) / 2 = 12 m. Then apply Heron's formula: A = √(12 × (12−7) × (12−8) × (12−9)) = √(12 × 5 × 4 × 3) = √720 ≈ 26.8328 m². This is a scalene triangle where no two sides are equal, a common scenario in land surveying.

Example 3 — SAS: Two sides measure a = 6 m and b = 8 m, and the included angle is C = 60°. Convert to radians: 60 × π/180 ≈ 1.0472 rad. Area = ½ × 6 × 8 × sin(60°) = 24 × 0.8660 ≈ 20.7846 m². This approach is commonly used in trigonometry when angle measurements are available from instruments such as theodolites.

Limitations & notes

These formulas assume a flat (Euclidean) triangle in two-dimensional space. For triangles drawn on curved surfaces — such as spherical triangles used in geodesy and astronomy — different formulas apply (e.g., the spherical excess formula). Heron's formula can suffer from catastrophic numerical cancellation for very flat triangles where one side is nearly equal to the sum of the other two; in such cases, a numerically stable variant (Kahan's formula) should be used instead. The SAS formula requires the angle to be the angle directly between the two known sides; using a non-included angle will give an incorrect result. All three formulas require positive, real-valued inputs, and for Heron's formula the three sides must satisfy the triangle inequality (the sum of any two sides must exceed the third). Inputs that violate this constraint will yield a negative radicand and an undefined (NaN) result.

Frequently asked questions

What is Heron's formula and when should I use it?

Heron's formula, A = √(s(s−a)(s−b)(s−c)) with s = (a+b+c)/2, calculates triangle area from the three side lengths alone, with no angles required. It is the right choice when you have measured all three sides but have no height measurement or angle data — a common situation in land surveying, construction layout, and computational geometry.

Can I use any side as the base in the base-height formula?

Yes. For any triangle, you can designate any of the three sides as the base. The corresponding height is always the perpendicular distance from that base (or its extension, for obtuse triangles) to the opposite vertex. The area result is identical regardless of which side you choose as the base, as long as you use the correct paired height.

Why does the SAS formula use the sine of the angle?

The height of a triangle can be expressed as h = b × sin(C), where b is one side and C is the angle at the vertex opposite the height. Substituting this into A = ½ × base × height gives A = ½ × a × b × sin(C). This relationship comes directly from the definition of sine as the ratio of the opposite side to the hypotenuse in a right triangle.

What happens if the three sides don't form a valid triangle?

If the three side lengths violate the triangle inequality — for example, sides of 2, 3, and 10 where 2 + 3 < 10 — then no real triangle can be formed. In Heron's formula, the expression inside the square root becomes negative, producing an undefined (NaN) result. Always verify that the sum of any two sides exceeds the third side before applying Heron's formula.

How accurate is the triangle area calculation for large-scale land areas?

For flat land parcels up to a few kilometres across, the Euclidean triangle formulas are accurate to within engineering tolerances. For larger areas — such as regional or continental parcels — the curvature of the Earth becomes significant and spherical or ellipsoidal geometry (using the spherical excess formula or geodetic methods) must be used instead. National mapping agencies such as the USGS and Ordnance Survey provide guidelines on when to switch from planar to geodetic calculations.

Last updated: 2025-01-15 · Formula verified against primary sources.