Trigonometry and triangle calculators

Solve a triangle right here from any three known sides or angles, or open one of six free tools that show their working: sin, cos and tan of any angle, the unit circle chart, right triangles, Pythagorean triples, any triangle, and degrees, minutes and seconds. The table further down matches what you know to the right one.

6 calculatorsBy Hira Noor, mathematicianLast reviewed
Try

Side a is opposite angle A, b is opposite B and c is opposite C. For a right triangle where you know only two sides, use the Pythagorean theorem calculator.

Angle unit

Radians accept multiples of π such as pi/3 or 2pi/5.

Result

Solved triangle: a = 5, b = 6, c = 7; A = 44.4153086°, B = 57.12165044°, C = 78.46304097°

Solved triangle

a = 5, b = 6, c = 7; A = 44.4153086°, B = 57.12165044°, C = 78.46304097°

Scalene acute triangle

Area
14.69693846
Perimeter
18
Heights h_a, h_b, h_cPerpendicular distance from each vertex to the opposite side
5.878775383, 4.898979486, 4.199125273
Medians m_a, m_b, m_cFrom each vertex to the midpoint of the opposite side
6.020797289, 5.291502622, 4.272001873
Inradius rr = area / s
1.632993162
Circumradius RR = a / (2 sin A)
3.572172542
Type
Scalene, acute
Semiperimeter s
9

The triangle has sides 5, 6 and 7 and angles 44.4153086°, 57.12165044° and 78.46304097°. It is scalene and acute, with area 14.69693846 and perimeter 18.

Angles are in degrees. Values are rounded to 10 significant digits.

The solved triangle
ABCa = 5b = 6c = 7
Sides and angles
PartValueSource
Side a5Given
Side b6Given
Side c7Given
Angle A44.4153086°Calculated
Angle B57.12165044°Calculated
Angle C78.46304097°Calculated
Step-by-step working (6 steps)
  1. Known: SSS

    Given a = 5, b = 6, c = 7.

  2. Law of cosines for angle A

    cos⁡A=b2+c2−a22bc=62+72−522⋅6⋅7=0.7142857143⇒A=44.4153086∘\cos A = \frac{b^2 + c^2 - a^2}{2bc} = \frac{6^2 + 7^2 - 5^2}{2 \cdot 6 \cdot 7} = 0.7142857143 \;\Rightarrow\; A = 44.4153086^{\circ}
  3. Law of cosines for angle B

    cos⁡B=a2+c2−b22ac=52+72−622⋅5⋅7=0.5428571429⇒B=57.12165044∘\cos B = \frac{a^2 + c^2 - b^2}{2ac} = \frac{5^2 + 7^2 - 6^2}{2 \cdot 5 \cdot 7} = 0.5428571429 \;\Rightarrow\; B = 57.12165044^{\circ}
  4. Angle sum for C

    The angles of a triangle add up to 180°.

    C=180∘−44.4153086∘−57.12165044∘=78.46304097∘C = 180^{\circ} - 44.4153086^{\circ} - 57.12165044^{\circ} = 78.46304097^{\circ}
  5. Area with Heron’s formula

    The semiperimeter is s = (a + b + c)/2 = 9.

    K=s(s−a)(s−b)(s−c)=14.69693846K = \sqrt{s(s-a)(s-b)(s-c)} = 14.69693846
  6. Check with ½ab sin C

    K=12absin⁡C=12⋅5⋅6sin⁡78.46304097∘=14.69693846K = \tfrac{1}{2}ab\sin C = \tfrac{1}{2} \cdot 5 \cdot 6 \sin 78.46304097^{\circ} = 14.69693846

The full triangle calculator adds the formulas, worked examples and a guide to every case.

Calculators in Trigonometry

Trigonometry Calculator

All six trig functions of an angle, or the angle from a ratio, with exact values, quadrant and steps.

Unit Circle

Unit circle chart in degrees and radians with exact (cos θ, sin θ), tan, a point finder and practice.

Triangle Calculator

Solve any triangle from SSS, SAS, ASA, AAS or SSA, with law of sines and cosines steps and the ambiguous case.

Which triangle calculator do I need?

Start from what you already know. Each example opens its calculator with the values filled in and the answer worked out.

