Triangle Calculator
Calculate triangle sides, angles, area, perimeter, and altitudes using SSS, SAS, ASA, or SSA criteria with step-by-step mathematical proofs.
Updated
What is the Triangle Calculator?
Triangles are one of the most fundamental shapes in geometry, and solving them—finding all three sides, three angles, area, perimeter, and altitudes—is essential for everything from engineering and physics to construction and navigation.
Whether you are working with a basic right-angled triangle or a complex oblique scalene triangle, this Triangle Calculator is designed to automatically compute all unknown properties instantly. All you need to do is provide three known values (at least one of which must be a side length), and our solver handles the rest using fundamental laws of trigonometry.
Types of Triangles You Can Solve
Triangles are categorized based on their side lengths and interior angles. Understanding these classifications helps visualize the geometry of your problem:
Classified by Sides
- Equilateral Triangle: All three sides are of equal length, and all three internal angles are exactly .
- Isosceles Triangle: Two sides are of equal length, meaning the two angles opposite those sides are also equal.
- Scalene Triangle: All three sides have different lengths, and all three internal angles have different values.
Classified by Angles
- Right Triangle: Features exactly one (right) angle. The side opposite this angle is the hypotenuse, which is always the longest side.
- Acute Triangle: All three interior angles are less than .
- Obtuse Triangle: One interior angle is strictly greater than .
Key Metrics Calculated
When you input your known values, this tool computes a comprehensive set of geometric metrics:
| Metric | Description | Formula |
|---|---|---|
| Sides () | The lengths of the three boundaries defining the triangle. | Law of Sines / Cosines |
| Angles () | The internal angles opposite sides , , and , summing to . | |
| Area | The total two-dimensional space enclosed within the boundary. | or Heron's Formula |
| Perimeter | The total distance around the outside of the triangle. | |
| Semi-perimeter () | Half of the perimeter, used widely in advanced geometric equations. | |
| Altitudes () | The perpendicular height from each vertex to its opposite base. |
The Triangle Inequality Theorem
Before running calculations, the calculator validates your inputs against the Triangle Inequality Theorem. This rule states that for any valid triangle, the sum of any two side lengths must always be strictly greater than the length of the remaining side:
If your inputs violate these conditions, a triangle cannot physically exist, and the tool will alert you to adjust your measurements.
How it works
Solving a triangle means finding all its unknown sides and angles when some of them are already known. To do this, our calculator uses standard geometric rules and trigonometric identities. Depending on which inputs you provide, the algorithm categorizes your problem into one of five standard cases: SSS, SAS, ASA, AAS, or SSA.
The Trigonometric Laws Applied
Our engine utilizes three main mathematical relationships to solve oblique and right triangles.
1. Angle Sum Theorem
In Euclidean geometry, the interior angles of any flat triangle always sum to exactly (or radians):
2. The Law of Sines
The Law of Sines establishes that the ratio of the length of a side to the sine of its opposite angle is constant for all three sides of a triangle:
This is ideal for solving triangles when you know an angle and its opposite side along with one other piece of information (e.g., ASA, AAS, or SSA).
3. The Law of Cosines
The Law of Cosines is a generalization of the Pythagorean theorem that relates the lengths of the sides to the cosine of one of its angles:
This is used primarily when solving SSS (three sides) or SAS (two sides and their included angle) scenarios.
Step-by-Step Breakdown of Input Scenarios
Case 1: Side-Side-Side (SSS)
When all three side lengths , , and are known:
- We check if they form a valid triangle using the triangle inequality theorem ().
- We isolate the angles using the rearranged Law of Cosines:
- The remaining angle is found with .
Case 2: Side-Angle-Side (SAS)
When you know two sides (e.g., and ) and the angle between them ():
- Find the unknown side using the Law of Cosines:
- Find angle using the Law of Cosines (or Sines):
- Find the final angle: .
Case 3: Angle-Side-Angle (ASA) & Angle-Angle-Side (AAS)
When two angles and one side are given:
- Instantly calculate the third angle using the Angle Sum Theorem:
- Use the Law of Sines to find the two remaining unknown sides:
Case 4: Side-Side-Angle (SSA) — The Ambiguous Case
When two sides () and a non-included angle () are provided, the system must navigate the ambiguous case. Depending on the lengths and the angle, this scenario can result in:
- Zero Triangles: If the side is too short to reach the base line (i.e., when is acute).
- One Right Triangle: If , forming a perfect right triangle.
- Two Unique Triangles: If , two distinct sets of angles and sides can satisfy the input. The calculator will provide both valid solutions.
- One Oblique Triangle: If .
Calculating Area, Perimeter, and Altitudes
Once all three sides () are computed:
- Perimeter:
- Semi-perimeter:
- Area (Heron's Formula):
- Altitudes: The altitude (height) perpendicular to each base is computed using the standard area equation ():
Examples
Solving a Right Triangle (Pythagorean Theorem)
Calculate the hypotenuse and acute angles of a right triangle given two perpendicular sides (legs).
Solving an Oblique Triangle using Three Sides (SSS)
Determine all three interior angles and the total area when all side lengths are known.
Frequently asked questions
How do I use Triangle Calculator?
How do I use Triangle Calculator?
Simply enter your input and click run.
Can you solve a triangle if you only know its three angles (AAA)?
Can you solve a triangle if you only know its three angles (AAA)?
No, you cannot solve a unique triangle using only its three angles (the AAA scenario). Knowing three angles allows you to determine the shape of the triangle, but not its physical scale or size. There are infinitely many similar triangles (triangles with the exact same angles but different side lengths) that fit those measurements. To calculate specific side lengths, you must provide at least one side length.
How does the Triangle Inequality Theorem prevent impossible inputs?
How does the Triangle Inequality Theorem prevent impossible inputs?
The Triangle Inequality Theorem states that for any valid triangle, the sum of the lengths of any two sides must be strictly greater than the length of the third side. Mathematically, this is written as , , and . If you input sides that violate this rule—such as 3, 4, and 8—the lines physically cannot connect to form a closed three-sided shape. Our calculator identifies this mathematically and returns an error explaining why the inputs are geometrically impossible.
What is the "ambiguous case" (SSA) in trigonometry?
What is the "ambiguous case" (SSA) in trigonometry?
The Side-Side-Angle (SSA) configuration is called the "ambiguous case" because the given information might construct zero, one, or two different triangles. This happens because the sine function is positive for both acute angles () and obtuse angles (). When you provide two sides and a non-included acute angle, and the opposite side is shorter than the adjacent side but longer than the altitude, there are two distinct valid paths to construct the triangle. Our calculator will detect this and present both valid mathematical solutions.
How is the area of a triangle calculated when the height is unknown?
How is the area of a triangle calculated when the height is unknown?
If the height is unknown, the calculator uses one of two methods depending on the solved parameters:
- Heron's Formula: If all three sides (, , and ) are known, we find the semi-perimeter and then compute:
- Trigonometric Area Formula: If two sides and their included angle are known (such as , , and angle ), the area is calculated as:
Can a triangle have more than one obtuse angle?
Can a triangle have more than one obtuse angle?
No, a triangle can never contain more than one obtuse angle (an angle greater than ). Because the sum of all internal angles in a flat triangle must equal exactly , having two obtuse angles would mean their combined sum already exceeds , making it geometrically impossible to close the shape with a third angle.
Related tools
More utilities you might find handy.
Circle Calculator
Calculate circle radius, diameter, circumference, and area from any one known value. Instant results with adjustable precision.
Cube Root Calculator
Calculate cube root of any number
Decimal & Base Converter
Instantly convert numbers between decimal, binary, hexadecimal, octal, and any custom base from 2 to 36.