Math calculator

Triangle Calculator

This triangle calculator solves any triangle, not just right-angled ones, from three known parts. Pick SSS, SAS, ASA, or AAS, enter your numbers, and you'll get every side, all three angles, the area, and the perimeter, plus a scaled diagram that redraws to match. It runs the law of cosines and the law of sines behind the scenes, and it shows the steps so the method stays clear.

  • Any triangle, not just right
  • SSS, SAS, ASA, AAS
  • All sides and angles
  • Area and perimeter
  • Scaled diagram

Last updated July 22, 2026 Law of sines and cosines Reviewed by the Calcowa math team

What do you know?

Side a sits opposite angle A, side b opposite B, side c opposite C.

Your triangle to scale
Area
26.83

Scalene, acute

Angle A
48.19°
Angle B
58.41°
Angle C
73.40°
Side a
7
Side b
8
Side c
9
Perimeter
24
The steps

A = cos⁻¹((8² + 9² − 7²) ÷ (2·8·9)) = 48.19°

The basics

What you need to solve a triangle

A triangle has six parts, three sides and three angles, and the neat thing is you only need three of them to lock down all six, as long as one of the three is a side. Sides are labeled a, b, and c, and each angle takes the capital of the side across from it, so angle A faces side a. The three angles always add to 180 degrees, and that single fact does a lot of the work here. The one setup that fails is three angles alone, because that fixes the shape but leaves the size free to grow or shrink.

A + B + C = 180°,   a ÷ sin A = b ÷ sin B = c ÷ sin C
The four solvable setups

SSS, SAS, ASA, and AAS

Each of these four combinations pins down exactly one triangle, so the calculator can solve any of them. The trick is choosing the right law to start with, and the table lays that out.

SetupWhat you knowHow it solves
SSS All three sides Law of cosines for each angle
SAS Two sides and the angle between them Law of cosines for the third side
ASA Two angles and the side between them Angles sum to 180, then law of sines
AAS Two angles and a side not between them Angles sum to 180, then law of sines
Worked example

How the triangle calculator solves it

Take a triangle with sides a = 7, b = 8, and c = 9, an SSS problem. Here's how every part falls out:

  1. 1

    Find angle A with the law of cosinesA = cos⁻¹((b² + c² − a²) ÷ 2bc) = cos⁻¹((64 + 81 − 49) ÷ 144) = 48.19°.

  2. 2

    Find angle B the same wayB = cos⁻¹((a² + c² − b²) ÷ 2ac) = cos⁻¹((49 + 81 − 64) ÷ 126) = 58.41°.

  3. 3

    Find angle C from the angle sumC = 180 − 48.19 − 58.41 = 73.40°, since the three angles add to 180.

  4. 4

    Get area and perimeterHeron: s = (7 + 8 + 9) ÷ 2 = 12, area = √(12·5·4·3) = 26.83, perimeter = 24.

Area without a height

Two ways to get the area

You rarely have a clean height to plug into ½ × base × height, so the solver leans on two formulas that skip it. With three sides in hand, Heron's formula uses the semi-perimeter s = (a + b + c) ÷ 2 and gives area = √(s(s − a)(s − b)(s − c)). With two sides and the angle between them, the shortcut area = ½ × b × c × sin A does the job in one line. Whichever three parts you enter, the calculator has enough to report the area, so you never measure a perpendicular by hand.

Familiar shapes

Special triangles it detects

Some triangles turn up so often they earn a name, and the solver labels them when your numbers match, so you get a quick sanity check on the shape.

TriangleWhat it isThe rule
Equilateral All sides equal Every angle is 60 degrees
Isosceles Two sides equal The two base angles are equal
Right One 90 degree angle Sides obey a squared + b squared = c squared
45-45-90 Right and isosceles Legs equal, hypotenuse = leg times root 2
30-60-90 Half an equilateral Sides in the ratio 1 : root 3 : 2

Working with a 90 degree corner? The right triangle calculator solves straight from two legs, and the Pythagorean theorem calculator finds a missing side.

FAQ

Frequently asked questions

You need three pieces of information, and at least one has to be a side, since angles alone only fix the shape and not the size. The four solvable setups are SSS (three sides), SAS (two sides and the angle between them), ASA (two angles and the side between them), and AAS (two angles and a side beside them). From any of those, the law of cosines and the law of sines give every other side and angle. This triangle calculator picks the right law for whichever setup you choose and fills in the rest.

The law of cosines links all three sides to one angle, so it shines when you know three sides (SSS) or two sides and the included angle (SAS). The law of sines links a side to the angle across from it, a ÷ sin A = b ÷ sin B = c ÷ sin C, so it is quickest once you have a matching side and angle pair, which is the case for ASA and AAS. The calculator uses the cosine rule to open up an SSS or SAS triangle, then the sine rule to finish it.

They are shorthand for which three parts you know. SSS is three sides, SAS is two sides with the included angle between them, ASA is two angles with the included side between them, and AAS is two angles and a side that sits beside one of them. Each of these fixes exactly one triangle, so the calculator can solve it without any guessing.

No, and that is the one setup with no single answer. Three angles (AAA) set the shape but not the scale, so infinitely many triangles share them, from tiny to huge. You always need at least one side length to pin down the size. If you only have angles, measure or estimate one side, then use ASA or AAS.

SSA is when you know two sides and an angle that is not between them, and it can give zero, one, or two valid triangles depending on the numbers. Because it does not always have a single answer, this solver sticks to the four setups that do (SSS, SAS, ASA, AAS). If you have an SSA situation, sketch it out, since the side opposite the known angle may swing to two positions.

Two ways cover it. With all three sides, Heron's formula uses the semi-perimeter s = (a + b + c) ÷ 2, then area = root of s(s − a)(s − b)(s − c). With two sides and the angle between them, area = ½ × b × c × sin A. The calculator reports the area from whatever you enter, so you never need to measure a height.

Use the triangle inequality: each side has to be shorter than the other two added together. So a + b must beat c, a + c must beat b, and b + c must beat a. If any side is as long as or longer than the sum of the other two, the sides cannot close into a triangle, and the calculator flags it instead of returning a nonsense answer.

Yes. This one solves any triangle, right-angled or not, from the four standard setups. If your triangle has a 90 degree angle, the dedicated right triangle calculator is a faster path, since it works straight from two legs or a leg and the hypotenuse. This general solver still handles a right triangle, and it labels one when it spots the 90 degrees, but it is built for the oblique triangles a right-angle tool cannot touch.

Keep going

Related calculators

More tools for triangles and shapes.

Solving a triangle?

Pick a setup above, enter three parts, or browse the full math hub.

Math tools