Heron’s Formula Calculator

Calculate the area of a triangle from side lengths a, b, and c using Heron’s formula, with no height or angles required.

Side lengths

Tip: All three sides must satisfy the triangle inequality (each side < sum of the other two).

Advanced: solve a missing side from two sides and area

Enter the two sides adjacent to the missing side’s included angle plus the target area. Some inputs have two valid triangle solutions.

Results

Advertisement

Worked Example: Sides 3, 4, and 5

  1. Semiperimeter: \(s = (3 + 4 + 5) / 2 = 6\).
  2. Substitute into Heron’s formula: \(A = \sqrt{6(6-3)(6-4)(6-5)}\).
  3. Multiply the factors: \(A = \sqrt{6 \times 3 \times 2 \times 1} = \sqrt{36}\).
  4. Final area: \(A = 6\) square units.

Heron’s Formula Explained

Heron’s formula computes the area of a triangle using only its side lengths. If the sides are \(a\), \(b\), and \(c\), define the semiperimeter \(s = \tfrac{a+b+c}{2}\). The area is then \(A = \sqrt{s(s-a)(s-b)(s-c)}\). This is especially convenient when you don’t have the triangle’s height or angles.

Method checked: Starlight Robotics math tools team. Formulas used here are the standard Heron area formula, the Law of Cosines for angles, and Kahan’s rearranged Heron formula for improved floating-point accuracy on very thin triangles.

The calculator follows a clear process: (1) it reads your three side lengths, (2) checks the triangle inequality to ensure a valid triangle exists, (3) computes \(s\) and the area \(A\), and (4) derives useful secondary values. You’ll see the perimeter \(P = a+b+c\), angles \(A\), \(B\), and \(C\), triangle classification, medians, the inradius \(r = A/s\), the circumradius \(R = \tfrac{abc}{4A}\), and the three altitudes \(h_a = \tfrac{2A}{a}\), \(h_b = \tfrac{2A}{b}\), \(h_c = \tfrac{2A}{c}\). Lengths are labeled in your chosen unit, while area uses the squared unit automatically.

Why does Heron’s formula work? One geometric route uses the identity \(A = \tfrac{1}{2}ab\sin C\) and the Law of Cosines \(\cos C = \tfrac{a^2+b^2-c^2}{2ab}\) to eliminate the angle \(C\), leading after some algebra to the symmetric expression under the square root. For ordinary triangles, the direct expression and the stable rearrangement agree. For nearly flat triangles, the calculator uses Kahan’s rearrangement internally to reduce precision loss from subtracting almost equal numbers.

Everything runs entirely in your browser (client-side JavaScript), so inputs never leave your device.

Practical Notes for Heron’s Formula

When to use it

Use Heron’s formula when you know all three side lengths but do not know a height, base-height pair, or angle.

SSS area

Triangle inequality

Each side must be less than the sum of the other two sides. If equality holds, the triangle is flat and has no positive area.

Validity check

Common mistakes

Do not divide the perimeter by 3, mix units, or forget the final square root. The semiperimeter is half the perimeter.

Step check

Unit handling

Lengths stay in the selected unit, but area is squared. For example, side lengths in meters produce square meters.

Squared units

Nearly flat triangles

Very thin triangles can magnify rounding error in the direct formula. This calculator uses a stable rearrangement internally and still shows the standard Heron steps.

Accuracy note

Heron’s Formula: FAQs

How do I calculate the semiperimeter s?

Add the three sides and divide by 2: \(s = \tfrac{a+b+c}{2}\).

How do I calculate Heron’s formula step by step?

Find \(s\), calculate \(s-a\), \(s-b\), and \(s-c\), multiply \(s(s-a)(s-b)(s-c)\), then take the square root.

Does Heron’s formula always work?

It works for valid triangles when all three side lengths are known. Zero, negative, and triangle-inequality failures are invalid.

What is the area of a 3-4-5 triangle?

The semiperimeter is \(6\), so \(A = \sqrt{6(3)(2)(1)} = 6\) square units.

What happens if the side lengths do not form a triangle?

The calculator shows a triangle inequality error because no triangle exists with those side lengths.

Are area units squared?

Yes. If the side lengths are in centimeters, the area is in square centimeters; if they are in feet, the area is in square feet.

Is my data private?

Yes—100% client-side.

Explore more tools