Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Triangle Calculator (Solve for Sides, Angles, Area and More)

Enter the three values you know out of the sides a, b, c and the angles A, B, C (in degrees). At least one must be a side. Side a is across from angle A, side b from angle B, and side c from angle C.

Fill in exactly three fields, at least one of them a side. Enter angles in degrees (°), for example 90 for a right angle. Leave the other fields blank.
Result and figure
Enter the three values you know out of the three sides and three angles (at least one must be a side) in the fields on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter any three of the sides \(a, b, c\) and the angles \(A, B, C\) that you know (at least one must be a side), and get all the other sides and angles
  • Also finds the area, the perimeter, the semiperimeter, the three heights, the three medians, the inradius and the circumradius, all at once
  • Automatically tells you the type of triangle: equilateral, isosceles or scalene, and acute, right or obtuse
  • When two sides and an angle opposite one of them (SSA) allow two different triangles, both solutions are shown (the well-known "ambiguous case")
  • A plain-language explanation of the law of cosines, the law of sines and Heron's formula, and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
Sides and angles are paired by letter: side a is across from angle A (its opposite side), and so on, with lowercase for sides and uppercase for angles. Enter angles in degrees (°).

What is this calculation used for?

Surveying and mapmaking (measuring the distance to a place you cannot reach)

You can find the distance to a landmark across a river without stretching a tape measure over the water. Lay out a 300-foot baseline on your side and measure the angle to the landmark from each end. That gives a triangle with one side (300 feet) and two angles. If the angles are 50° and 60°, the third angle is 70°, and the law of sines gives the distance to the landmark as \(300 \times \sin 50^\circ \div \sin 70^\circ \approx 244.6\) feet.
The total stations that surveyors use, and the triangulation that mapmaking was built on, come down to repeating this very calculation.

