Trigonometry Calculator
Sine of 30 degrees is 0.5000, cosine is 0.8660 and tangent is 0.5774, all in the first quadrant. The calculator also returns the three reciprocal functions and the two sides of the matching right triangle.
| Sine | |
| Cosine | |
| Tangent | |
| Cosecant (1 / sin) | |
| Secant (1 / cos) | |
| Cotangent (1 / tan) | |
| Degrees | |
| Radians | |
| Quadrant | |
| Reference angle | |
| Opposite side at hypotenuse 1 | |
| Adjacent side at hypotenuse 1 | |
Tangent, secant and cosecant are undefined where the denominator is zero, which is why 90 degrees returns a dash instead of a huge number. Everything runs in your browser, and nothing you type leaves the page.
Triangle side from two sides and the angle between them
Law of cosines: c squared = a squared + b squared - 2ab cos C. Angle C sits between sides a and b.
| Third side c | |
| Area | |
| Cosine of C used | |
Type an angle, choose degrees or radians, and read all six trig functions together with the quadrant, the reference angle and the sides of the right triangle behind the numbers.
Key takeaways
- Sine, cosine and tangent at 30 degrees are 0.5000, 0.8660 and 0.5774, and the reciprocal functions are 2.0000, 1.1547 and 1.7321
- One degree is pi/180 radians, so 65 degrees is 1.1345 radians and 1 radian is 57.2958 degrees
- Tangent has no value at 90 degrees and at every odd multiple of it, because the adjacent side is zero
- Inverse sine returns angles between -90 and 90 degrees only, so sin of 0.5 has a second valid answer at 150 degrees
- A 12 ft ladder leaning at 65 degrees reaches 10.876 ft up a wall and stands 5.071 ft from the base
On this page
What this trigonometry calculator answers
Sine, cosine and tangent take an angle and hand back a ratio between two sides of a right triangle. NIST's Digital Library of Mathematical Functions defines sine and cosine from the exponential function and sets tangent as sine divided by cosine (sections 4.14.1 to 4.14.4). For triangle work the older ratio definition is the useful one: sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, tangent is opposite over adjacent.
The three remaining functions are reciprocals and save a division. Cosecant is 1 divided by sine, secant is 1 divided by cosine, and cotangent is 1 divided by tangent. They show up in surveying, in alternating current formulas and in calculus integrals, which is why a calculator that only prints three functions sends people to a second tool.
| Function | Ratio of sides | At 30 degrees | Reciprocal at 30 degrees |
|---|---|---|---|
| Sine | opposite / hypotenuse | 0.5000 | cosecant 2.0000 |
| Cosine | adjacent / hypotenuse | 0.8660 | secant 1.1547 |
| Tangent | opposite / adjacent | 0.5774 | cotangent 1.7321 |
At 30 degrees the side opposite the angle is exactly half the hypotenuse, which is where 0.5 comes from rather than from a table. Double the hypotenuse to 2 m and the opposite side is 1 m, so the ratio holds at any size of triangle. That scale independence is the reason trig works on a map, a roof and a star chart with the same numbers.
Degrees, radians, and the mode switch
A degree is a fraction of a full turn, and the radian is the SI unit for plane angle. NIST states the conversion in Table 8 of SP 330 Section 4: one degree equals pi/180 radians, one minute equals pi/10,800 radians, one second equals pi/648,000 radians. A full turn is 2 pi radians, so 180 degrees is 3.1416 radians.
| Degrees | Radians | Sine | Cosine |
|---|---|---|---|
| 0 | 0.0000 | 0.0000 | 1.0000 |
| 30 | 0.5236 | 0.5000 | 0.8660 |
| 45 | 0.7854 | 0.7071 | 0.7071 |
| 60 | 1.0472 | 0.8660 | 0.5000 |
| 90 | 1.5708 | 1.0000 | 0.0000 |
| 180 | 3.1416 | 0.0000 | -1.0000 |
Multiply degrees by 0.017453 to get radians. A 65 degree roof angle is 65 x 0.017453 = 1.1345 radians. Going the other way, multiply radians by 57.2958, so 1.1345 radians returns 65.00 degrees.
The mode switch is the first place answers break. Ask for the sine of 30 with radians selected and the calculator answers -0.9880, because 30 radians is 4.7746 full turns plus 4.8673 radians, landing at 278.87 degrees in the fourth quadrant. The number is correct for the question asked and wrong for the question meant. On a spreadsheet the same trap exists: SIN(30) treats the 30 as radians, and RADIANS(30) is the conversion you wanted.
Exact values worth memorizing
Five angles cover most textbook and job-site work, and their values are worth carrying in your head because they let you sanity check any calculator output.
| Angle | Sine | Cosine | Tangent |
|---|---|---|---|
| 0 degrees | 0 | 1 | 0 |
| 30 degrees | 1/2 = 0.5000 | sqrt(3)/2 = 0.8660 | 1/sqrt(3) = 0.5774 |
| 45 degrees | sqrt(2)/2 = 0.7071 | sqrt(2)/2 = 0.7071 | 1 |
| 60 degrees | sqrt(3)/2 = 0.8660 | 1/2 = 0.5000 | sqrt(3) = 1.7321 |
| 90 degrees | 1 | 0 | undefined |
Notice that 30 and 60 swap their sine and cosine values, which falls out of the two angles adding to 90 degrees. The identity sine squared plus cosine squared equals 1 is a quick check on any pair: at 45 degrees, 0.7071 x 0.7071 = 0.5000 twice, and the two halves add to 1.
Tangent at 90 degrees has no finite value. As the angle approaches 90 from below, tangent climbs past 10, 100 and 1,000 without settling, because the adjacent side shrinks toward zero. A calculator that prints a huge number such as 1.6331e16 at 90 degrees is showing floating point noise, not an answer. The same hole opens at 270 degrees and at every odd multiple of 90.
Solving a right triangle from one angle and one side
One angle and one side fix the whole triangle, and the three ratios do the rest. A 12 ft ladder leaning at 65 degrees from the ground reaches a height of 12 x 0.9063 = 10.876 ft, and its base sits 12 x 0.4226 = 5.071 ft from the wall. The two legs square and add to the hypotenuse squared: 10.876 x 10.876 = 118.287 and 5.071 x 5.071 = 25.715, which sum to 144.002, the square of 12 within rounding.
| What you know | What to use | Result |
|---|---|---|
| Hypotenuse and angle | opposite = hypotenuse x sine, adjacent = hypotenuse x cosine | 10.876 ft and 5.071 ft |
| Opposite and angle | hypotenuse = opposite / sine | 12.000 ft |
| Two legs | tangent = opposite / adjacent, then inverse tangent | 64.99 degrees |
| Leg and hypotenuse | sine = opposite / hypotenuse, then inverse sine | 64.99 degrees |
The fourth row is the one people fumble. A 40 ft tree seen from 30 ft away gives 40 / 30 = 1.3333, and the inverse tangent of 1.3333 is 53.13 degrees. That is the same measurement the angle of elevation calculator handles with the observer's height included, so use that page when the eye level sits above the ground and the height in question starts at the base of a hill.
This page takes the angle first. If you have two sides and no angle, the right triangle calculator runs the same maths from the side lengths and returns the missing side and both acute angles, which is the faster route for a wall that is already built.
Inverse functions: one answer, two angles
Inverse sine returns values between -90 and 90 degrees, inverse cosine between 0 and 180 degrees, and inverse tangent between -90 and 90 degrees. Those ranges are chosen so each function stays one to one, and the cost is that a single ratio can hide a second angle.
Sine of 0.5 has two answers inside one turn: 30 degrees and 150 degrees, because the sine of 150 is also 0.5. Cosine of 0.5 gives 60 degrees and 300 degrees. Tangent of -1 gives -45 degrees and 135 degrees, since tangent repeats every 180 degrees rather than every 360.
The four quadrant signs explain it. In the first quadrant all six functions are positive. In the second only sine and cosecant are positive. In the third only tangent and cotangent are positive. In the fourth only cosine and secant are positive. A ramp that drops 3 ft over a 20 ft run gives an inverse tangent of 8.53 degrees for the slope itself, and the direction pointing back up the ramp is 188.53 degrees, which is the same line read the other way.
Programming languages solve this with a two argument arctangent. atan2(y, x) reads the signs of both components instead of their ratio, so it returns the quadrant directly: atan2(-3, -20) gives -171.47 degrees rather than 8.53. When a spreadsheet or a script returns an angle that is 180 degrees off, the missing piece is almost always a sign that got divided away.
When the triangle has no right angle
Two rules cover every other triangle. The law of sines says a / sin A equals b / sin B equals c / sin C, and it needs one matching side and angle pair. The law of cosines says c squared equals a squared plus b squared minus 2ab cos C, and it needs two sides and the angle between them.
Take a triangle with sides of 7 and 9 and an included angle of 50 degrees. The third side comes from 49 + 81 - 80.99 = 49.01, where 80.99 is 2 x 7 x 9 x 0.6428 and 0.6428 is the cosine of 50 degrees. The square root of 49.01 is 7.00, so the third side is 7.00 units. The area is 0.5 x 7 x 9 x 0.7660 = 24.13 square units, using the sine of the same angle.
The triangle block under the calculator runs the cosine rule on the two sides and the angle you type in, which is the fastest way to check this example before reading it by hand.
For the law of sines, take angle A of 30 degrees opposite a side of 10, with angle B of 45 degrees. The side b is 10 x 0.7071 / 0.5000 = 14.142. The third angle is 105 degrees and its side is 10 x 0.9659 / 0.5000 = 19.318.
The ambiguous case is the trap in the law of sines. When you know two sides and an angle that is not between them, the inverse sine can return an acute angle while the triangle on the page has an obtuse one. Check whether the angles you have already add to less than 180 degrees, and if the remaining angle comes out negative, the second solution is the real one.
Ramps, roofs and grades
Building work is where tangent earns its keep, because a slope is a rise over a run and the angle follows from the inverse tangent. The ADA Standards cap a ramp at a slope of 1:12, which is 4.76 degrees, and require a landing for every 30 in of rise. A 30 in rise therefore needs 30 ft of run before any landing is counted.
| Roof pitch | Rise over run | Angle | Grade in percent |
|---|---|---|---|
| 4 in 12 | 0.3333 | 18.43 degrees | 33.3 |
| 6 in 12 | 0.5000 | 26.57 degrees | 50.0 |
| 9 in 12 | 0.7500 | 36.87 degrees | 75.0 |
| 12 in 12 | 1.0000 | 45.00 degrees | 100.0 |
Grade and angle are different numbers for the same slope, and mixing them is a common source of error on a site plan. A 50 percent grade is not a 50 degree angle; it is 26.57 degrees, because percent grade is 100 times the tangent. The 45 degree case is the only one where the two agree, at 100 percent.
Rafter length follows from the same triangle. A 6 in 12 roof spanning 24 ft has a run of 12 ft and a rise of 6 ft, so the rafter is the square root of 144 + 36, which is 13.416 ft before the overhang. Cutting the birdsmouth at 26.57 degrees rather than 26 degrees leaves a gap of about 1/8 in over a 12 in seat cut, which is enough to show at the fascia.
Where trigonometry answers go wrong
Four mistakes account for most wrong answers, and none of them is arithmetic.
Mode is first. A calculator in radian mode returning -0.9880 for the sine of 30 is doing exactly what it was told, and a spreadsheet doing the same is worse because the cell still looks plausible.
Undefined points are second. Tangent at 90 degrees, secant at 90 degrees and cosecant at 0 degrees have no finite value, and software answers with a huge number or an error. Any result above 1,000 near a right angle should be read as undefined.
Rounded intermediate values are third. Carrying 0.71 instead of 0.7071 through a chain of three multiplications moves a 100 ft result by about 4 in. Keep four decimals in the middle and round only the final answer.
Mixing units inside a formula is fourth, and the arc length formula shows it best. Arc length is radius times angle in radians, so a 10 in radius swept through 65 degrees gives 10 x 1.1345 = 11.345 in. Feed the 65 in directly and the answer comes out 650 in, which is a unit error rather than a maths error. The small angle shortcut has the same condition: sine of theta is close to theta only when theta is in radians, and at 5 degrees the two agree to 0.1 percent, with 0.0873 against sine 0.0872.
Frequently asked questions
How do I find sine, cosine and tangent without a calculator?
Use the side ratios on a right triangle: sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, tangent is opposite over adjacent. For a 3-4-5 triangle the small angle has sine 0.6000, cosine 0.8000 and tangent 0.7500.
What is the sine of 30 degrees?
0.5000, because the side opposite a 30 degree angle is exactly half the hypotenuse. Cosine is 0.8660 and tangent is 0.5774 at the same angle.
How many radians are in 180 degrees?
3.1416 radians, since 180 degrees is half a turn and a full turn is 2 pi radians. One degree is pi/180 radians, which is 0.017453.
Why does my calculator give a negative sine for 30?
It is set to radians. 30 radians is 4.7746 turns plus 4.8673 radians, which lands at 278.87 degrees in the fourth quadrant, where sine is -0.9880. Switch to degrees to get 0.5000.
What is the tangent of 90 degrees?
Undefined. The adjacent side shrinks to zero as the angle reaches 90 degrees, so the ratio has no finite value. Software often prints a very large number instead, which is rounding noise.
Why does inverse sine give only one answer?
The inverse is restricted to -90 to 90 degrees so that it stays a function. The sine of 0.5 also equals the sine of 150 degrees, and that second angle has to be worked out from the quadrant rather than read off the key.
How do I solve a right triangle with one angle and one side?
Multiply the known side by sine or cosine to get the other leg, or divide to get the hypotenuse. A 12 ft ladder at 65 degrees reaches 10.876 ft up the wall and sits 5.071 ft out from it.
What is the difference between tangent and grade?
Tangent is the rise divided by the run. Grade is that same ratio multiplied by 100. A 6 in 12 pitch is a tangent of 0.5000, an angle of 26.57 degrees and a grade of 50 percent.
Can I use the law of cosines on a right triangle?
Yes, and it collapses into the Pythagorean theorem. With an angle of 90 degrees the cosine is 0, so the 2ab term disappears and c squared equals a squared plus b squared.
What is the law of sines used for?
It finds a missing side or angle when you know one matching pair. With angle A of 30 degrees opposite a side of 10 and angle B of 45 degrees, side b is 10 x 0.7071 / 0.5000 = 14.142.
How do I convert an angle to a slope in inches per foot?
Multiply the tangent by 12. An angle of 26.57 degrees has a tangent of 0.5000, so the slope is 6 in of rise per 12 in of run.
What is a reference angle?
The acute angle between the terminal side and the x axis. For 150 degrees the reference angle is 30 degrees, and the sine of 150 equals the sine of 30, which is 0.5000.
Why is the arc length formula giving a huge number?
The angle went in as degrees. Arc length is radius times radians, so 65 degrees has to become 1.1345 first. A 10 in radius then gives 11.345 in rather than 650.
What is the sine of 45 degrees in exact form?
The square root of 2 divided by 2, which is 0.7071. Cosine has the same value at 45 degrees, and tangent is exactly 1 because the two legs are equal.
Spotted a wrong number or a broken result?
More Math tools
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.