Triangle Calculator (Advanced) Formula

Understand the math behind the triangle calculator (advanced). Each variable explained with a worked example.

Formulas Used

Area (Heron's)

area = sqrt(s * (s - side_a) * (s - side_b) * (s - side_c))

Perimeter

perimeter = side_a + side_b + side_c

Inradius

inradius = sqrt(s * (s - side_a) * (s - side_b) * (s - side_c)) / s

Variables

VariableDescriptionDefault
side_aSide a5
side_bSide b6
side_cSide c7
sDerived value= (side_a + side_b + side_c) / 2calculated

How It Works

Triangle Area via Heron's Formula

Formula

s = (a + b + c) / 2 (semi-perimeter)

Area = sqrt(s × (s-a) × (s-b) × (s-c))

Heron's formula computes the area of any triangle when you know all three side lengths, without needing height or angles.

Inradius

The inradius (radius of the inscribed circle) is: r = Area / s

Worked Example

Triangle with sides 5, 6, 7.

side_a = 5side_b = 6side_c = 7
  1. 01s = (5+6+7)/2 = 9
  2. 02Area = √(9 × 4 × 3 × 2) = √216 ≈ 14.6969
  3. 03Inradius = 14.6969 / 9 ≈ 1.6330

Frequently Asked Questions

What is Heron's formula?

Heron's formula calculates the area of a triangle from the lengths of its three sides, using the semi-perimeter. No angles or heights are needed.

When does Heron's formula not work?

The three sides must satisfy the triangle inequality (each side must be less than the sum of the other two). If not, the three lengths cannot form a triangle.

What is the inradius?

The inradius is the radius of the largest circle that fits entirely inside the triangle (the inscribed circle). It equals the area divided by the semi-perimeter.

Ready to run the numbers?

Open Triangle Calculator (Advanced)