Calculating Triangles: Formulas and Examples
- Perimeter
- cm
- Result
- Side a
- 5 cm
- You entered
- Side b
- 5 cm
- You entered
Calculating a triangle means finding an unknown side, angle, area, or perimeter from the measurements you know. Enter three compatible measurements—such as two sides and their included angle, or one side and two angles—and use the appropriate triangle formula to determine the remaining values.
Formula
This calculator uses Heron’s formula to find the area from the lengths of all three sides. It also adds the side lengths to find the perimeter.
- Semiperimeter: s = (a + b + c) / 2, where a, b, and c are side lengths in centimetres, and s is the semiperimeter in centimetres.
- Area: A = √[s(s − a)(s − b)(s − c)], where A is the area in square centimetres.
- Perimeter: P = a + b + c, where P is the perimeter in centimetres.
The calculator’s area expression substitutes the semiperimeter directly into Heron’s formula. The three side lengths must form a valid triangle: the sum of any two sides must be greater than the third.
Worked Example
For the default sides a = 5 cm, b = 5 cm, and c = 6 cm:
- Find the semiperimeter: s = (5 + 5 + 6) / 2 = 8 cm.
- Apply Heron’s formula: A = √[8(8 − 5)(8 − 5)(8 − 6)].
- Calculate: A = √(8 × 3 × 3 × 2) = √144 = 12 cm².
- Add the sides for the perimeter: P = 5 + 5 + 6 = 16 cm.
The equal sides make this an isosceles triangle. Its 6 cm base divides into two 3 cm halves; the height is 4 cm by the Pythagorean theorem, so its area is also (6 × 4) / 2 = 12 cm².
What You Need to Calculate a Triangle
A triangle has three sides and three interior angles, and its angles always sum to 180°. To determine a particular triangle, you generally need three independent measurements, with at least one of them a side length. Three angles alone establish the shape but not its size: triangles with the same angles can be scaled larger or smaller.
Common sets of known information include:
- Three sides (SSS): use Heron’s formula for area; the side lengths also give the perimeter.
- Two sides and the included angle (SAS): use the cosine rule to find the third side, or A = ab sin(C) / 2 to find the area.
- Two angles and one side (AAS or ASA): find the third angle using the 180° total, then apply the sine rule to find unknown sides.
- Two sides and a non-included angle (SSA): this can produce no triangle, one triangle, or two triangles; check the sine-rule possibilities rather than assuming a unique answer.
In the calculator above, all three sides are entered in centimetres. If your measurements are in inches, feet, metres, or another unit, convert all three to the same unit first. Area is expressed in squared units: for example, a result in square metres is not the same quantity as a result in metres.
Other Useful Triangle Formulas
Heron’s formula is useful when only side lengths are known. Other information may make a different formula quicker or more direct:
- Area from base and height: A = bh / 2. The height must be perpendicular to the chosen base; a sloping side is not automatically the height.
- Right triangles: a² + b² = c², where c is the hypotenuse, opposite the 90° angle. This finds a missing side, not the area by itself.
- Sine rule: a / sin(A) = b / sin(B) = c / sin(C). Each lowercase side is opposite the matching uppercase angle.
- Cosine rule: c² = a² + b² − 2ab cos(C). This generalises the Pythagorean theorem and works for non-right triangles.
For angles in these formulas, check whether your calculator is set to degrees or radians. The two modes represent angles differently; mixing them can produce a result that looks numerical but is wrong.
Validity, Precision, and Common Mistakes
For three side lengths, the triangle inequality is the essential validity check: a + b > c, a + c > b, and b + c > a. For example, lengths 2, 3, and 5 do not make a proper triangle because 2 + 3 equals 5. They describe a degenerate, flattened case with zero area.
Common errors include entering a diameter where a side is required, mixing units, treating a sloped edge as a perpendicular height, and rounding intermediate values too early. Keep extra precision during calculations and round the final result to a level justified by the original measurements. A calculator may display decimal places, but that does not mean the measurements themselves are exact.
Heron’s formula assumes ordinary Euclidean geometry and valid, nonnegative side lengths. It can be numerically sensitive for extremely thin triangles when side lengths are approximate or very large compared with their differences. For everyday measurements, retain sensible precision and verify the triangle inequality before trusting the area.
Frequently Asked Questions
How do you calculate the area of a triangle?
Use A = bh / 2 when you know a base and its perpendicular height. If you know all three side lengths, use Heron’s formula: calculate s = (a + b + c) / 2, then find √[s(s − a)(s − b)(s − c)].
Can you calculate a triangle with only three angles?
You can identify its shape, but not its size or side lengths. You need at least one side measurement to determine the scale.
How do I find a missing side of a right triangle?
Use a² + b² = c², with c as the hypotenuse. For a missing leg, rearrange to a = √(c² − b²). Make sure the hypotenuse is the longest side.
What if the three side lengths do not make a triangle?
Check whether the sum of the two shorter sides is strictly greater than the longest side. If it is not, there is no ordinary triangle with those lengths.
Why can two sides and an angle give two answers?
With the SSA information set, the sine rule can correspond to two different angles between 0° and 180° that have the same sine. Depending on the measurements, both may form valid triangles, only one may, or neither may.
Related
Formula used
in a | Side a | cm | 5 | 0 in b | Side b | cm | 5 | 0 in c | Side c | cm | 6 | 0 out area | Triangle area | cm^2 | sqrt((a+b+c)/2*((a+b+c)/2-a)*((a+b+c)/2-b)*((a+b+c)/2-c)) | 2 out perimeter | Perimeter | cm | a+b+c | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.