Known values, an example of each and the calculator that solves it
What you knowExample (opens solved)Calculator
An angle, and you want sin, cos, tan, csc, sec or cotsin 30° = 1/2Sin cos tan calculator
An angle, and you want its point (cos θ, sin θ) on the unit circle150° is at (−√3/2, 1/2)Unit circle
The whole unit circle chart in degrees and radiansAll 16 special anglesUnit circle
Two sides of a right triangleLegs 3 and 4, hypotenuse 5Right triangle calculator
One side and one acute angle of a right triangleHypotenuse 10, angle 35°Right triangle calculator
Three sides (SSS)5, 6 and 7Triangle calculator
Two sides and the angle between them (SAS)8, 11 and 37°Triangle calculator
Two angles and a side (ASA or AAS)50°, 65° and 12Triangle calculator
Two sides and an angle not between them (SSA)7, 10 and 40°: two trianglesTriangle calculator
Three sides, and you want the area or a height13, 14 and 15: area 84, height to side 14 is 12Triangle calculator
An isosceles or equilateral triangle5, 5 and 6: base angles 53.13°, area 12Triangle calculator
A 45-45-90 triangleLegs 1 and 1: hypotenuse √2 ≈ 1.414Right triangle calculator
A 30-60-90 triangleHypotenuse 2, angle 30°: legs 1 and √3 ≈ 1.732Right triangle calculator
Three whole numbers, and you want to know if they form a right triangle9, 12 and 15: yes, 3 × (3, 4, 5)Pythagorean triples calculator
A list of right triangles with whole-number sidesAll 52 triples up to 100Pythagorean triples calculator
A latitude, longitude or other angle in decimal degrees, radians or DMS40.7128° N = 40° 42′ 46.08″ NDMS to decimal degrees converter
Polar coordinates (r, θ), and you want rectangular (x, y), or the reverse(2, 60°) = (1, √3)Polar to rectangular calculator

Both triangle calculators give the area and perimeter of the triangle they solve, and the triangle calculator adds the three heights, inradius and circumradius. Triangle angles are entered in degrees; the sin cos tan calculator also accepts radians and gradians.

Sin, cos and tan in a right triangle

In a right triangle, sine, cosine and tangent are ratios of two sides, measured from one of the acute angles. The side across from the angle is the opposite, the longest side is the hypotenuse, and the remaining side next to the angle is the adjacent. SOH CAH TOA is the usual way to remember them.

The opposite and adjacent sides depend on which angle you start from; the hypotenuse is always the side across from the right angle.
The three trig ratios (SOH CAH TOA)
RatioMemory aidFormulaUse it when you know or want
SineSOHsin⁡θ=oppositehypotenuse\sin\theta = \frac{\text{opposite}}{\text{hypotenuse}}The opposite side and the hypotenuse
CosineCAHcos⁡θ=adjacenthypotenuse\cos\theta = \frac{\text{adjacent}}{\text{hypotenuse}}The adjacent side and the hypotenuse
TangentTOAtan⁡θ=oppositeadjacent\tan\theta = \frac{\text{opposite}}{\text{adjacent}}The opposite and adjacent sides
  1. Label the sides

    Mark the angle you know or want, then name the opposite side, the adjacent side and the hypotenuse from that angle.

  2. Choose the ratio

    Pick the one ratio that uses the side you know and the side (or angle) you want: SOH, CAH or TOA.

  3. Rearrange and solve

    To find a side, multiply or divide. To find an angle, use the inverse function: sin−1\sin^{-1}, cos−1\cos^{-1} or tan−1\tan^{-1}.

The full guide, how to use sin, cos and tan, works through five more examples, including finding the hypotenuse and the angle of a ramp.

Example: find a side

A right triangle has a hypotenuse of 10 and an angle of 35°. How long is the side opposite the 35° angle? You know the hypotenuse and want the opposite, so use SOH: opposite=10sin⁡35°\text{opposite} = 10 \sin 35°, which is 10×0.57358=5.735810 \times 0.57358 = 5.7358.

AnswerThe opposite side is about 5.736, and the adjacent side is 10cos⁡35°≈8.19210 \cos 35° \approx 8.192. Open it in the right triangle calculator.

Example: find an angle

The legs of a right triangle are 3 and 4. What is the angle opposite the side of length 3? You know the opposite and adjacent sides, so use TOA: tan⁡A=34=0.75\tan A = \frac{3}{4} = 0.75, so A=tan−1(0.75)A = \tan^{-1}(0.75).

AnswerA≈36.87°A \approx 36.87°, and the other acute angle is 90°−36.87°=53.13°90° - 36.87° = 53.13°. Open it in the right triangle calculator.

Check degrees or radians first

The most common wrong answer comes from the angle mode. sin⁡30°\sin 30° is 0.5, but sin⁡30\sin 30 in radians is about −0.988. Degrees vs radians explains when each is used.

Exact values of sin, cos and tan

These angles come up so often that their exact values are worth knowing. The sin cos tan calculator gives exact forms like these, with the decimal alongside, for every multiple of 15° or 18°, and the unit circle shows all 16 special angles around the full circle.

