Skip to content

Math

Triangle Calculator

Enter the lengths of all three sides. The calculator checks the triangle inequality, then returns the perimeter, area using Heron's formula, and all three angles using the law of cosines. It also labels the triangle by side lengths and by its largest angle. The sides must be positive and must be able to form a closed triangle.

Updated 2026-11-12 Editorial estimate Calccc Editorial Team Free · No sign-up

Loading calculator…

What this calculator does

A triangle is fixed by three side lengths, but only if the longest side is shorter than the other two sides combined. When that condition holds, geometry gives the perimeter, area, and every angle without a diagram. This calculator uses Heron's formula for area and the law of cosines for angles. It reports degrees and names the shape as equilateral, isosceles, or scalene, and as acute, right, or obtuse.

How to use it

  1. Enter sides a, b, and c in the same unit.
  2. Check that no side is zero and that the triangle inequality holds.
  3. Review the perimeter and area, then the three angles.
  4. Use the type labels to confirm the shape.

How it works

Perimeter = a + b + c. Semiperimeter s = (a + b + c) / 2. Heron's formula: area = sqrt[s(s - a)(s - b)(s - c)]. For angle A, opposite side a: cos A = (b^2 + c^2 - a^2) / (2bc), then A = arccos of that value in degrees. Angle B uses (a^2 + c^2 - b^2) / (2ac). Angle C = 180 - A - B. A valid triangle needs a + b > c, a + c > b, and b + c > a.

Example calculations

Example 1: sides 3, 4, 5

The perimeter is 12 and s is 6. The area is sqrt(6 x 3 x 2 x 1) = 6 square units. The angles are about 36.87, 53.13, and 90 degrees, a scalene right triangle.

Example 2: sides 5, 5, 6

The perimeter is 16 and s is 8. The area is sqrt(8 x 3 x 3 x 2) = 12 square units. The equal sides face equal angles of about 53.13 degrees, and the third angle is about 73.74 degrees. This is an isosceles acute triangle.

Example 3: sides 7, 8, 9

The perimeter is 24 and s is 12. The area is sqrt(12 x 5 x 4 x 3) = sqrt(720), about 26.83 square units. The angles are about 48.19, 58.41, and 73.40 degrees, all under 90, so this is a scalene acute triangle.

What the result means

Angles are measured in degrees, with 180 degrees in a triangle. The largest angle sits opposite the longest side, which is why the type by angle follows the largest side. A right triangle has one 90-degree angle and satisfies the Pythagorean theorem. An obtuse triangle has one angle above 90 degrees, and an acute triangle has all three below 90. The side labels also matter: equilateral means all sides equal, isosceles means at least two equal, and scalene means all three differ. Area is in square units, so sides in inches produce an area in square inches. When two sides add to exactly the third, the shape is a flat line, not a triangle.

Common mistakes

  • Mixing units among the three sides.
  • Entering sides that fail the triangle inequality.
  • Confusing degrees with radians.
  • Rounding angles before checking that they sum to 180.

Assumptions and limits

  • All three sides use the same unit.
  • The sides form a nondegenerate triangle with positive lengths.
  • Angles are reported in degrees and rounded for display.
  • Area is reported in square units of the input.

Frequently asked questions

What is the triangle inequality?

Any two sides must add up to more than the third. If they only equal the third, the sides form a flat line.

How do I know if a triangle is right?

The largest angle is 90 degrees. The side labels also satisfy a^2 + b^2 = c^2 when c is the longest side.

Why do the angles add up to 180?

That is a basic property of Euclidean triangles. The calculator sets angle C to 180 minus A and B.

Can a side length be zero?

No. A triangle needs three positive sides; a zero side collapses the shape.

What does Heron's formula need?

It needs all three sides and the semiperimeter. It works for any valid triangle, not just right triangles.

Why do the displayed angles miss 180 by a little?

Each angle is rounded for display. The underlying values still sum to 180 degrees.

Sources

This is an educational geometry tool. Results are rounded and assume a flat, Euclidean triangle with positive side lengths that satisfy the triangle inequality. Confirm measurements and units before construction use.

2026 update

How to use the professional output

This page is not just a formula box. The result is designed to be checked, compared, and taken away.

  • Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
  • A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
  • Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.

The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.

Go deeper

Guides that explain the math

Triangle Calculator: Angles, Sides, and the Law of Cosines
Math

Triangle Calculator: Angles, Sides, and the Law of Cosines

Solve a triangle from three known parts: the 180° rule, the law of cosines, the law of sines, Heron's formula, and the ambiguous SSA case.

8 min read

Calccc Editorial Team · Updated 2026-11-12

Prepared by Calccc Editorial Team as an educational estimate. This page is not a licensed professional review and is not financial, medical, legal, or tax advice.

Editorial estimate prepared by the Calccc Editorial Team; not a licensed professional review.