COS

Calculate the cosine of an angle (in radians) with Excel's COS function.

Math & Trigonometry
|
Excel All versions
|
Google Sheets Supported

Spreadsheet editor

Syntax

=COS(number) Returns: Number

Arguments

Argument Required Description
number Yes The angle in radians for which you want the cosine.

About

The COS function returns the cosine of an angle you provide in radians. The result is always a number between -1 and 1. In a right triangle, cosine is the ratio of the adjacent side to the hypotenuse.

If your angle is in degrees, convert it first. You can multiply by PI()/180 or use the RADIANS function. For example, =COS(RADIANS(60)) returns 0.5 because the cosine of 60 degrees is exactly 0.5.

COS is useful whenever you work with angles, waves, or circular motion. Use SIN and TAN for the other core trig functions, or ACOS to go from a cosine value back to an angle.

Examples

Floating-point precision with COS

Notice that COS(PI()/2) returns a tiny number like 6.12E-17 instead of exactly 0. Wrap COS with ROUND to clean up floating-point noise when you need tidy results.

Spreadsheet editor

Degrees vs radians mistake

Compare the wrong way and the right way side by side. Column B passes raw degrees to COS, column C wraps them with RADIANS first. Change the angles to see how far off the wrong approach is.

Spreadsheet editor

Watch out for

Passing degrees instead of radians

You type =COS(60) expecting the cosine of 60 degrees, but COS treats 60 as radians and returns a completely different result.

Wrap the value with RADIANS first: =COS(RADIANS(60)). Or multiply by PI()/180.

Expecting exact zeros

=COS(PI()/2) returns a tiny number like 6.12E-17 instead of exactly 0 due to floating point math.

Use ROUND to clean up the result if you need a tidy zero, for example =ROUND(COS(PI()/2),10).

Confusing COS with COSH

Using COSH by mistake returns the hyperbolic cosine, which is a different calculation.

Use COS for standard trigonometric cosine. COSH is the hyperbolic cosine, which grows without bound and is used in engineering contexts like catenary curves.

Tips & notes

COS works in every version of Excel and in Google Sheets. It always expects radians, so keep the RADIANS function handy when your data is in degrees.

Common questions

Does COS accept angles in degrees?

No. COS only works with radians. Convert degrees first with =COS(RADIANS(degrees)) or =COS(degrees*PI()/180).

What range of values can COS return?

COS always returns a number between -1 and 1. At 0 radians (0 degrees) it returns 1, and at PI radians (180 degrees) it returns -1.

How do I get the angle back from a cosine value?

Use the ACOS function. For example, =ACOS(0.5) returns about 1.047 radians (60 degrees). Wrap it with DEGREES if you want the answer in degrees: =DEGREES(ACOS(0.5)).