School
Triangle Calculator
Solve any triangle from three of its sides and angles: the missing sides and angles, the area, the perimeter and the heights, drawn to scale.
Enter three of the six values — at least one of them a side — to solve the triangle.
How this calculator works
A triangle has three sides and three angles, and any three of the six, as long as one is a side, are enough to find the rest. The sides are labeled a, b and c, and each angle takes the capital letter of the side opposite it: angle A faces side a.
Which rule is used depends on what you know. With three sides, the law of cosines gives each angle. With two sides and the angle between them, it gives the third side. With two angles and a side, the third angle is 180° minus the other two, and the law of sines gives the remaining sides.
Two sides and an angle that is not between them is the ambiguous case. The unknown side can sometimes swing into two positions, giving two triangles that both fit; sometimes only one fits, and sometimes none. The calculator works out which, and shows both triangles when there are two.
Three angles alone are not enough. They fix the shape but not the size, so at least one side is needed.
The area comes from the three sides by Heron’s formula, in the form W. Kahan published so that it stays accurate for very thin triangles, where the usual form can lose most of its digits.
The formula
Exactly what happens to your numbers, step by step.
Law of cosines
c² = a² + b² − 2ab × cos CFor a third side from two sides and the angle between them, or an angle from three sides.
Law of sines
a ÷ sin A = b ÷ sin B = c ÷ sin CAngles
A + B + C = 180°Area (Heron)
s = (a + b + c) ÷ 2 area = √(s(s − a)(s − b)(s − c))
A worked example
A triangle with sides of 7, 8 and 9.
What you enter
- Side a
- 7
- Side b
- 8
- Side c
- 9
Step by step
- Angle A
- cos A = (8² + 9² − 7²) ÷ (2 × 8 × 9) = 96 ÷ 144, so A = 48.1897°
- Angle B
- cos B = (7² + 9² − 8²) ÷ (2 × 7 × 9) = 66 ÷ 126, so B = 58.4119°
- Angle C
- 180° − A − B = 73.3985°
- Half the perimeter
- s = 24 ÷ 2 = 12
- Area
- √(12 × 5 × 4 × 3) = √720 = 26.8328
Area 26.8328, with angles of 48.1897°, 58.4119° and 73.3985°
All three angles are under 90°, so it is an acute triangle, and no two sides are equal, so it is scalene.
Assumptions
Every result here rests on these. Change your inputs and the result changes with them.
- Angles are in degrees. Sides can be in any unit, as long as all three use the same one; the area is then in that unit squared.
- A flat triangle, on a plane.
- Results are shown to four decimal places.
What this cannot tell you
- It solves from exactly three values. If you know more, enter any three, and check the others against the result.
- Measured values carry measurement error. In a long, thin triangle, a small error in an angle can change the sides a lot.
Questions people ask
How do I find the third side of a right triangle?
Use the Pythagorean theorem: c² = a² + b². For sides of 3 and 4 around the right angle, the third side is √25 = 5. Here, enter them as sides a and b, and 90 for angle C.
How do I find the area of a triangle from its sides?
Use Heron’s formula. Halve the perimeter to get s, then multiply s by its difference from each side and take the square root. For sides of 5, 5 and 6, s is 8 and the area is √(8 × 3 × 3 × 2) = 12.
Why does the calculator show two triangles?
With two sides and an angle that is not between them, the third side can meet the base in two places, and both triangles fit what you entered. It happens only when the side opposite the known angle is shorter than the other known side. Another measurement, or a sketch, tells you which is yours.
What are the types of triangle?
By sides: equilateral (all three equal), isosceles (two equal) or scalene (none equal). By angles: acute (all under 90°), right (one exactly 90°) or obtuse (one over 90°). The calculator reports both.
Related calculators
- Square Footage CalculatorArea of rectangles, circles, triangles and multi-room layouts.Home
- Roofing CalculatorRoof area, squares and shingle bundles from footprint and pitch.Home
- Fraction CalculatorAdd, subtract, multiply and divide fractions and mixed numbers, with every step shown.School
- Percentage CalculatorEvery common percentage question in one place, including change and reverse.Everyday
- Pythagorean Theorem CalculatorThe missing side of a right triangle from the other two, with the exact square root, the angles and every step.School
Sources and review
Sources
Methodology version 1.0.0 · Last reviewed
Cite this calculator
For coursework, a resource list or your own site. How every calculator is built and checked is set out on the methodology page.
Citation
Chalk Calculator. (2026, October 1). Triangle Calculator (Methodology version 1.0.0). https://chalkcalculator.com/triangle-calculator/Link to it from your site
<a href="https://chalkcalculator.com/triangle-calculator/">Triangle Calculator</a> from Chalk Calculator