Docomint

Triangle Calculator

Calculate a triangle's area, perimeter, and all three angles from its three side lengths.

🔒 Processed on your device

What is a Triangle Calculator?

Given just three side lengths, this computes the area using Heron's formula (no need to know the height) and all three interior angles using the law of cosines — and checks the triangle inequality first, so three lengths that couldn't actually form a triangle are flagged rather than silently producing a nonsense answer.

How to use the Triangle Calculator

  1. Enter the three side lengths, a, b, and c
  2. Press Calculate
  3. Area, perimeter, and all three angles appear instantly, computed on your device

Formula

Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2 (Heron's formula); angles via the Law of Cosines

Heron's formula finds area from three side lengths alone, without needing the triangle's height. The Law of Cosines then backs out each angle from the same three sides.

Example

A triangle with sides 7, 9, and 12 has a perimeter of 28, an area of about 31.3 (via Heron's formula), and angles of roughly 35.4°, 48.2°, and 96.4° — which correctly sum to 180°.

Common mistakes

Frequently asked questions

How is triangle area calculated from just three side lengths?

Using Heron's formula: compute the semi-perimeter s = (a+b+c)/2, then area = √(s(s−a)(s−b)(s−c)). It works without knowing the triangle's height, which is what makes it useful when you only have the three side lengths to start with.

Why might three side lengths not actually form a triangle?

The triangle inequality requires that any two sides added together must be longer than the third side — otherwise the two shorter sides can't physically reach each other to close the shape. Side lengths like 1, 1, and 10 fail this test.

Does this work if I only know two sides and an angle?

No — this calculator solves the side-side-side (SSS) case only, from three known side lengths. A two-sides-and-an-angle (SAS) problem needs the Law of Cosines applied differently and isn't supported here.

Why do the three angles need to add up to 180°?

That's a fixed geometric property of any triangle on a flat (Euclidean) plane — this calculator computes two angles directly via the Law of Cosines and derives the third by subtracting both from 180°.

Is my numbers uploaded anywhere?

No — Triangle Calculator runs entirely in your browser using JavaScript/WebAssembly. Your numbers is never sent to a server.

Related calculators