About the Triangle Calculator
Surveying, roof pitches, navigation and trigonometry homework all involve working out unknown sides and angles of triangles. This triangle calculator solves any triangle from three suitable measurements and reports every side and angle, the perimeter, the area and whether it is acute, right or obtuse: sides of 5, 6 and 7 enclose an area of about 14.70 square units, by Heron's formula.
The tools are the law of cosines and the law of sines. The law of cosines, c² = a² + b² − 2ab cos C, finds an angle from three sides or the third side from two sides and the included angle. The law of sines, a ÷ sin A = b ÷ sin B = c ÷ sin C, finds the remaining sides once two angles are known. The three angles always add up to 180°, and the area is ½ab sin C. Sides are labelled a, b and c, opposite the angles A, B and C.
Example: sides 3, 4 and 5 give angles of about 36.8699°, 53.1301° and exactly 90°, so the triangle is a scalene right triangle with area 6 and perimeter 12. Sides of 3 and 4 with a 60° angle between them give a third side of √13 ≈ 3.6056 and an area of about 5.1962. Given two angles of 40° and 60° and a side, the third angle must be 80°.
For right triangles only, the Pythagorean theorem calculator is quicker. Individual sine, cosine and tangent values are on the trigonometry calculator, and other shapes are on the area calculator.
How to use the Triangle Calculator
- Choose what you knowPick three sides, two sides and the angle between, or two angles and a side.
- Enter the valuesType the sides in any unit and the angles in degrees.
- Read the solutionSee every side and angle, the area, perimeter and type.
- Explore the detailsSee the heights, the inradius and the circumradius.
Triangle Calculator features
- SSS, SAS, ASA and AAS cases
- All sides and angles
- Area and perimeter
- Type: scalene, isosceles or equilateral; acute, right or obtuse
- Heights, inradius and circumradius
- Checks for impossible triangles
- Law of cosines and sines worked for you
Common uses
- Trigonometry homework
- Surveying and land measurement
- Roof and truss angles in carpentry
- Navigation and bearing problems
- Design and drafting
Solving triangles in the real world: surveying, river widths and roof trusses
Triangles are the workhorses of measurement and construction. Because a triangle's shape is fixed by its sides, triangles keep structures rigid, and because angles and sides are linked by the laws of sines and cosines, they let surveyors measure distances they cannot reach. This guide covers triangulation, a worked example measuring a river's width, the great survey that measured Everest, area formulas and why trusses are made of triangles.
Triangulation
If you know one side of a triangle and two of its angles, you can calculate the other sides. Surveyors use this to measure distances to points they cannot reach directly: they measure a baseline carefully, then measure the angles from each end of the baseline to a distant point. Chains of such triangles once mapped entire countries before satellite positioning existed.
A worked example: measuring a river's width
A surveyor marks two points, A and B, 50 metres apart along a straight riverbank, and sights a tree directly across the river at point C. The angle at A between the bank and the tree is 60 degrees, and at B it is 70 degrees. The third angle, at C, is 180 − 60 − 70 = 50 degrees.
By the law of sines, the distance from A to C is 50 × sin 70° ÷ sin 50°, about 61.3 metres. The river's width is the perpendicular distance from C to the bank, which is 61.3 × sin 60°, about 53.1 metres. The surveyor never had to cross the river.
Measuring Everest
The Great Trigonometrical Survey of India, begun in 1802, used triangulation across the subcontinent with remarkable precision. From stations on the plains, surveyors measured angles to distant Himalayan peaks, and in 1856 announced that the mountain then known as Peak XV was the highest in the world, at 29,002 feet. Modern measurements put Everest at 8,849 metres, about 29,032 feet, remarkably close to the survey's result.
Why trusses use triangles
A rectangle made of four bars can be pushed out of shape into a parallelogram, but a triangle cannot change shape without changing the length of a side. That rigidity is why roof trusses, bridges, cranes and bicycle frames are built from triangles. Engineers calculate the forces in each member using the angles of the triangles, which makes triangle-solving a daily task in structural design.
Area without the height
The familiar area formula, half base times height, needs the perpendicular height, which is often unknown. Two alternatives avoid it. With two sides and the angle between them, the area is half of a × b × sin C. With all three sides, Heron's formula gives the area directly. Both are useful for irregular land plots split into triangles.
Checking a triangle is possible
Any two sides of a triangle must add up to more than the third. Measurements that break this rule, such as sides of 3, 4 and 8 metres, cannot form a triangle, which usually means a measurement or a note is wrong. Checking this before calculating saves confusion.
Angles always add to 180 degrees
The angles inside a flat triangle always total 180 degrees. If two angles are measured, the third follows, and if all three are measured, their sum checks the measurements: a total of 181 or 179 degrees shows how much measurement error there is. On the curved surface of the Earth, very large triangles have angles that add up to slightly more than 180 degrees, which surveyors of large areas had to account for.
Common mistakes
- Using the law of sines with an angle that is not opposite the known side.
- Leaving a calculator in radian mode.
- Forgetting the ambiguous case when two sides and a non-included angle are known.
- Using a slanted side as the height in the area formula.
Related tools
For right triangles, use Pythagorean Theorem Calculator. For trigonometric functions, try Trigonometry Calculator, and for areas of other shapes, Area Calculator.
Measuring angles with a phone
Many phones include, or can install, an inclinometer or level app that measures angles using the built-in motion sensors. For rough surveys, such as estimating the height of a tree from a known distance, these apps are surprisingly useful: stand 20 metres away, measure the angle to the top, and multiply 20 by the tangent of the angle, then add your eye height. Accuracy is limited to a degree or so, so treat the results as estimates.
Triangles on sloping ground
Measurements on sloping ground need care, because distances measured along a slope are longer than the horizontal distances used in plans. A tape laid along a 10-degree slope reads about 1.5% more than the horizontal distance. Surveyors either measure horizontally or correct their slope measurements using the slope angle, which is itself a right-triangle calculation.
Limits
Results are computed with full precision; accuracy depends on the measurements entered.
Frequently asked questions
How do I solve a triangle with three sides?
Use the law of cosines to find one angle, cos A = (b² + c² − a²) ÷ 2bc, then another the same way, and subtract both from 180° for the third. This calculator does every step.
What is the law of sines?
a ÷ sin A = b ÷ sin B = c ÷ sin C. Each side divided by the sine of its opposite angle gives the same value, which is twice the radius of the circumscribed circle.
What is the law of cosines?
c² = a² + b² − 2ab cos C. It generalizes the Pythagorean theorem to any triangle; when C is 90°, cos C = 0 and it becomes c² = a² + b².
Why can't some sides form a triangle?
By the triangle inequality, each side must be shorter than the other two added together. Sides 2, 3 and 6 fail, because 2 + 3 is less than 6, so the ends cannot meet.
What is the difference between SAS and SSA?
In SAS the known angle is between the two known sides, which fixes the triangle. In SSA the angle is not between them, which can give two different triangles or none, the so-called ambiguous case.
How do I find the area of a triangle from its sides?
Use Heron's formula: with s = (a + b + c) ÷ 2, the area is √(s(s − a)(s − b)(s − c)). For sides 3, 4 and 5, s = 6 and the area is √36 = 6.
How do I know if a triangle is acute, right or obtuse?
Compare the square of the longest side with the sum of the squares of the others. Equal means right, smaller means acute and larger means obtuse. The calculator also checks the angles directly.