Triangle Calculator

Triangles are the most fundamental shape in geometry, and solving them means finding all six measurements: three sides and three angles.

Given any three of these values (with at least one side), you can determine the rest using trigonometric laws. This triangle calculator does exactly that, taking your known values and computing every unknown side, angle, area, and perimeter.

Enter any valid combination of sides and angles, and the calculator applies the appropriate law (Pythagorean theorem, law of sines, or law of cosines) to solve the triangle completely. It handles right triangles, acute triangles, obtuse triangles, equilateral triangles, and isosceles triangles. Results include all six measurements plus the area, perimeter, and a visual diagram of the solved triangle.

Whether you are a student working through trigonometry homework, an engineer calculating structural angles, a surveyor measuring land, or a hobbyist building something that involves angled cuts, this tool eliminates the tedious multi-step trigonometry and gives you complete results instantly.

How to Solve a Triangle

Solving a triangle means finding all unknown sides and angles from the known values. The method depends on what information you start with.

Right triangles (one 90-degree angle) can be solved using the Pythagorean theorem and basic trigonometric ratios:

  • Pythagorean theorem: a^2 + b^2 = c^2, where c is the hypotenuse.
  • SOH-CAH-TOA:
  • sin(A) = opposite / hypotenuse
  • cos(A) = adjacent / hypotenuse
  • tan(A) = opposite / adjacent

Non-right triangles require the law of sines or the law of cosines:

  • Law of sines: a/sin(A) = b/sin(B) = c/sin(C)
  • Law of cosines: c^2 = a^2 + b^2 – 2ab x cos(C)

This calculator automatically determines which law to apply based on your input and shows the method used in the step-by-step solution.

Common Input Combinations

SSS (Three sides known). When you know all three sides, use the law of cosines to find each angle. First solve for one angle, then use the law of cosines or sines for the second, and subtract both from 180 degrees for the third.

Example: Sides a=5, b=7, c=9. cos(C) = (5^2 + 7^2 – 9^2) / (2 x 5 x 7) = (25 + 49 – 81) / 70 = -7/70 = -0.1 C = arccos(-0.1) = 95.74 degrees.

SAS (Two sides and the included angle). Use the law of cosines to find the third side, then the law of sines to find the remaining angles.

Example: a=6, b=8, angle C=60 degrees. c^2 = 36 + 64 – 2(6)(8)cos(60) = 100 – 48 = 52 c = sqrt(52) = 7.21

ASA (Two angles and the included side). Find the third angle by subtracting from 180 degrees, then use the law of sines to find the remaining sides.

Example: A=40, B=60, c=10. C = 180 – 40 – 60 = 80 degrees. a = 10 x sin(40)/sin(80) = 6.53

AAS (Two angles and a non-included side). Similar to ASA. Find the third angle, then use the law of sines.

SSA (Two sides and a non-included angle). This is the ambiguous case. There may be zero, one, or two valid triangles. The calculator checks for all possibilities and presents the valid solution(s).

The Ambiguous Case (SSA)

When given two sides and an angle opposite one of them, the triangle may not be uniquely determined. This is known as the ambiguous case of the law of sines.

Given side a, side b, and angle A (opposite side a):

  • No triangle: If a < b x sin(A), no triangle is possible.
  • One right triangle: If a = b x sin(A), exactly one right triangle exists.
  • Two triangles: If b x sin(A) < a < b, two distinct triangles satisfy the given values.
  • One triangle: If a >= b, exactly one triangle exists.

This calculator detects the ambiguous case and presents all valid solutions. When two solutions exist, both are displayed with complete measurements.

Triangle Area Formulas

The area of a triangle can be calculated using several formulas, depending on what values are known.

Base and height: Area = (1/2) x base x height. The most intuitive formula, but requires knowing the perpendicular height.

Two sides and included angle: Area = (1/2) x a x b x sin(C). Useful when the height is not directly known but the angle between two sides is.

Heron’s formula (three sides known): s = (a + b + c) / 2 (semi-perimeter) Area = sqrt(s(s-a)(s-b)(s-c))

