Geometry & trigonometry

Triangle Calculator

Give any three measurements that include at least one side and the calculator solves the whole triangle: every side, every angle, area, perimeter, heights, inradius and circumradius. It names the case it detected, draws the triangle to scale, shows the law of sines or cosines it used, and flags the ambiguous SSA case when two valid triangles exist.

SSS, SAS, ASA, AAS, SSA Scaled drawing Shows the working Runs in your browser
Detected caseSSS — three sides

Sides and angles

Given
Given
Given
Solved
Solved
Solved
Side a sits opposite angle A, b opposite B, c opposite C. Fill any three boxes including at least one side; the three you typed most recently are treated as given.
Scaled drawing of the solved triangle with sides and angles labelled
Solved

A valid triangle was found from your three measurements.

Area–square units
Perimeter–a + b + c
Triangle type–by angle
Semiperimeter–s = P / 2
Height to a–2 × area ÷ a
Height to b–2 × area ÷ b
Inradius–inscribed circle
Circumradius–circumscribed circle

The working, step by step

    Calculated locally in your browser; nothing is uploaded or stored. Sides are unitless, so any consistent unit works. Displayed values are rounded, while the drawing and every derived figure use full precision.

    Which rule applies

    The five cases for solving a triangle

    Three measurements determine a triangle, provided at least one of them is a side. Which three you have decides whether you reach for the law of sines or the law of cosines.

    CaseYou knowMethodSolutions
    SSSAll three sidesLaw of cosines for the first angle, then again or the law of sinesOne, if the triangle inequality holds
    SASTwo sides and the angle between themLaw of cosines for the third side, then the law of sinesExactly one
    ASATwo angles and the side between themThird angle from the 180° sum, then the law of sinesExactly one
    AASTwo angles and a side not between themThird angle from the 180° sum, then the law of sinesExactly one
    SSATwo sides and an angle not between themLaw of sines, then check the supplementary angleZero, one or two — the ambiguous case
    AAAThree angles onlyNot solvable for sizeInfinitely many similar triangles
    Built differently

    Why this triangle calculator is better

    Most triangle solvers make you choose the case first, then hand back six numbers. The case is the part students get wrong, and the numbers are the part they cannot check.

    No case selection needed

    Type into any three boxes and the calculator works out whether you have SSS, SAS, ASA, AAS or SSA, names it, and applies the right rule. Change your mind and it re-detects instantly.

    It shows the working

    Each step is written out with your numbers substituted in, including which law was used and why. That is what earns marks, and it is what turns an answer into an explanation.

    Handles the ambiguous case properly

    SSA can produce two valid triangles. Rather than silently picking one, the calculator tells you when a second solution exists and lets you switch to it with a single tap.

    Drawn to scale

    The triangle is rendered with proportional sides and labelled angles, redrawn as you type, so an impossible set of measurements looks wrong before you finish reading the error.

    Everything, not just sides

    Area, perimeter, semiperimeter, the height to each side, inradius, circumradius and the classification by both angle and side length are all returned together.

    Fast, private, mobile ready

    Degrees or radians, no accounts, no tracking, no heavy libraries. A few kilobytes of vanilla JavaScript that loads instantly the night before an exam.

    Step by step

    How to use the triangle calculator

    Four steps, and everything updates as you type.

    1

    Match the labels to your diagram

    Lowercase letters are sides, uppercase are angles, and each side sits opposite the angle with the same letter. Relabel your sketch first if it does not match.

    2

    Enter any three values

    At least one must be a side. Three angles alone fix the shape but not the size, so the calculator will ask for a length.

    3

    Check the detected case

    The header names the case. Given values are highlighted in pink, solved values in indigo, so you can always see what came from you and what came from the maths.

    4

    Read the working and copy

    Follow the numbered steps to see how each result was reached, switch to the second solution if the SSA case offers one, then copy the whole solution.

    Good to know

    Rules every triangle obeys

    A handful of constraints explain almost every error message a triangle solver can produce.

    • The angles always sum to 180°

      In plane geometry the three interior angles total exactly 180 degrees, or π radians. Two angles therefore always give you the third for free.

    • The triangle inequality

      Any two sides added together must exceed the third. Sides of 2, 3 and 9 cannot close into a triangle no matter how they are arranged.

    • The largest angle faces the longest side

      Order is preserved: the biggest side sits opposite the biggest angle. It is the quickest sanity check on any solved triangle.

    • Law of sines

      a ÷ sin A = b ÷ sin B = c ÷ sin C. Use it whenever you have a matched side and angle pair.

    • Law of cosines

      c² = a² + b² − 2ab·cos C. It generalises Pythagoras, which is just the special case where C is 90 degrees.

    • Heron’s formula

      Area = √(s(s−a)(s−b)(s−c)) where s is the semiperimeter. It gives the area from three sides with no angle needed.

    Questions

    Triangle calculator FAQ

    What people ask when a triangle refuses to solve.

    How do you solve a triangle with three sides?

    Use the law of cosines rearranged for an angle: cos A = (b² + c² − a²) ÷ 2bc. Take the inverse cosine to get A, repeat for B, then subtract both from 180 degrees to get C.

    Before you start, check the triangle inequality. If any one side is greater than or equal to the sum of the other two, no triangle exists and the inverse cosine will be undefined.

    What is the ambiguous case of SSA?

    When you know two sides and an angle that is not between them, the law of sines gives sin B, and both B and 180° − B can be valid angles. If the side opposite the known angle is shorter than the other known side but long enough to reach the base, two different triangles fit the same three measurements.

    There can also be exactly one solution, when the known angle is obtuse or the triangle is right-angled, or none at all when the side is too short to close. This calculator reports which of the three situations you are in and offers the second triangle when one exists.

    Can you solve a triangle from three angles?

    No. Three angles fix the shape but not the size, so infinitely many similar triangles satisfy them. You need at least one side length to pin down the scale, which is why the calculator asks for one before it will return sides or area.

    How do I find the area of a triangle?

    With a base and its perpendicular height, use half base times height. With two sides and the angle between them, use area = ½ab·sin C. With all three sides, use Heron’s formula: area = √(s(s−a)(s−b)(s−c)) where s is half the perimeter.

    All three give the same result. The calculator uses whichever is exact for the values you entered.

    When do I use the law of sines instead of the law of cosines?

    Use the law of sines when you have a complete side and angle pair, which covers ASA, AAS and SSA. Use the law of cosines when you do not, which covers SSS and SAS. A common workflow is to use cosines once to break in, then sines for the remaining parts because it is easier to compute.

    What is the triangle inequality theorem?

    The sum of any two side lengths must be strictly greater than the third. So a + b > c, a + c > b and b + c > a all have to hold. If the sum equals the third side exactly, the three points fall on a straight line and the triangle is degenerate, with zero area.

    How do I know if a triangle is right, acute or obtuse?

    Compare the square of the longest side with the sum of the squares of the other two. If they are equal the triangle is right-angled, if the longest side squared is smaller it is acute, and if larger it is obtuse. That is the law of cosines viewed from a different angle, and it works without calculating any angle at all.

    What are the inradius and circumradius?

    The inradius is the radius of the largest circle that fits inside the triangle touching all three sides, found from area divided by the semiperimeter. The circumradius is the radius of the circle passing through all three vertices, found from abc divided by four times the area. Both appear constantly in olympiad geometry and in engineering layout work.

    Solve the whole triangle in one go

    Three measurements in, six out, plus area, heights and radii, the case named and the working shown. Type your values and read the answer.

    Solve a triangle now
    Scroll to Top