Skip to content

Triangle Calculator

Solve a triangle from any three values including at least one side — sides, angles, area, perimeter, heights, medians, inradius, circumradius and vertex coordinates.

Enter three values including at least one side, then calculate. In radians you can write pi/2 or pi/4.

°
°
°

Example

This is a sample result, not your calculation. Enter your own values to replace it.

Enter any three values — including at least one side — then calculate to solve the triangle.

Check your entries

Enter exactly three values, including at least one side.

How to use this calculator

  1. Fill in any three of the six fields — sides a, b, c and angles A, B, C — including at least one side. The fields sit on the diagram, so each one is beside the part it measures.
  2. Choose degrees or radians for the angles. In radians you can type pi/2 or pi/4 as well as a decimal.
  3. Calculate to see every remaining side and angle, plus the area, perimeter, heights, medians, inradius, circumradius and vertex coordinates, with the triangle drawn to scale.
  4. If your values cannot form a triangle, the calculator says so rather than returning a nonsense result.

The five cases, and why one of them has two answers

Which three values you give decides how the triangle is solved. Four of the five cases have exactly one answer:

  • SSS — three sides. Each angle follows from the law of cosines.
  • SAS — two sides and the angle between them. The third side follows from the law of cosines.
  • ASA — two angles and the side between them. The third angle is 180° minus the other two, then the law of sines gives the sides.
  • AAS — two angles and a side that is not between them. Same route as ASA.

The fifth is different. SSA — two sides and an angle that is not between them — can describe two triangles: the side opposite the given angle can swing down to meet the base in two places, giving one shallow triangle and one deep one. This is the ambiguous case, and it is a fact about the geometry rather than a fault in the arithmetic. Where it happens, the calculator shows both triangles instead of quietly choosing one. It can also describe no triangle at all, when that side is too short to reach.

What the calculator works out

Once the triangle is solved, everything else follows: the area by Heron's formula, the perimeter by adding the sides, the height to each side, the median to each side, the inradius and circumradius, and the coordinates of the vertices, centroid, incentre and circumcentre — with vertex A at the origin and B along the x-axis.

The formulas

Each angle comes from the law of cosines, rearranged to solve for the angle opposite a chosen side. For angle A, opposite side a:

cos A = (b2 + c2 − a2) / (2 × b × c)

The area uses Heron's formula, where s is the semi-perimeter (half the perimeter):

s = (a + b + c) / 2  →  Area = √(s(s − a)(s − b)(s − c))

  • a, b, c — the three side lengths
  • A — the angle opposite side a (each angle is found the same way, then the third is 180° minus the other two)
  • Law of sines — a ÷ sin A = b ÷ sin B = c ÷ sin C, which is what solves the cases that start from an angle
  • s — the semi-perimeter, (a + b + c) ÷ 2

When three values form a valid triangle

Not every trio closes into a triangle. The triangle inequality requires each side to be shorter than the sum of the other two — otherwise the two shorter sides cannot reach across the longest one. Sides of 2, 3 and 10 fail this test. Angles must leave room for a third, so any two of them must total less than 180°. And at least one value must be a side: three angles fix a triangle's shape but say nothing about its size, so there would be infinitely many answers. In each case the calculator says what is wrong rather than inventing a number.

A worked example: the 3-4-5 triangle

Enter sides of 3, 4 and 5. For the smallest angle, cos A = (42 + 52 − 32) / (2 × 4 × 5) = 32 / 40 = 0.8, so A ≈ 36.87°; the same method gives 53.13° and, because they must total 180°, a final angle of exactly 90°. Heron's formula gives s = 6 and an area of √(6 × 3 × 2 × 1) = √36 = 6. Since 32 + 42 = 52, this is the smallest whole-number right triangle — which is why builders use a 3-4-5 to square up corners.

Classifying triangles

The calculator labels every triangle two ways at once:

By sidesBy angles
Equilateral — all three sides equalRight — one 90° angle
Isosceles — two sides equalAcute — every angle under 90°
Scalene — all three sides differentObtuse — one angle over 90°

The two labels are independent. Sides of 5, 5 and 8, for example, are isosceles yet obtuse: the angle opposite the long side is cos-1(−0.28) ≈ 106.26°, and Heron's formula still gives a clean area of 12.

For general trigonometry — sine, cosine and tangent on their own — the scientific calculator handles them directly, and the area calculator covers a triangle from a base and height instead of three sides.

Frequently asked questions

How do you find the angles of a triangle from its sides?

Use the law of cosines. For each angle, the cosine equals (sum of the squares of the two adjacent sides minus the square of the opposite side) divided by twice the product of the adjacent sides. This calculator does it for all three angles.

How is the area calculated?

The calculator first solves the triangle so it knows all three sides, then uses Heron's formula: with s as half the perimeter, area = √(s(s−a)(s−b)(s−c)).

What makes three lengths a valid triangle?

The triangle inequality: each side must be shorter than the sum of the other two. If not, no triangle can be formed and the calculator flags it. Angles must also total less than 180° between any two of them, and you must give at least one side — three angles fix the shape but not the size.

How do I know if a triangle is right-angled?

Check whether the squares of the two shorter sides add up to the square of the longest side (the Pythagorean theorem). A 3-4-5 triangle is right-angled because 3² + 4² = 9 + 16 = 25 = 5². The calculator classifies each triangle as right, acute or obtuse for you.

How do I find the area of a triangle?

The area is ½ × base × height when you know the base and its perpendicular height. This calculator works from any three of the six values — sides a, b, c and angles A, B, C — so it can reach the area from three sides, from two sides and an angle, or from one side and two angles.

What are the different types of triangles?

By sides: equilateral (all three equal), isosceles (two equal) or scalene (all different). By angles: right (one 90° angle), acute (all angles under 90°) or obtuse (one angle over 90°). The calculator labels both for any triangle you enter.

Can two different triangles have the same measurements?

Yes. If you give two sides and an angle that is NOT between them, there can be two answers — the side opposite the angle can swing to meet the base in two places, giving a shallow triangle and a deep one. This is called the ambiguous case, and the calculator shows both triangles rather than picking one.

What can I enter into the calculator?

Any three of the six values — sides a, b and c, and angles A, B and C — as long as at least one is a side. That covers all the standard cases: three sides (SSS), two sides and the angle between them (SAS), two angles and a side (ASA or AAS), and two sides with a non-included angle (SSA). Angles can be degrees or radians, and in radians you can write pi/2 or pi/4.

About this calculator

Method reviewed for accuracy on July 25, 2026

Built on transparent, unit-tested formulas that run entirely in your browser — see how we build our calculators.

Embed this calculator on your site — free

Add this free, mobile-friendly Triangle Calculator to your own website. Paste the code where you want it to appear — it stays up to date automatically, and the frame resizes to fit.

Please keep the attribution link — it's what keeps these tools free to use and embed.