Measuring the area of a triangular lot or field (Heron's formula)

For a triangular piece of land, you can find the area with just a tape measure, without any tool for measuring angles. If the three sides are 90 feet, 120 feet and 150 feet, the semiperimeter is 180 feet and the area is \(\sqrt{180 \times 90 \times 60 \times 30} = 5{,}400\) square feet (about 0.12 acre).
"Anyone can measure lengths accurately" is why Heron's formula has been popular in practice, and it is still handy for a rough check of the area of farmland or a building lot.

Construction and DIY (working out the length and angle of slanted parts first)

Buildings are full of slanted parts: roof slopes, stairs, diagonal braces and so on. For a shed roof that runs 12 feet across and rises 5 feet, the length of the slope is \(\sqrt{12^2 + 5^2} = 13\) feet (with a right angle, the correction term of the law of cosines disappears, leaving the Pythagorean theorem).
If you work out the lengths and angles before cutting the lumber, you waste less material and redo less work on site.

Robot arms and machine design (two links and the joint angle)

A factory robot arm is itself a triangle: two arm links and the joint angle between them. With links of 20 inches and 12 inches and the joint opened to 120°, the law of cosines gives the distance from the base to the hand as \(\sqrt{20^2 + 12^2 - 2 \times 20 \times 12 \times \cos 120^\circ} = 28\) inches.
Working backward to the joint angles that move the hand to a target position (inverse kinematics) also uses a rearranged law of cosines as a basic building block.

Astronomy (measuring the distance to stars with triangles)

The distance to a star is measured with a very long, thin triangle whose base is the distance the Earth moves in half a year of its orbit around the Sun (this is called stellar parallax). Finding the distance from the base and the small shift in angle is the same idea as this page's "find the rest from one side and angles" calculation.
"If you can solve a triangle, you can find the distance to a place you cannot go." This works from land surveying all the way to outer space, and it is one of the most powerful uses of geometry.

Formulas and figures

Angle sum of a triangle
Figure
Standard notation (the usual math form)
\(A\) \(+\) \(B\) \(+\) \(C\) \(=\) \(180^\circ\)
In words (symbols replaced with words)
① \(A\): angle A \(+\) ② \(B\): angle B \(+\) ③ \(C\): angle C \(=\) ④ \(180^\circ\) (always)
The formula in words
① Add angle \(A\)
② plus angle \(B\)
③ plus angle \(C\)
④ and you always get \(180^\circ\)
Quick example
In a triangle with two angles of 50° and 60°, the third angle is
third angle \(C\) \(=\) \(180^\circ\) \(-\) angle \(A\) (50°) \(-\) angle \(B\) (60°)
\(180^\circ - 50^\circ - 60^\circ = 70^\circ\)
Key idea
In every triangle, whatever its shape, the three angles add up to 180°. So once you know two angles, the third is just a subtraction. For "one side and two angles" input, this calculator uses this formula first to find the third angle.
Law of cosines (third side from two sides and the included angle)
Figure
Standard notation (the usual math form)
\(c^{2}\) \(=\) \(a^{2}\) \(+\) \(b^{2}\) \(-\) \(2ab\cos C\)
In words (symbols replaced with words)
④ \(c^{2}\): the third side \(c\), squared \(=\) ① \(a^{2}\): the known side \(a\), squared \(+\) ② \(b^{2}\): the known side \(b\), squared \(-\) ③ \(2ab\cos C\): correction term
The formula in words
① Take the known side \(a\), squared
② add the known side \(b\), squared
③ subtract the correction term \(2ab\cos C\), set by how wide the included angle is
④ and you get the third side \(c\), squared (take the square root at the end)
Quick example
With two sides of 5 and 7 and an included angle of 60° (cos 60° = 0.5), the third side is
third side \(c\), squared \(=\) side \(a\) squared (5²) \(+\) side \(b\) squared (7²) \(-\) correction term (2×5×7×0.5)
\(c^{2} = 5^{2} + 7^{2} - 2 \times 5 \times 7 \times \cos 60^\circ = 25 + 49 - 35 = 39\)
\(c = \sqrt{39} \approx 6.245\)
Key idea
\(\cos C\) (cosine) expresses how wide the included angle is as a number from −1 to 1. When the angle is exactly 90°, \(\cos 90^\circ = 0\), the correction term disappears, and you get the Pythagorean theorem \(c^2 = a^2 + b^2\). In other words, the law of cosines is the Pythagorean theorem extended to triangles without a right angle. When you know all three sides and want an angle, use the rearranged form \(A = \arccos\bigl(\frac{b^2 + c^2 - a^2}{2bc}\bigr)\) (the "three sides" input of this calculator uses this form).
Law of sines (the bridge between sides and opposite angles)
Figure
Standard notation (the usual math form)
\(\dfrac{a}{\sin A}\) \(=\) \(\dfrac{b}{\sin B}\) \(=\) \(\dfrac{c}{\sin C}\) \(=\) \(2R\)
In words (symbols replaced with words)
① \(\dfrac{a}{\sin A}\): side \(a\) ÷ sine of its opposite angle \(=\) ② \(\dfrac{b}{\sin B}\): side \(b\) ÷ sine of its opposite angle \(=\) ③ \(\dfrac{c}{\sin C}\): side \(c\) ÷ sine of its opposite angle \(=\) ④ \(2R\): diameter of the circumscribed circle
The formula in words
① Side \(a\) divided by the sine of its opposite angle \(\dfrac{a}{\sin A}\)
② side \(b\) divided by the sine of its opposite angle \(\dfrac{b}{\sin B}\)
③ and side \(c\) divided by the sine of its opposite angle \(\dfrac{c}{\sin C}\) all have the same value,
④ which equals the diameter of the circumscribed circle \(2R\)
Quick example
With side a = 6, its opposite angle A = 45° and angle B = 60°, side b is
side \(b\) \(=\) side \(a\) (6) \(\times\) sine of the opposite angle \(\sin 60^\circ\) \(\div\) sine of the opposite angle \(\sin 45^\circ\)
\(b = \dfrac{6 \times \sin 60^\circ}{\sin 45^\circ} \approx 7.348\)
Key idea
"Side ÷ sine of its opposite angle" gives the same value for all three pairs. So if you know one pair (a side and its opposite angle), you can use it as a bridge to find the other sides and angles one after another. The "one side and two angles" input of this calculator uses this formula. On top of that, this common value is equal to the diameter \(2R\) of the circle through the three corners of the triangle (the circumscribed circle). The full law of sines includes this fact too.
Area (two sides and the included angle)
Figure
Standard notation (the usual math form)
\(S\) \(=\) \(\dfrac{1}{2}\) \(\times\) \(a\) \(\times\) \(b\) \(\times\) \(\sin C\)
In words (symbols replaced with words)
⑤ \(S\): area \(=\) ④ one half \(\times\) ① \(a\): known side \(\times\) ② \(b\): known side \(\times\) ③ \(\sin C\): sine of the included angle
The formula in words
① Multiply the known side \(a\)
② by the known side \(b\)
③ and by the sine of the included angle \(\sin C\)
④ then take one half of it
⑤ and you get the area \(S\)
Quick example
The area of a triangle with two sides of 8 and 5 and an included angle of 30° (sin 30° = 0.5) is
area \(S\) \(=\) one half \(\times\) side \(a\) (8) \(\times\) side \(b\) (5) \(\times\) sine of the included angle (0.5)
\(S = \dfrac{1}{2} \times 8 \times 5 \times \sin 30^\circ = \dfrac{1}{2} \times 8 \times 5 \times 0.5 = 10\)
Key idea
This is the familiar "base × height ÷ 2" from elementary school, with the height replaced by \(b\sin C\) (the height worked out from side b and the included angle). When the included angle is 90°, \(\sin 90^\circ = 1\), so the height is side b itself and the area is as large as it can be.
Heron's formula (area from three sides)
Figure
Standard notation (the usual math form)
\(s\) \(=\) \(\dfrac{a+b+c}{2}\)
\(S\) \(=\) \(\sqrt{s(s-a)(s-b)(s-c)}\)
In words (symbols replaced with words)
② \(s\): semiperimeter \(=\) ① sum of the three sides ÷ 2
④ \(S\): area \(=\) ③ square root of \(s\) times "\(s\) − each side" (three factors)
The formula in words
① Add up all three sides \(a, b, c\) and divide by 2. \(\dfrac{a+b+c}{2}\)
② Call this the semiperimeter \(s\)
③ Next, multiply \(s\) by the three numbers you get by subtracting each side from \(s\) (\(s-a\), \(s-b\), \(s-c\)) and take the square root
④ and the result is the area \(S\)
Quick example
The area of a triangle with sides 3, 4 and 5 is
semiperimeter \(s\) \(=\) sum of the three sides (3+4+5) ÷ 2
\(s = \dfrac{3+4+5}{2} = 6\)
\(S = \sqrt{6 \times (6-3) \times (6-4) \times (6-5)} = \sqrt{6 \times 3 \times 2 \times 1} = \sqrt{36} = 6\)
Key idea
The strength of Heron's formula is that it gives the area from the three side lengths alone, without measuring any angle or height. Measuring three sides with a tape measure is enough, so it has long been used for things like finding the area of a triangular plot of land. The trick is to work out the semiperimeter \(s\) (half the perimeter) first.
Radius of the inscribed circle (inradius)
Figure
Standard notation (the usual math form)
In words (symbols replaced with words)
\(r\) \(=\) \(S\) \(\div\) \(s\)
③ \(r\): inradius \(=\) ① \(S\): area \(\div\) ② \(s\): semiperimeter
The formula in words
① Take the area \(S\)
② divide it by the semiperimeter \(s\) (half the perimeter)
③ and you get the inradius \(r\)
Quick example
For the triangle with sides 3, 4 and 5 (area 6, semiperimeter 6), the inradius is
inradius \(r\) \(=\) area (6) \(\div\) semiperimeter (6)
\(r = 6 \div 6 = 1\)
Key idea
The inscribed circle (incircle) is the circle that touches all three sides of the triangle from the inside. If you cut the triangle into three small triangles from the center of the incircle (the incenter), each has "base = one side, height = r", so the total area is \(S = \frac{1}{2}r(a+b+c) = rs\). Solving for \(r\) gives \(r = S \div s\).
Radius of the circumscribed circle (circumradius)
Figure
Standard notation (the usual math form)
In words (symbols replaced with words)
\(R\) \(=\) \(abc\) \(\div\) \(4S\)
③ \(R\): circumradius \(=\) ① \(abc\): product of the three sides \(\div\) ② \(4S\): four times the area
The formula in words
① Take the product of all three sides \(abc\)
② divide it by four times the area \(S\)
③ and you get the circumradius \(R\)
Quick example
For the triangle with sides 3, 4 and 5 (area 6), the circumradius is
circumradius \(R\) \(=\) product of the three sides (3×4×5) \(\div\) four times the area (4×6)
\(R = \dfrac{3 \times 4 \times 5}{4 \times 6} = \dfrac{60}{24} = 2.5\)
Key idea
The circumscribed circle (circumcircle) is the circle through all three corners (vertices) of the triangle. This formula comes from combining the law of sines \(\frac{a}{\sin A} = 2R\) with the area formula \(S = \frac{1}{2}bc\sin A\). The 3-4-5 triangle in the example is a right triangle, so the center of its circumcircle is exactly at the midpoint of the hypotenuse, and \(R\) is half the hypotenuse (\(5 \div 2 = 2.5\)). The result matches exactly.
A triangle is fixed by three pieces of information (at least one of them a side). For three sides, use the law of cosines solved for the angle. For two sides and the included angle, use the law of cosines. For one side and two angles, use the angle sum and the law of sines. These three tools give all the other sides and angles, and from there the area, the incircle and the circumcircle follow one after another.

Symbols and terms

Symbols

\(a, b, c\) a, b, c (lowercase) The lengths of the three sides of the triangle. By custom, each side uses the lowercase of the letter of the angle across from it (side a is opposite angle A).
\(A, B, C\) A, B, C (uppercase) The three angles of the triangle (in degrees). They always add up to 180°.
\(S\) S The area of the triangle. (Some US textbooks use \(K\) or \(A\) for area instead.)
\(s\) s (lowercase) The semiperimeter, half the perimeter (\(a+b+c\)). It is used in Heron's formula and in the formula for the inradius.
\(\sin\theta\) sine theta One of the trig ratios. In a right triangle, it is the height as a fraction of the hypotenuse, and it is used to get the vertical part from an angle. \(\sin 30^\circ = 0.5\) and \(\sin 90^\circ = 1\).
\(\cos\theta\) cosine theta One of the trig ratios. In a right triangle, it is the base as a fraction of the hypotenuse. \(\cos 60^\circ = 0.5\) and \(\cos 90^\circ = 0\). The "cosines" in the law of cosines is this function.
\(r\) r (lowercase) The radius of the incircle (the circle that touches all three sides from the inside).
\(R\) R (uppercase) The radius of the circumcircle (the circle through all three vertices).

Terms

opposite side The side across from an angle is called the opposite side of that angle. On this page, side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C.
opposite angle The angle across from a side is called the opposite angle of that side. On this page, angle A is opposite side a, angle B is opposite side b, and angle C is opposite side c.
angle sum The fact that the three angles of a triangle always add up to 180° (the triangle angle sum theorem). If you know two angles, the third is found by subtraction.
triangle inequality The condition for three lengths to form a triangle - the sum of any two sides must be greater than the third side. For example, 1, 2 and 4 do not form a triangle because 1 + 2 = 3 is less than 4.
law of cosines The rule \(c^2 = a^2 + b^2 - 2ab\cos C\) for finding the third side from two sides and the included angle. It extends the Pythagorean theorem to triangles without a right angle, and rearranged, it gives an angle from three sides. It is taught in high school (Geometry or Precalculus).
law of sines The rule that "side ÷ sine of its opposite angle" is the same for all three pairs and equals the diameter \(2R\) of the circumcircle. Once you know one side and its opposite angle, it bridges to the other sides and angles. It is taught in high school (Geometry or Precalculus).
Heron's formula A formula that gives the area from the three side lengths alone, without any angle. It is named after Heron of Alexandria, an ancient Greek mathematician.
semiperimeter Half the perimeter of a triangle. It appears in Heron's formula and in the formula for the inradius.
incircle The inscribed circle, which touches all three sides of the triangle from the inside. Its center (the incenter) is where the three angle bisectors meet.
circumcircle The circumscribed circle, which passes through all three vertices of the triangle. Its center (the circumcenter) is where the perpendicular bisectors of the three sides meet.
median The segment from a vertex of a triangle to the midpoint of the opposite side. The three medians meet at one point (the centroid).
acute triangle A triangle whose largest angle is less than 90°. By their angles, triangles are classified as acute, right or obtuse.
right triangle A triangle whose largest angle is exactly 90°. By their angles, triangles are classified as acute, right or obtuse.
obtuse triangle A triangle whose largest angle is greater than 90°. By their angles, triangles are classified as acute, right or obtuse.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
The angle sum and Heron's formula need only middle school math. The law of cosines and the law of sines are high school topics (Geometry or Precalculus).

Angles of a triangle (Grades 4–8)
  • Knowing that the angles of a triangle add up to 180°
  • Knowing the properties of isosceles and equilateral triangles (angles opposite equal sides are equal)
Square roots (Grade 8)
  • Knowing that a square root is the number that, squared, gives back the original number, as in \(\sqrt{36} = 6\)
  • Being able to estimate a value such as \(\sqrt{39}\), for example as between 6 and 7
The Pythagorean theorem (Grade 8)
  • Knowing that in a right triangle, \(c^2 = a^2 + b^2\) (the square of the hypotenuse equals the sum of the squares of the other two sides)
  • Seeing the law of cosines as this theorem extended to triangles without a right angle
Right triangle trigonometry (Geometry)
  • Knowing that sine and cosine are ratios of the sides of a right triangle
  • Being able to use the values for common angles, such as \(\sin 30^\circ = 0.5\), \(\cos 60^\circ = 0.5\) and \(\cos 90^\circ = 0\)
The law of sines and the law of cosines (Geometry or Precalculus)
  • Being able to choose the rule to use from which three values you know (SSS, SAS, ASA or AAS, and so on)
  • Knowing that with two sides and an angle opposite one of them (SSA, the ambiguous case), there may be two possible triangles

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the third angle (angle sum)
Angle A (degrees) 50
Angle B (degrees) 60
Third angle C (degrees) =180-B1-B2
Table to find the third side with the law of cosines
Side a 5
Side b 7
Included angle C (degrees) 60
Third side c =SQRT(B1^2+B2^2-2*B1*B2*COS(RADIANS(B3)))
Table to find another side with the law of sines
Side a 6
Its opposite angle A (degrees) 45
Angle B (degrees) 60
Side b =B1*SIN(RADIANS(B3))/SIN(RADIANS(B2))
Table to find the area (two sides and the included angle)
Side a 8
Side b 5
Included angle C (degrees) 30
Area S =B1*B2*SIN(RADIANS(B3))/2
Table to find the area (Heron's formula)
Side a 3
Side b 4
Side c 5
Semiperimeter s =(B1+B2+B3)/2
Area S =SQRT(B4*(B4-B1)*(B4-B2)*(B4-B3))
Table to find the inradius
Area S 6
Semiperimeter s 6
Inradius r =B1/B2
Table to find the circumradius
Side a 3
Side b 4
Side c 5
Area S 6
Circumradius R =B1*B2*B3/(4*B4)
After pasting, the upper rows are your inputs and the formula in the last row is calculated automatically.
Excel's COS and SIN take angles in radians, so the RADIANS function is placed in between to convert degrees to radians. SQRT is the square root.
For example, in the second table, B4 shows about 6.245. Just replace the input numbers with your own values.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the third angle (angle sum)
Angle A (degrees) 50
Angle B (degrees) 60
Third angle C (degrees) =180-B1-B2
Table to find the third side with the law of cosines
Side a 5
Side b 7
Included angle C (degrees) 60
Third side c =SQRT(B1^2+B2^2-2*B1*B2*COS(RADIANS(B3)))
Table to find another side with the law of sines
Side a 6
Its opposite angle A (degrees) 45
Angle B (degrees) 60
Side b =B1*SIN(RADIANS(B3))/SIN(RADIANS(B2))
Table to find the area (two sides and the included angle)
Side a 8
Side b 5
Included angle C (degrees) 30
Area S =B1*B2*SIN(RADIANS(B3))/2
Table to find the area (Heron's formula)
Side a 3
Side b 4
Side c 5
Semiperimeter s =(B1+B2+B3)/2
Area S =SQRT(B4*(B4-B1)*(B4-B2)*(B4-B3))
Table to find the inradius
Area S 6
Semiperimeter s 6
Inradius r =B1/B2
Table to find the circumradius
Side a 3
Side b 4
Side c 5
Area S 6
Circumradius R =B1*B2*B3/(4*B4)
The same formulas as in Excel work as is (Google Sheets has RADIANS, SIN, COS and SQRT under the same names).
Copy the whole table, paste it into cell A1, and replace the input numbers with your own values.

How to calculate it in Python

import math

side_a = 3.0   # side a
side_b = 4.0   # side b
side_c = 5.0   # side c (example where all three sides are known)

# Find the three angles with the law of cosines solved for the angle (in degrees)
angle_a = math.degrees(math.acos((side_b**2 + side_c**2 - side_a**2) / (2 * side_b * side_c)))
angle_b = math.degrees(math.acos((side_a**2 + side_c**2 - side_b**2) / (2 * side_a * side_c)))
angle_c = 180 - angle_a - angle_b

# Area with Heron's formula
half_perimeter = (side_a + side_b + side_c) / 2
area = math.sqrt(half_perimeter * (half_perimeter - side_a)
                 * (half_perimeter - side_b) * (half_perimeter - side_c))

inradius = area / half_perimeter                            # radius of the inscribed circle
circumradius = side_a * side_b * side_c / (4 * area)        # radius of the circumscribed circle

print(f"Angle A = {angle_a}°, angle B = {angle_b}°, angle C = {angle_c}°")
print(f"Area = {area}")
print(f"Inradius = {inradius}, circumradius = {circumradius}")
Runs with just math from the standard library. math.acos is the arccosine (cosine worked backward), and math.degrees converts radians to degrees. Replace the three sides at the top with your own values and run it.

How to write it in LaTeX and other math languages (copy and paste)

Angle sum of a triangle
A + B + C = 180°
A + B + C = 180^\circ
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>A</mi><mo>+</mo><mi>B</mi><mo>+</mo><mi>C</mi>
    <mo>=</mo>
    <mn>180</mn><mo>&#xB0;</mo>
  </mrow>
</math>
A + B + C = 180^@
angleA + angleB + angleC == 180
A + B + C = 180;
C = 180 - A - B;
A + B + C = 180°
Law of cosines (third side from two sides and the included angle)
c² = a² + b² − 2ab·cos C
c^{2} = a^{2} + b^{2} - 2ab\cos C
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msup><mi>c</mi><mn>2</mn></msup>
    <mo>=</mo>
    <msup><mi>a</mi><mn>2</mn></msup>
    <mo>+</mo>
    <msup><mi>b</mi><mn>2</mn></msup>
    <mo>&#x2212;</mo>
    <mn>2</mn><mi>a</mi><mi>b</mi>
    <mi>cos</mi><mo>&#x2061;</mo><mi>C</mi>
  </mrow>
</math>
c^2 = a^2 + b^2 - 2ab cos C
cSide = Sqrt[a^2 + b^2 - 2 a b Cos[angleC Degree]]
c := sqrt(a^2 + b^2 - 2*a*b*cos(C*Pi/180));
c = sqrt(a^2 + b^2 - 2*a*b*cosd(C));
c^2 = a^2 + b^2 - 2ab cos(C)
Law of sines (the bridge between sides and opposite angles)
a/sin A = b/sin B = c/sin C = 2R
\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C} = 2R
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mfrac><mi>a</mi><mrow><mi>sin</mi><mo>&#x2061;</mo><mi>A</mi></mrow></mfrac>
    <mo>=</mo>
    <mfrac><mi>b</mi><mrow><mi>sin</mi><mo>&#x2061;</mo><mi>B</mi></mrow></mfrac>
    <mo>=</mo>
    <mfrac><mi>c</mi><mrow><mi>sin</mi><mo>&#x2061;</mo><mi>C</mi></mrow></mfrac>
    <mo>=</mo>
    <mn>2</mn><mi>R</mi>
  </mrow>
</math>
a/sin A = b/sin B = c/sin C = 2R
bSide = a Sin[angleB Degree]/Sin[angleA Degree]
b := a*sin(B*Pi/180)/sin(A*Pi/180);
b = a*sind(B)/sind(A);
a/sin(A) = b/sin(B) = c/sin(C) = 2R
Area (two sides and the included angle)
S = (1/2)·ab·sin C
S = \frac{1}{2}ab\sin C
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>S</mi>
    <mo>=</mo>
    <mfrac><mn>1</mn><mn>2</mn></mfrac>
    <mi>a</mi><mi>b</mi>
    <mi>sin</mi><mo>&#x2061;</mo><mi>C</mi>
  </mrow>
</math>
S = 1/2 ab sin C
area = (1/2) a b Sin[angleC Degree]
S := (1/2)*a*b*sin(C*Pi/180);
S = a*b*sind(C)/2;
S = (1/2)ab sin(C)
Heron's formula (area from three sides)
s = (a+b+c)/2,  S = √(s(s−a)(s−b)(s−c))
s = \frac{a+b+c}{2}, \quad S = \sqrt{s(s-a)(s-b)(s-c)}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>S</mi>
    <mo>=</mo>
    <msqrt>
      <mi>s</mi>
      <mo>(</mo><mi>s</mi><mo>&#x2212;</mo><mi>a</mi><mo>)</mo>
      <mo>(</mo><mi>s</mi><mo>&#x2212;</mo><mi>b</mi><mo>)</mo>
      <mo>(</mo><mi>s</mi><mo>&#x2212;</mo><mi>c</mi><mo>)</mo>
    </msqrt>
  </mrow>
</math>
S = sqrt(s(s-a)(s-b)(s-c))
area = Sqrt[s (s - a) (s - b) (s - c)] /. s -> (a + b + c)/2
s := (a+b+c)/2; S := sqrt(s*(s-a)*(s-b)*(s-c));
s = (a+b+c)/2; S = sqrt(s*(s-a)*(s-b)*(s-c));
S = √(s(s-a)(s-b)(s-c))
Radius of the inscribed circle (inradius)
r = S/s
r = \dfrac{S}{s}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>r</mi>
    <mo>=</mo>
    <mfrac><mi>S</mi><mi>s</mi></mfrac>
  </mrow>
</math>
r = S/s
inradius = area/s
r := S/s;
r = S/s;
r = S/s
Radius of the circumscribed circle (circumradius)
R = abc/(4S)
R = \dfrac{abc}{4S}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>R</mi>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>a</mi><mi>b</mi><mi>c</mi></mrow>
      <mrow><mn>4</mn><mi>S</mi></mrow>
    </mfrac>
  </mrow>
</math>
R = (abc)/(4S)
circumradius = a b c/(4 area)
R := a*b*c/(4*S);
R = a*b*c/(4*S);
R = abc/(4S)

How to have ChatGPT  do the calculation

You are a calculation assistant for triangles. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

In a triangle, side a = 7, side b = 10 and angle A = 40° (angle A is the angle opposite side a).
1. Use the law of sines to find angle B. Note that with these conditions there may be two possible triangles (the ambiguous case). If there are two solutions, show both.
2. For each solution, find the remaining angle C, side c and the area.

Show the formulas you used and the numbers from the execution result in a table.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.