↑↓ to move ↵ to open Esc to close Browse all tools

Triangle Calculator

Enter any three values of a triangle, at least one of them a side. You get the missing sides and angles, the area, heights, radii, the type of triangle, every step and a drawing.

Your triangle

Sides
Angles in degrees
Fill in any three values, at least one side. Angle A sits opposite side a, B opposite b, C opposite c.
Case

Try an example
Sides
Angles
Area
Perimeter
Type
Inradius r
Circumradius R
Semiperimeter s
From vertexHeightMedianAngle bisector
The triangle, drawn to scale

Step by step

    Runs on your device. Nothing you enter is sent to a server.

    Triangle Calculator by Freebiefy, free online tools · Privacy · Legal notice

    Embed this tool on your site

    Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content. All tools you can embed

    Sides, angles and how they are named

    A triangle has three sides and three angles. The calculator uses the usual names: the corners are A, B and C, the angle at each corner has the same letter, and each side gets the small letter of the corner across from it. So side a lies opposite angle A, side b opposite B and side c opposite C. The three angles always add up to 180°, or π in radians, which Proposition 32 in Book I of Euclid's Elements proves.

    Three values pin a triangle down, as long as one of them is a side. Which three you know decides how to solve it. The calculator spots the case on its own, so you only fill in what you have.

    CaseWhat you knowHow it is solvedTriangles
    SSSAll three sidesLaw of cosines for the anglesOne, if the sides fit
    SASTwo sides and the angle between themLaw of cosines for the third sideOne
    ASATwo angles and the side between themThird angle, then law of sinesOne
    AASTwo angles and a side that is not between themThird angle, then law of sinesOne
    SSATwo sides and an angle that is not between themLaw of sines, then check both anglesNone, one or two
    AAAThree angles onlyNot solvableEndless, all the same shape

    The law of sines and the law of cosines

    Two formulas do almost all of the work. The law of cosines is the Pythagorean theorem with a correction for angles other than 90°. The law of sines says that every side divided by the sine of its opposite angle gives the same number, which is also the diameter of the circle through all three corners.

    Law of cosines
    c² = a² + b² − 2ab cos C
    Angle from three sides
    cos C = (a² + b² − c²) ÷ 2ab
    Law of sines
    a ÷ sin A = b ÷ sin B = c ÷ sin C = 2R

    Worked example (SAS): sides a = 5 and b = 7 with the angle C = 49° between them. The law of cosines gives c² = 25 + 49 − 70 × cos 49° ≈ 28.0759, so c ≈ 5.2987. Then cos A = (b² + c² − a²) ÷ 2bc gives A ≈ 45.41°, and B = 180° − 49° − A ≈ 85.59°. The area is about 13.2074.

    The ambiguous case: two sides and an angle

    When you know two sides and an angle that is not between them, the answer is not always unique. Take a = 6, b = 8 and A = 35°. The law of sines gives sin B = b × sin A ÷ a = 8 × sin 35° ÷ 6 ≈ 0.7648. Two angles below 180° have that sine: B ≈ 49.89° and B ≈ 130.11°. Both leave room for a third angle, so two triangles fit:

    ValueTriangle 1Triangle 2
    Angle B49.89°130.11°
    Angle C95.11°14.89°
    Side c10.4192.6874
    Area23.90456.1657

    Picture side b fixed at corner C and side a swinging from its other end. If a is shorter than the height b × sin A, it never reaches the third side and no triangle exists. If it is exactly that long, it meets the third side at a right angle: one triangle. If it is longer than the height but shorter than b, it touches the third side at two points: two triangles. If it is at least as long as b, only one of those points lies on the right side of A: one triangle. When the given angle is 90° or more, the side across from it has to be the longest, otherwise there is no triangle. The calculator runs through these checks and shows both triangles when there are two, with a switch to pick the one you need.

    Area, heights and the two circles

    Once all sides are known, the calculator finds the area with Heron's formula, which needs no angles and no height:

    Heron's formula
    K = √(s(s − a)(s − b)(s − c))
    Semiperimeter
    s = (a + b + c) ÷ 2
    Area from an angle
    K = ½ ab sin C

    For sides 7, 8 and 9, s = 12 and K = √(12 × 5 × 4 × 3) = √720 ≈ 26.8328. The other values follow from the area:

    • Height onto a side: h = 2K ÷ side. Onto side 7 that is 7.6665.
    • Inradius, the radius of the largest circle inside: r = K ÷ s = 2.2361.
    • Circumradius, the radius of the circle through all three corners: R = abc ÷ 4K = 4.6957.
    • Median from a corner to the middle of the opposite side: ma = ½ √(2b² + 2c² − a²).
    • Angle bisector from a corner: ta = 2bc cos(A ÷ 2) ÷ (b + c).

    Types of triangles

    By sidesRuleBy anglesRule
    EquilateralAll three sides equal, all angles 60°AcuteAll angles below 90°
    IsoscelesTwo sides equal, and the two angles across from themRightOne angle of exactly 90°
    ScaleneAll sides differentObtuseOne angle above 90°

    For a triangle with a right angle, the Pythagorean theorem calculator gives exact square-root answers, like 2√13 instead of 7.2111. Switch this calculator to Right triangle when you know one leg and an angle, or the hypotenuse and an angle: the angle C is then fixed at 90° and two values are enough. For single sines, cosines and arctangents, use the scientific calculator.

    When no triangle fits

    The calculator checks your values before it solves, and it says what is wrong:

    • Sides too short: any two sides together must be longer than the third, the triangle inequality from Euclid's Proposition I.20. Sides 2, 3 and 6 fail it.
    • Angles too large: two angles that add up to 180° or more leave nothing for the third.
    • Only angles: three angles describe a shape, but every enlarged or shrunk copy has the same angles, so a side is needed for the size.
    • Too many values: four or more values can contradict each other. Keep three and clear the rest.

    How to use the triangle calculator

    1. 1Choose Any triangle, or Right triangle when one angle is 90°. Pick degrees or radians for the angles.
    2. 2Type the three values you know, at least one of them a side, and leave the other fields empty. For a right triangle, two values are enough.
    3. 3Read the missing sides and angles at the top, then the area, perimeter, radii, heights and the type. If two triangles fit, switch between them.
    4. 4Check the drawing and the steps, then copy the result or a link that opens the calculator with your values.

    Sources

    Frequently asked questions

    How many values do I need to solve a triangle?

    Three, and at least one of them has to be a side. Three sides (SSS), two sides and the angle between them (SAS), two angles and a side (ASA or AAS) each fix exactly one triangle. Two sides and an angle that is not between them (SSA) can fit zero, one or two triangles. Three angles alone fix only the shape, not the size.

    What is the ambiguous case?

    It is the SSA case: you know two sides and an angle opposite one of them. The law of sines gives the sine of a second angle, and two angles below 180° share that sine, one acute and one obtuse. If both leave room for a positive third angle, two different triangles fit. With a = 6, b = 8 and A = 35°, angle B can be about 49.89° or 130.11°.

    Why does the calculator say my sides do not make a triangle?

    In every triangle, any two sides together are longer than the third. With sides 2, 3 and 6, the two short sides add up to 5, which cannot reach across 6. If the two short sides add up exactly to the long one, the "triangle" is a flat line with no area.

    How do I find the area of a triangle from three sides?

    Use Heron's formula. Take half the perimeter, s = (a + b + c) ÷ 2, then area = √(s(s − a)(s − b)(s − c)). For sides 7, 8 and 9, s = 12 and the area is √(12 × 5 × 4 × 3) = √720 ≈ 26.83.

    When should I use the law of sines and when the law of cosines?

    Use the law of cosines when you know three sides, or two sides and the angle between them. Use the law of sines when you know an angle and the side opposite it, plus one more value. The calculator picks the right law for each case and shows it in the steps.

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

    Look at its largest angle. Below 90° the triangle is acute, exactly 90° it is right, above 90° it is obtuse. From the sides alone, square them: if the two smaller squares add up to the largest square, the triangle is right; if their sum is larger, it is acute; if smaller, obtuse.

    Can I enter angles in radians?

    Yes. Switch the angle unit to radians, and both the angles you enter and the angles in the result use radians. 90° is π ÷ 2, about 1.5708 radians, and 180° is π, about 3.1416.