NumberSwift.
MATH · GEOMETRY

Triangle Calculator

Solve area, perimeter and angles from three valid sides, or find area from a base and perpendicular height.

YOUR NUMBERS

◎ Calculations stay in your browser.

A LITTLE CLARITY

Triangle area

6 square units
Perimeter12 units
Angle opposite side A36.869898 degrees
Angle opposite side B53.130102 degrees
Angle opposite side C90 degrees

Positive side lengths with strict triangle inequality for three-side mode. Angles use degrees. Base and height alone do not determine perimeter or angles. Floating-point resolution limits extremely near-degenerate triangles.

Formula checked · NumberSwift · Review process

BEHIND THE NUMBERS

How this calculator works

Three side lengths determine an ideal triangle only if every pair sums to more than the third. The tool applies a stable rearrangement of Heron’s formula for area and uses the corresponding cosine/area relationship to find angles opposite A, B and C. Base-and-height mode needs the perpendicular height, not a sloping side. It gives area only because many different triangles share the same base and height.

Formula

Perimeter = a+b+c; s = (a+b+c)/2; area = √(s(s−a)(s−b)(s−c)). Angle A follows cos(A) = (b²+c²−a²)/(2bc). Base-height area = base × perpendicular height/2.

Assumptions & limitations

Positive side lengths with strict triangle inequality for three-side mode. Angles use degrees. Base and height alone do not determine perimeter or angles. Floating-point resolution limits extremely near-degenerate triangles.

Worked example

Sides 3, 4 and 5 give perimeter 12 and area 6 square units. Opposite angles are approximately 36.869898°, 53.130102° and 90°. A separate base of 6 and perpendicular height 4 gives area 12 without determining the remaining sides.

Our approach to calculations ↗
GOOD TO KNOW

Common questions

Why are sides 1, 2 and 3 rejected?

They form a straight degenerate segment, not a triangle with positive area. The sum of any two sides must be greater than the third.

Can base and height determine the perimeter?

No. The location of the top vertex can change side lengths while keeping the same base and perpendicular height.

Which side matches angle A?

Angle A is opposite Side A. The same naming convention applies to B and C.