Exact trig values at the special angles
AngleRadianssin θcos θtan θ
0°00001100
30°π6\frac{\pi}{6}12\frac{1}{2}32\frac{\sqrt{3}}{2}33\frac{\sqrt{3}}{3}
45°π4\frac{\pi}{4}22\frac{\sqrt{2}}{2}22\frac{\sqrt{2}}{2}11
60°π3\frac{\pi}{3}32\frac{\sqrt{3}}{2}12\frac{1}{2}3\sqrt{3}
90°π2\frac{\pi}{2}1100Undefined

Solving triangles that are not right-angled

SOH CAH TOA works only when one angle is 90°. For any other triangle, label the sides aa, bb and cc with the opposite angles AA, BB and CC, and use one of two laws.

asin⁡A=bsin⁡B=csin⁡C\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}
Law of sines: use it when you know an angle and the side opposite it (ASA, AAS or SSA)
c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C
Law of cosines: use it for three sides (SSS) or two sides and the angle between them (SAS)

Example: three sides 5, 6 and 7

  1. Find the largest angle with the law of cosines

    cos⁡C=52+62−722×5×6=1260=0.2\cos C = \frac{5^2 + 6^2 - 7^2}{2 \times 5 \times 6} = \frac{12}{60} = 0.2, so C=cos−1(0.2)≈78.46°C = \cos^{-1}(0.2) \approx 78.46°.

  2. Find a second angle the same way

    cos⁡A=62+72−522×6×7=6084\cos A = \frac{6^2 + 7^2 - 5^2}{2 \times 6 \times 7} = \frac{60}{84}, so A≈44.42°A \approx 44.42°.

  3. The angles add to 180°

    B=180°−78.46°−44.42°≈57.12°B = 180° - 78.46° - 44.42° \approx 57.12°.

  4. Find the area with Heron’s formula

    The semiperimeter is s=9s = 9, so the area is 9×4×3×2=216=66≈14.697\sqrt{9 \times 4 \times 3 \times 2} = \sqrt{216} = 6\sqrt{6} \approx 14.697.

AnswerA≈44.42°A \approx 44.42°, B≈57.12°B \approx 57.12°, C≈78.46°C \approx 78.46° and the area is about 14.697. Open it in the triangle calculator.

SSA can give two triangles

With two sides and an angle that is not between them, the data can fit two different triangles, one or none. For a=7a = 7, b=10b = 10 and A=40°A = 40°, the law of sines gives B≈66.67°B \approx 66.67° or B≈113.33°B \approx 113.33°, and both are valid. The triangle calculator solves and lists both.

About these calculators

Each calculator shows its working: the ratio or law it used, each substitution and the result, so you can follow the method and check your own steps. Where an exact answer exists, such as sin⁡60°=32\sin 60° = \frac{\sqrt{3}}{2} or a hypotenuse of 2\sqrt{2}, you get it alongside the decimal.

The triangle calculator checks your input before it solves: it warns when three sides break the triangle inequality, when angles add to 180° or more, and when SSA data fit two triangles or none. The DMS to decimal degrees converter handles latitude and longitude with N, S, E and W, and rounds seconds without producing 60″.

All of these calculators are free, need no account and run in your browser. Results are checked against reference values by automated tests; the methodology page describes how. For trig inside longer expressions, use the scientific calculator, and to see the curves, plot sin x in the graphing calculator.

Frequently asked questions

How do I know whether to use sin, cos or tan?

Label the sides from the angle you are working with, then pick the ratio that links the side you know to the side you want. Opposite and hypotenuse: sine. Adjacent and hypotenuse: cosine. Opposite and adjacent: tangent.

What does SOH CAH TOA stand for?

Sine is Opposite over Hypotenuse, Cosine is Adjacent over Hypotenuse, and Tangent is Opposite over Adjacent. It applies to the acute angles of a right triangle.

Can you solve a right triangle with only one side?

Not with the side alone. You need one more value: a second side or one of the acute angles. With a side and an angle, SOH CAH TOA gives the other two sides, and the missing angle is 90° minus the known one.

When do I use the law of sines instead of the law of cosines?

Use the law of sines when you know an angle and its opposite side (ASA, AAS or SSA). Use the law of cosines when you know three sides (SSS) or two sides and the angle between them (SAS).

Should I use degrees or radians?

Use degrees for most geometry and surveying problems, and radians for calculus, physics formulas and anywhere angles are multiplied by lengths, such as arc length s = rθ.

Why does tan 90° give an error?

tan θ = sin θ / cos θ, and cos 90° = 0, so the division is undefined. The graph of tan has a vertical asymptote there.