Online calculators for finance, science, health, everyday tasks, and education.
Categories
Math
Triangle Calculator
The Triangle Calculator solves all triangle types from any valid combination of sides and angles. Enter three known values in SSS, SAS, ASA, AAS, or SSA form to instantly compute all sides, angles, area, perimeter, semiperimeter, inradius, circumradius, altitudes, and medians. The SSA ambiguous case is handled automatically, showing both solutions when they exist. Includes full step-by-step solutions using the Law of Sines, Law of Cosines, and Heron's formula.
Triangle calculations follow classical Euclidean geometry and standard trigonometry definitions consistent with NCTM high school geometry standards··Review is current.Reviewed: March 2025·Full Methodology
Specialized Calculators
Choose from 4 specialized versions of this calculator, each optimized for specific use cases and calculation methods.
Pick a scenario to see how the calculator works, then adjust the values
Right Triangle
Classic 3-4-5 right triangle using SSS mode.
Key values:a = 3 · b = 4 · c = 5
Roof Pitch
Calculate a roof triangle with two sides and a 35-degree pitch angle.
Key values:a = 6 · b = 8 · C = 35°
Equilateral Triangle
A perfect equilateral triangle with all sides equal to 10.
Key values:a = 10 · b = 10 · c = 10
Solve Any Triangle
Select your known values (SSS, SAS, ASA, AAS, or SSA) and enter measurements to solve the triangle and compute area, perimeter, inradius, and more.
Documentation
What Is a Triangle Solver?
A triangle solver calculates all unknown sides, angles, and derived properties of a triangle from a minimum set of known values. Any triangle is uniquely determined (up to congruence) by three independent measurements, provided at least one is a side. The five classic input combinations are:
SSS — three sides
SAS — two sides and the included angle
ASA — two angles and the included side
AAS — two angles and a non-included side
SSA — two sides and a non-included angle (ambiguous case)
From the solved triangle, this calculator also derives area, perimeter, semiperimeter, inradius, circumradius, altitudes, and medians — all the properties that appear in geometry courses, surveying, navigation, and engineering.
How to Use This Calculator
Choose a solve mode (SSS, SAS, ASA, AAS, or SSA) depending on which values you know.
Select the angle unit — degrees or radians.
Enter the known values in the input fields that appear for your chosen mode.
View the results: all six elements (three sides and three angles), area, perimeter, inradius, circumradius, altitudes, medians, and step-by-step solution formulas.
For the SSA (ambiguous) case, both valid triangles are displayed when they exist.
Key Formulas
Law of Cosines
c2=a2+b2−2abcosC
Generalises the Pythagorean theorem to all triangles. Used in SSS mode (to find angles from three sides) and SAS mode (to find the third side from two sides and the included angle). When C=90∘, the formula reduces to c2=a2+b2.
Law of Sines
sinAa=sinBb=sinCc=2R
Relates each side to the sine of its opposite angle. The common ratio equals the diameter of the circumscribed circle (2R). Used in ASA, AAS, and SSA modes.
Heron's Formula (Area from Three Sides)
A=s(s−a)(s−b)(s−c),s=2a+b+c
Where s is the semiperimeter. This formula computes the area directly from the three side lengths without needing any angle or height.
Area (Two Sides and Included Angle)
A=21absinC
Where a and b are two sides and C is the angle between them.
Inradius and Circumradius
r=sA,R=4Aabc
The inradius r is the radius of the inscribed circle (tangent to all three sides). The circumradius R is the radius of the circumscribed circle (passing through all three vertices).
Altitudes
ha=a2A,hb=b2A,hc=c2A
The altitude from vertex A is the perpendicular distance from A to side a. Each altitude equals twice the area divided by its corresponding side.
Medians
ma=212b2+2c2−a2
A median connects a vertex to the midpoint of the opposite side. The formula above gives the median from vertex A; analogous formulas apply for mb and mc.
Worked Examples
Example 1: Fencing a Triangular Plot (SSS)
A surveyor measures a triangular lot with sides a = 85 m, b = 120 m, and c = 95 m. Find all angles and the area.
Angle A (Law of Cosines): cosA=2bcb2+c2−a2=2×120×9514400+9025−7225=2280016200=0.7105
Area (Heron's formula): s=150, A=150×65×30×55≈4,010.9 m2
Practical note: The perimeter is 300 m of fencing, and the area is about 0.99 acres — useful for cost estimation and land valuation.
Example 2: Roof Truss Design (SAS)
An architect designs a roof truss with rafters a = 7 m and b = 10 m meeting at an apex angle of C = 45°. Find the span (third side) and the roof area.
Span c (Law of Cosines): c=72+102−2(7)(10)cos45°=49+100−98.99=50.01≈7.07 m
Area: A=21(7)(10)sin45°=35×0.7071≈24.75 m2
Angle A: A=arcsin(7.077sin45°)≈44.5°
B=180°−44.5°−45°=90.5°
Practical note: This is close to a right triangle at vertex B. The span of 7.07 m determines the wall-to-wall support distance.
Example 3: Navigation Bearing (AAS)
A ship sails 10 km on bearing 040°, then turns. The angle at the start is A = 70° and at the waypoint is B = 70°, with the known side a = 10 km (opposite to angle A). Find the return distance.
C=180°−70°−70°=40°
Side c (Law of Sines): c=sinAasinC=sin70°10×sin40°=0.939710×0.6428≈6.84 km
Side b: b=sinAasinB=sin70°10×sin70°=10 km
Practical note: Since A = B, the triangle is isosceles and sides a and b are equal. The direct return distance is about 6.84 km.
Example 4: SSA Ambiguous Case
Given a = 7, b = 10, A = 30°. How many valid triangles exist?
sinB=absinA=710×0.5=0.7143
B1=arcsin(0.7143)≈45.58° and B2=180°−45.58°=134.42°
C1=180°−30°−45.58°=104.42° (valid, > 0)
C2=180°−30°−134.42°=15.58° (valid, > 0)
Two valid triangles exist. Triangle 1: B ≈ 45.58°, C ≈ 104.42°. Triangle 2: B ≈ 134.42°, C ≈ 15.58°.
Practical note: The SSA ambiguous case arises when angle A is acute and side a (opposite A) is shorter than side b. Always check the supplementary angle to determine if a second solution exists.
Solve Mode Reference
Mode
Known Values
Primary Formula
Solutions
SSS
3 sides
Law of Cosines (inverse)
Exactly 1
SAS
2 sides + included angle
Law of Cosines
Exactly 1
ASA
2 angles + included side
Law of Sines
Exactly 1
AAS
2 angles + non-included side
Law of Sines
Exactly 1
SSA
2 sides + non-included angle
Law of Sines
0, 1, or 2
Common Mistakes to Avoid
Mistake
Correction
Using degrees in a formula that expects radians
Always check your calculator or programming language's trig functions. Most expect radians. Multiply degrees by π/180 to convert.
Ignoring the triangle inequality
The sum of any two sides must exceed the third: a + b > c, a + c > b, b + c > a. If this fails, no valid triangle exists.
Forgetting the SSA ambiguous case
When given two sides and a non-included angle, always check the supplementary angle (180° − B) to see if a second valid triangle exists.
Assuming angles must be integers
Triangle angles are rarely whole numbers. Carry sufficient decimal precision throughout your calculation to avoid cumulative rounding errors.
Using the wrong side–angle pairing in the Law of Sines
Each side pairs with its opposite angle: side a is opposite angle A, side b is opposite angle B, side c is opposite angle C.
Frequently Asked Questions
What is the difference between the Law of Sines and the Law of Cosines?
The Law of Cosines relates three sides to one angle: c2=a2+b2−2abcosC. Use it when you know SSS (three sides) or SAS (two sides and the included angle). The Law of Sines relates each side to its opposite angle: a/sinA=b/sinB. Use it for ASA, AAS, and SSA problems. For SSS and SAS, the Law of Cosines is more numerically stable.
What is the SSA ambiguous case?
When given two sides and the angle opposite the first side (SSA), the Law of Sines may yield sinB≤1 with two possible values of B. If both yield a positive third angle C, two distinct triangles satisfy the given data. If sinB>1, no triangle exists. If sinB=1, exactly one (right) triangle exists.
How do I find the area of a triangle without knowing the height?
Use Heron's formula if you know all three sides, or 21absinC if you know two sides and the included angle. Both methods bypass the need for a perpendicular height measurement.
What are the inradius and circumradius?
The inradius (r) is the radius of the largest circle that fits inside the triangle, tangent to all three sides. The circumradius (R) is the radius of the smallest circle that passes through all three vertices. For an equilateral triangle with side a, r=23a and R=3a.
Can three angles alone determine a triangle?
No. Three angles define a family of similar triangles (same shape, any size). You need at least one side to pin down the scale. This is why all five solve modes require at least one side measurement.
How accurate is this calculator?
The calculator uses IEEE 754 double-precision floating-point arithmetic (about 15–16 significant digits). Results are accurate to at least 4 decimal places for typical inputs. Extreme cases (very flat or very large triangles) may have slightly reduced precision due to floating-point limitations.
Disclaimer
This calculator is provided for educational and convenience purposes only. While the formulas are based on standard mathematical definitions (sourced from Wolfram MathWorld and standard geometry textbooks), the results should not be used as the sole basis for critical engineering, construction, surveying, or navigation decisions. Always verify measurements independently and consult a qualified professional for applications where precision is essential.