ThisCalculator

Math

Triangle Calculator With Steps for Solving Any Triangle

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Triangle Calculator With Steps for Solving Any Triangle

A triangle calculator with steps finds missing sides and angles from the measurements you enter, then shows the equations used. Enter three valid measurements, including at least one side; the calculator can return the remaining sides, angles, area, and perimeter when the information determines a unique triangle.

Formula

This calculator uses three side lengths to find a triangle’s area, perimeter, and two angles. The third angle is 180° minus the other two. Its area calculation is Heron’s formula:

  • s = (a + b + c) / 2, the semiperimeter.
  • Area = √[s(s − a)(s − b)(s − c)], in square units.
  • Perimeter = a + b + c, in the same units as the sides.
  • A = cos⁻¹[(b² + c² − a²) / (2bc)], from the law of cosines.
  • B = cos⁻¹[(a² + c² − b²) / (2ac)], also from the law of cosines.

Here, a, b, and c are the side lengths opposite angles A, B, and C, respectively. The inverse cosine returns an angle; this calculator reports angles in degrees. The side units can be any consistent unit, such as inches, feet, centimeters, or meters. Area is then expressed in the corresponding squared unit, such as square inches or square meters.

Worked Example

Using the default side lengths, a = 3 units, b = 4 units, and c = 5 units:

  1. Find the semiperimeter: s = (3 + 4 + 5) / 2 = 6 units.
  2. Find the area: √[6 × (6 − 3) × (6 − 4) × (6 − 5)] = √36 = 6 square units.
  3. Find the perimeter: 3 + 4 + 5 = 12 units.
  4. Find angle A: cos⁻¹[(4² + 5² − 3²) / (2 × 4 × 5)] = cos⁻¹(32/40) = 36.87°.
  5. Find angle B: cos⁻¹[(3² + 5² − 4²) / (2 × 3 × 5)] = cos⁻¹(18/30) = 53.13°.
  6. Find the remaining angle: C = 180° − 36.87° − 53.13° = 90°.

The displayed area is 6.00 square units, perimeter 12.00 units, angle A 36.87°, and angle B 53.13°. This is a 3-4-5 right triangle.

What Measurements Are Enough?

A triangle is determined when the given measurements fix its shape and scale. Three side lengths are one reliable case, provided they satisfy the triangle inequality. Other common sufficient sets are two sides and their included angle (SAS), or one side and two angles (ASA or AAS). Two angles determine the third because the interior angles total 180°, but at least one side is needed to establish the triangle’s size.

Three angles alone describe shape but not scale: infinitely many similar triangles have those angles. Two sides and a non-included angle (SSA) can be ambiguous. Depending on the measurements, there may be no valid triangle, one triangle, or two. A calculator should flag ambiguity rather than presenting a single answer as certain.

How to Check Whether the Sides Work

For positive side lengths, the sum of any two sides must be greater than the third. Equivalently, after sorting the sides from shortest to longest, the two shorter sides must add to more than the longest. If they add to exactly the longest, the shape is degenerate: its points lie on a straight line, so it is not a triangle. If their sum is smaller, no triangle can be formed.

The example passes this test: 3 + 4 > 5. It also illustrates a common misconception: a triangle calculator does not make any three numbers into a triangle. Validity depends on the measurements, not just on entering three values.

How to Read the Results

Angles are in degrees, and their sum should be 180° apart from tiny differences caused by rounding. The side opposite the largest angle is the longest side; the side opposite the smallest angle is the shortest. Perimeter measures the total boundary length, while area measures the enclosed surface.

Keep units consistent before calculating. For example, convert 2 feet to 24 inches before combining it with sides measured in inches. The output area then uses square inches, not inches. Metric lengths work the same way: sides in centimeters produce area in square centimeters. Convert the final result if needed; 1 square foot equals 144 square inches, while 1 square meter equals 10,000 square centimeters.

Common Problems and Limits

  • Mixed units: Adding a length in centimeters to one in meters without conversion gives meaningless results.
  • Premature rounding: Keep full precision during intermediate steps; round displayed answers only at the end. Rounded angles may not add to exactly 180°.
  • Zero or negative sides: Side lengths must be positive. A zero side does not describe a triangle.
  • Invalid inputs: If the cosine-rule expression falls outside −1 to 1, the measurements may be inconsistent or affected by rounding. Do not interpret a numerical error as a real angle.
  • Measurement uncertainty: A calculator treats entered values as exact. Real measurements have limited precision, so reported decimal places do not guarantee that degree of accuracy.

Heron’s formula is useful when all three sides are known, but it does not identify a triangle’s orientation or coordinates. For a drawing or map position, additional information such as a starting point and direction is required.

Frequently Asked Questions

How do I find a missing side of a triangle?
Use the law of cosines if you know the other two sides and the included angle: c² = a² + b² − 2ab cos(C). If you know two angles and one side, use the law of sines: a/sin(A) = b/sin(B) = c/sin(C).

Can I calculate a triangle with only three angles?
You can find the third angle if two are known, but angles alone do not determine side lengths or area. You need at least one side to set the scale.

Why do my angles not add to exactly 180 degrees?
The underlying values may add to 180°, while the displayed values have been rounded. Use more decimal places or retain unrounded values for intermediate calculations.

What is the area of a triangle when I know its base and height?
Use area = base × perpendicular height ÷ 2. The height must meet the base at a right angle; a sloping side is not automatically the height.

What is the difference between perimeter and area?
Perimeter is the distance around the triangle and uses length units. Area is the amount of two-dimensional space inside it and uses squared units.

Related

Formula used
in a | Side a opposite angle A | units | 3 | 0
in b | Side b opposite angle B | units | 4 | 0
in c | Side c opposite angle C | units | 5 | 0
out area | Triangle area | square units | sqrt((a+b+c)/2*((a+b+c)/2-a)*((a+b+c)/2-b)*((a+b+c)/2-c)) | 2
out perimeter | Perimeter | units | a+b+c | 2
out angleA | Angle A | degrees | acosd((b^2+c^2-a^2)/(2*b*c)) | 2
out angleB | Angle B | degrees | acosd((a^2+c^2-b^2)/(2*a*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.