Excel trigonometric functions: Calculate sine, cosine and tangent
In Excel, use SIN, COS and TAN to calculate sine, cosine and tangent. These functions take radians, so use RADIANS if your input is in degrees. For example, =SIN(RADIANS(30)) returns approximately 0.5.
Calculate from an angle in degrees
Set up a small worksheet so the input unit stays visible and the same formulas can be filled down for additional angles.
- Label A1 ‘Angle (°)’ and enter the number
30in A2. Write the degree symbol in the heading so that A2 stays numeric. - Label B1 ‘Sine’. Enter
=SIN(RADIANS(A2))in B2,=COS(RADIANS(A2))in C2 and=TAN(RADIANS(A2))in D2. - Check for approximately 0.5, 0.866025 and 0.577350, respectively. Change A2 to 45 and check that D2 is about 1. For more angles in column A, fill B2:D2 down.
Radians are another unit for angles. Since 180° equals π radians, 45° equals π/4. If your input is already in radians, put it directly into the function. For instance, =SIN(PI()/4) and =SIN(RADIANS(45)) use the same angle. Entering =SIN(30) uses 30 radians and gives about −0.988.
Microsoft function documentation · SIN · RADIANS
Choose a trigonometric function or its reciprocal
In a right triangle, the opposite side faces the chosen angle, the adjacent leg touches it, and the hypotenuse faces the right angle. In this table, θ is the angle in radians.
| Value | Excel function | Side ratio or reciprocal |
|---|---|---|
| Sine | SIN(θ) |
Opposite ÷ hypotenuse |
| Cosine | COS(θ) |
Adjacent ÷ hypotenuse |
| Tangent | TAN(θ) |
Opposite ÷ adjacent |
| Cosecant | CSC(θ) |
1 ÷ SIN(θ) |
| Secant | SEC(θ) |
1 ÷ COS(θ) |
| Cotangent | COT(θ) |
COS(θ) ÷ SIN(θ) |
With 30° in A2, =CSC(RADIANS(A2)) and =1/SIN(RADIANS(A2)) both give about 2. If your Excel version does not recognize a reciprocal function, check which versions support it or use the reciprocal shown in the table where the denominator is nonzero.
Microsoft’s Excel trigonometry and angle conversion reference
Find an angle from a ratio
The inverse functions ASIN, ACOS and ATAN return angles. If the sine is 1/2, =DEGREES(ASIN(1/2)) gives about 30° in the principal range. ASIN returns an angle from −90° to 90° after conversion. Since 150° has the same sine, check the angle range relevant to your problem.
Microsoft’s arcsine documentation
Interpret a huge tangent result at 90°
Tangent is undefined at angles where cosine is zero. Excel represents π approximately, so the cosine of the converted 90° can be very small and =TAN(RADIANS(90)) can display a huge number. That number is unsuitable as the tangent of 90°. For the same reason, =SIN(PI()) may return a tiny value close to zero.
Distinguish exactly 90° from a nearby angle such as 89.999°. The latter has a valid tangent, which can be very large. To change the display of a valid result, adjust the cell’s decimal places. Use ROUND if subsequent formulas should use the rounded value.