Example: Triangle with sides 5, 7, 9. s = (5 + 7 + 9) / 2 = 10.5 Area = sqrt(10.5 x 5.5 x 3.5 x 1.5) = sqrt(303.1875) = 17.41

This calculator computes the area regardless of which input combination you provide.

Special Triangles

Equilateral triangle. All three sides are equal and all three angles are 60 degrees. Area = (sqrt(3)/4) x s^2, where s is the side length. The height is (sqrt(3)/2) x s.

Isosceles triangle. Two sides are equal and the angles opposite those sides are equal. Only two distinct measurements are needed to solve completely.

Right triangle. One angle is 90 degrees. The side opposite the right angle is the hypotenuse, always the longest side. The Pythagorean theorem applies directly. Common right triangle ratios include 3-4-5, 5-12-13, 8-15-17, and 7-24-25.

30-60-90 triangle. A special right triangle where the sides are in the ratio 1 : sqrt(3) : 2. If the shortest side is x, the hypotenuse is 2x and the other leg is x*sqrt(3).

45-45-90 triangle. An isosceles right triangle where the legs are equal and the hypotenuse is leg x sqrt(2). This appears frequently in architecture and construction.

Real-World Applications

Construction and carpentry. Roof pitch, stair stringers, and angled cuts all involve triangle calculations. A roof with a 6/12 pitch rises 6 inches for every 12 inches of horizontal run, forming a right triangle. The rafter length (hypotenuse) is sqrt(6^2 + 12^2) = sqrt(180) = 13.42 inches per foot of run.

Surveying and navigation. Surveyors use triangulation to measure distances to inaccessible points. By measuring one baseline distance and the angles to a remote point from both ends, they can calculate the distance using the law of sines.

Physics and engineering. Force vectors, velocity components, and structural loads are resolved using triangle geometry. A force applied at an angle is decomposed into horizontal and vertical components using sine and cosine.

Art and design. The golden triangle (an isosceles triangle with a base-to-side ratio of 1:phi) appears in classical art composition, architecture, and graphic design.

Use the Square Root Calculator for computing values that arise in Pythagorean calculations, or the Square Footage Calculator for area applications involving triangular spaces.

Frequently Asked Questions

How do I find the missing side of a triangle?

For right triangles, use the Pythagorean theorem: a^2 + b^2 = c^2. For non-right triangles, use the law of cosines if you know two sides and the included angle, or the law of sines if you know two angles and one side. Enter your known values into this calculator for an instant solution.

How do I find the area of a triangle?

The simplest formula is (1/2) x base x height. If you know two sides and the included angle, use (1/2) x a x b x sin(C). If you know all three sides, use Heron’s formula. This calculator computes the area automatically from any valid input combination.

What is the sum of angles in a triangle?

The interior angles of any triangle always sum to exactly 180 degrees. This is a fundamental property of Euclidean geometry. If you know two angles, the third is 180 minus the sum of the other two.

What is the law of cosines?

c^2 = a^2 + b^2 – 2ab x cos(C), where C is the angle opposite side c. It generalizes the Pythagorean theorem to non-right triangles. When C is 90 degrees, cos(C) = 0 and the formula reduces to the Pythagorean theorem.

What is the ambiguous case?

When given two sides and a non-included angle (SSA), there may be zero, one, or two valid triangles. This ambiguity arises because the law of sines can yield two possible angle values. This calculator detects the ambiguous case and shows all valid solutions.

How do I use the Pythagorean theorem?

For a right triangle with legs a and b and hypotenuse c: c = sqrt(a^2 + b^2). To find a leg: a = sqrt(c^2 – b^2). Example: legs of 3 and 4 give hypotenuse sqrt(9 + 16) = sqrt(25) = 5.

What is a 3-4-5 triangle?

It is the simplest Pythagorean triple, a right triangle with sides of 3, 4, and 5. Any multiple (6-8-10, 9-12-15, etc.) also forms a right triangle. These ratios are used extensively in construction to verify that corners are square.

Data accurate as of: March 2026