Triangle Calculator
Calculate all sides, angles, area, and perimeter of any triangle. Solve triangles using SSS, SAS, ASA, AAS, or SSA methods with step-by-step solutions.
Three sides known
Enter the known values above to solve your triangle
The calculator will find all missing sides, angles, area, and perimeter
Related Calculators
About This Calculator
The Triangle Calculator is your complete tool for solving any triangle problem. Whether you know three sides (SSS), two sides and an angle (SAS or SSA), or two angles and a side (ASA or AAS), this calculator finds all missing measurements including sides, angles, area, perimeter, and height.
Triangles are fundamental shapes in geometry, engineering, architecture, and everyday life. From calculating roof pitches and land areas to solving physics problems and designing structures, understanding triangle mathematics is essential. Our free triangle solver uses the Law of Sines, Law of Cosines, and standard geometric formulas to provide accurate results instantly.
Simply select your input method based on what you know about the triangle, enter the values, and get complete solutions including a visual diagram. The calculator automatically identifies whether your triangle is right, equilateral, isosceles, or scalene, and provides all measurements in one comprehensive result.
How to Use the Triangle Calculator
- 1**Select your solve method**: Choose from SSS (three sides), SAS (two sides and included angle), ASA (two angles and included side), AAS (two angles and non-included side), or SSA (two sides and non-included angle) based on what measurements you know.
- 2**Enter the known values**: Input the sides (labeled a, b, c) and/or angles (labeled A, B, C) that you know. Angles are in degrees. Side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C.
- 3**Review the results**: The calculator displays all three sides, all three angles, area, perimeter, and heights. A visual SVG diagram shows your triangle with labeled measurements.
- 4**Check the triangle type**: The calculator automatically classifies your triangle as right (has a 90 degree angle), equilateral (all sides equal), isosceles (two sides equal), or scalene (all sides different).
- 5**Use the diagram**: The interactive SVG visualization helps you understand the triangle geometry and verify your inputs match the expected configuration.
- 6**Handle special cases**: For SSA (ambiguous case), the calculator will indicate if two solutions exist, one solution exists, or no valid triangle is possible.
Formula
Area = (1/2) * base * height = sqrt(s(s-a)(s-b)(s-c)) = (1/2)ab*sin(C)Triangles can be solved using multiple formulas depending on known values. The Law of Cosines (c^2 = a^2 + b^2 - 2ab*cos(C)) finds sides or angles when you have SSS or SAS. The Law of Sines (a/sin(A) = b/sin(B) = c/sin(C)) works for ASA, AAS, and SSA cases. Area can be calculated using base-height, Heron's formula (with semi-perimeter s), or the SAS formula with sine.
Understanding Triangle Types
Triangles are classified by their sides and angles. Understanding these classifications helps you identify properties and choose the right solving approach.
Classification by Sides
Equilateral Triangle
- All three sides are equal (a = b = c)
- All three angles are equal (60 degrees each)
- Has three lines of symmetry
- Most "balanced" triangle possible
- Area formula: A = (sqrt(3)/4) * s^2 where s is the side length
Isosceles Triangle
- Two sides are equal (e.g., a = b, but c is different)
- Two angles are equal (the angles opposite the equal sides)
- Has one line of symmetry
- Common in architecture and design
- The unequal side is called the "base"
Scalene Triangle
- All three sides are different (a != b != c)
- All three angles are different
- No lines of symmetry
- Most general type of triangle
- Requires Law of Cosines or Law of Sines to solve
Classification by Angles
Acute Triangle
- All angles are less than 90 degrees
- The square of the longest side is less than the sum of squares of the other two sides
- All altitudes fall inside the triangle
Right Triangle
- One angle is exactly 90 degrees
- Follows the Pythagorean theorem: a^2 + b^2 = c^2 (where c is the hypotenuse)
- The side opposite the right angle is the longest (hypotenuse)
- Special cases: 45-45-90 and 30-60-90 triangles have predictable ratios
Obtuse Triangle
- One angle is greater than 90 degrees
- The square of the longest side is greater than the sum of squares of the other two sides
- One altitude falls outside the triangle
Triangle Area Formulas
There are several ways to calculate the area of a triangle, depending on what information you have.
Base and Height Method
The most intuitive formula:
Area = (1/2) * base * height
Where:
- base is any side of the triangle
- height (altitude) is the perpendicular distance from the base to the opposite vertex
Example: A triangle with base 10 cm and height 6 cm:
- Area = (1/2) * 10 * 6 = 30 square cm
Heron's Formula (Three Sides Known)
When you know all three sides (SSS), use Heron's formula:
Area = sqrt(s * (s-a) * (s-b) * (s-c))
Where:
- s = (a + b + c) / 2 (the semi-perimeter)
- a, b, c are the three side lengths
Example: A triangle with sides 5, 6, and 7:
- s = (5 + 6 + 7) / 2 = 9
- Area = sqrt(9 * (9-5) * (9-6) * (9-7))
- Area = sqrt(9 * 4 * 3 * 2) = sqrt(216) = 14.7 square units
Two Sides and Included Angle (SAS)
Area = (1/2) * a * b * sin(C)
Where:
- a and b are two sides
- C is the angle between them
Example: Two sides of 8 and 10 with an included angle of 60 degrees:
- Area = (1/2) * 8 * 10 * sin(60)
- Area = 40 * 0.866 = 34.64 square units
Coordinate Method
If you have the coordinates of all three vertices (x1,y1), (x2,y2), (x3,y3):
Area = (1/2) * |x1(y2-y3) + x2(y3-y1) + x3(y1-y2)|
This is useful in computer graphics and surveying applications.
Solving Triangles: SSS, SAS, ASA, AAS, SSA
Different combinations of known sides and angles require different solving methods. Here's a complete guide to each case.
SSS (Side-Side-Side)
Given: All three sides (a, b, c)
Method: Use the Law of Cosines to find angles
- Find angle A: cos(A) = (b^2 + c^2 - a^2) / (2bc)
- Find angle B: cos(B) = (a^2 + c^2 - b^2) / (2ac)
- Find angle C: C = 180 - A - B (or use Law of Cosines)
Validity check: Each side must be less than the sum of the other two (triangle inequality).
SAS (Side-Angle-Side)
Given: Two sides and the included angle (e.g., a, b, and angle C)
Method: Use the Law of Cosines, then Law of Sines
- Find side c: c^2 = a^2 + b^2 - 2ab*cos(C)
- Find angle A: sin(A) = a*sin(C)/c
- Find angle B: B = 180 - A - C
ASA (Angle-Side-Angle)
Given: Two angles and the included side (e.g., angles A, B, and side c)
Method: Use angle sum property, then Law of Sines
- Find angle C: C = 180 - A - B
- Find side a: a = c*sin(A)/sin(C)
- Find side b: b = c*sin(B)/sin(C)
AAS (Angle-Angle-Side)
Given: Two angles and a non-included side (e.g., angles A, B, and side a)
Method: Similar to ASA
- Find angle C: C = 180 - A - B
- Find side b: b = a*sin(B)/sin(A)
- Find side c: c = a*sin(C)/sin(A)
SSA (Side-Side-Angle) - The Ambiguous Case
Given: Two sides and a non-included angle (e.g., a, b, and angle A)
Caution: This case can have 0, 1, or 2 solutions!
Analysis:
- If A >= 90: One solution if a > b; no solution if a <= b
- If A < 90:
- No solution if a < b*sin(A)
- One solution if a = b*sin(A) (right triangle)
- Two solutions if b*sin(A) < a < b
- One solution if a >= b
The Law of Sines
The Law of Sines relates the sides of a triangle to the sines of their opposite angles. It's essential for solving triangles when you have angle-side combinations.
The Formula
a/sin(A) = b/sin(B) = c/sin(C) = 2R
Where:
- a, b, c are the side lengths
- A, B, C are the opposite angles
- R is the circumradius (radius of the circumscribed circle)
When to Use Law of Sines
Use the Law of Sines when you know:
- ASA: Two angles and the included side
- AAS: Two angles and any side
- SSA: Two sides and a non-included angle (with caution - ambiguous case)
Example Calculation
Given: Angle A = 40 degrees, Angle B = 60 degrees, side a = 10
-
Find angle C: C = 180 - 40 - 60 = 80 degrees
-
Find side b using Law of Sines:
- b/sin(60) = 10/sin(40)
- b = 10 * sin(60) / sin(40)
- b = 10 * 0.866 / 0.643
- b = 13.47
-
Find side c:
- c = 10 * sin(80) / sin(40)
- c = 10 * 0.985 / 0.643
- c = 15.32
The Circumradius Connection
The Law of Sines also gives us the circumradius:
R = a / (2*sin(A))
This is the radius of the circle that passes through all three vertices of the triangle.
The Law of Cosines
The Law of Cosines is a generalization of the Pythagorean theorem that works for all triangles. It's essential when you have SSS or SAS combinations.
The Formulas
c^2 = a^2 + b^2 - 2ab*cos(C) b^2 = a^2 + c^2 - 2ac*cos(B) a^2 = b^2 + c^2 - 2bc*cos(A)
Connection to Pythagorean Theorem
When angle C = 90 degrees:
- cos(90) = 0
- c^2 = a^2 + b^2 - 2ab*0 = a^2 + b^2
This is exactly the Pythagorean theorem! The Law of Cosines extends this to non-right triangles.
When to Use Law of Cosines
Use the Law of Cosines when you know:
- SSS: All three sides (to find angles)
- SAS: Two sides and the included angle (to find the third side)
Example 1: Finding a Side (SAS)
Given: a = 8, b = 6, angle C = 60 degrees
c^2 = 8^2 + 6^2 - 286cos(60) c^2 = 64 + 36 - 960.5 c^2 = 100 - 48 = 52 c = 7.21
Example 2: Finding an Angle (SSS)
Given: a = 5, b = 7, c = 8
To find angle A: cos(A) = (b^2 + c^2 - a^2) / (2bc) cos(A) = (49 + 64 - 25) / (278) cos(A) = 88 / 112 = 0.786 A = arccos(0.786) = 38.2 degrees
Determining Triangle Type
The Law of Cosines helps classify triangles:
- If c^2 = a^2 + b^2: Right triangle (cos(C) = 0, so C = 90 degrees)
- If c^2 < a^2 + b^2: Acute triangle (cos(C) > 0, so C < 90 degrees)
- If c^2 > a^2 + b^2: Obtuse triangle (cos(C) < 0, so C > 90 degrees)
The Sum of Angles Property
One of the most fundamental properties of triangles is that the interior angles always sum to 180 degrees. This property is the foundation for solving many triangle problems.
The Fundamental Rule
Angle A + Angle B + Angle C = 180 degrees
This holds true for ALL triangles - right, acute, obtuse, equilateral, isosceles, and scalene.
Why Is This True?
Proof using parallel lines:
- Draw a line through vertex A parallel to side BC
- The alternate interior angles created equal angles B and C
- These three angles at vertex A form a straight line (180 degrees)
- Therefore: A + B + C = 180 degrees
Practical Applications
Finding the Third Angle
If you know two angles, you can always find the third:
- Example: If A = 45 degrees and B = 75 degrees, then C = 180 - 45 - 75 = 60 degrees
Checking Validity
If your calculated angles don't sum to 180 degrees, you have an error somewhere.
Understanding Constraints
- No angle can be >= 180 degrees
- No angle can be <= 0 degrees
- If one angle is 90 degrees (right triangle), the other two must sum to 90 degrees
- In an equilateral triangle, each angle is exactly 60 degrees
Exterior Angles
The exterior angle of a triangle (the angle formed by one side and the extension of an adjacent side) equals the sum of the two non-adjacent interior angles.
Exterior angle at C = A + B
This is another useful property for solving problems.
Triangle Height (Altitude) Calculations
The height (or altitude) of a triangle is the perpendicular distance from a vertex to the opposite side (or its extension). Every triangle has three heights, one from each vertex.
Finding Height from Area
If you know the area and base:
height = (2 * Area) / base
This works because Area = (1/2) * base * height.
Finding Height Using Trigonometry
If you know a side and adjacent angle:
height_a = b * sin(C) = c * sin(B)
Where height_a is the altitude from vertex A to side a.
Height Formulas for Each Vertex
For a triangle with sides a, b, c and area A:
- h_a (height to side a) = 2A / a
- h_b (height to side b) = 2A / b
- h_c (height to side c) = 2A / c
Special Cases
Right Triangle
In a right triangle with the right angle at C:
- h_c (height to hypotenuse) = a*b/c
- The two legs themselves are altitudes to each other
Equilateral Triangle
All three heights are equal:
- h = (sqrt(3)/2) * s, where s is the side length
- h = s * 0.866 approximately
Isosceles Triangle
The height to the unequal side (base) bisects that side and the apex angle.
The Orthocenter
The three altitudes of a triangle always intersect at a single point called the orthocenter:
- In an acute triangle: inside the triangle
- In a right triangle: at the right angle vertex
- In an obtuse triangle: outside the triangle
Real-World Triangle Applications
Triangle calculations are essential in many practical fields. Here are some common applications where this calculator proves invaluable.
Construction and Architecture
Roof Design
- Calculate roof pitch and rafter lengths using right triangle math
- Determine the area of triangular gable ends
- Find the proper angle for drainage slope
- See our Roof Pitch Calculator for specialized roof calculations
Structural Support
- Triangles are the strongest geometric shape for structures
- Calculate forces in truss systems
- Determine brace lengths and angles
- Use our Rafter Calculator for construction projects
Land Surveying
- Triangulation is fundamental to surveying
- Calculate property areas with irregular boundaries
- Determine distances using angle measurements
- GPS systems use triangle calculations (trilateration)
Navigation
- Ships and aircraft use triangulation for position fixing
- Calculate course corrections and distances
- Determine bearing angles between waypoints
Engineering
- Force vector analysis often involves triangles
- Bridge design uses triangle principles extensively
- Mechanical linkages rely on triangle geometry
Art and Design
- The "rule of thirds" in photography uses implicit triangles
- Perspective drawing relies on triangular projections
- Logo design often incorporates triangle symbolism
Related Calculators
- Area Calculator - General area calculations for all shapes
- Pythagorean Theorem Calculator - Specialized for right triangles
- Roof Pitch Calculator - Calculate roof angles and slopes
- Rafter Calculator - Construction-specific calculations
Pro Tips
- 💡**Always verify your input mode matches your known values**: Choose SSS when you know all three sides, SAS when you know two sides and the angle between them, etc. Using the wrong mode will give incorrect results.
- 💡**Remember that angles are in degrees**: This calculator uses degrees (not radians). If your problem gives angles in radians, convert them first: degrees = radians * (180/pi).
- 💡**Watch for the ambiguous case with SSA**: When you know two sides and a non-included angle, there may be two possible triangles, one, or none. The calculator will indicate which case applies.
- 💡**Use the triangle type classification**: The calculator tells you if your triangle is right, equilateral, isosceles, or scalene. This can help verify your inputs are correct.
- 💡**Check that the angles sum to 180 degrees**: This is a quick sanity check for your results. If they do not, something is wrong with either your inputs or the calculation.
- 💡**For right triangles, the Pythagorean theorem is fastest**: While this calculator handles right triangles, using a^2 + b^2 = c^2 directly is often quicker for simple cases.
- 💡**The semi-perimeter (s) appears in many formulas**: s = (a+b+c)/2 is used in Heron's formula and other calculations. It is half the perimeter.
- 💡**Height depends on which side is the base**: Every triangle has three heights. Make sure you are calculating the height relative to the correct side for your application.
Frequently Asked Questions
Use Heron's Formula when you know all three sides (a, b, c):
- Calculate the semi-perimeter: s = (a + b + c) / 2
- Apply the formula: Area = sqrt(s * (s-a) * (s-b) * (s-c))
Example: For a triangle with sides 5, 6, and 7:
- s = (5 + 6 + 7) / 2 = 9
- Area = sqrt(9 * 4 * 3 * 2) = sqrt(216) = 14.7 square units
This formula works for any valid triangle and is especially useful when you don't know the height or any angles.

