The Excel COS function returns the cosine of an angle. Excel measures angles in radians, so degrees must be converted with RADIANS or π first.
Syntax
| Argument | Description | |
|---|---|---|
number | Required | The angle in radians whose cosine you want. Convert degrees with RADIANS(deg) or deg*PI()/180. |
How to use it
The most common mistake is feeding COS a number of degrees. Excel expects radians, so wrap the angle in RADIANS():
COS pairs with SIN and TAN for the other ratios, and with ACOS for the inverse (which returns an angle in radians — wrap it in DEGREES to read it back as degrees).
Why isn't COS(PI()/2) exactly 0? PI() is a finite decimal approximation of π, so =COS(PI()/2) returns roughly 6.1E-17 — effectively zero, just limited by floating-point precision.
Try it: interactive demo
Pick a COS example to see the formula and its result.
Practice workbook
Frequently asked questions
Why does COS(60) not give 0.5?
=COS(60) is the cosine of 60 radians (about -0.952). For 60 degrees use =COS(RADIANS(60)).How do I convert degrees to radians?
RADIANS(deg), or multiply by π/180: deg*PI()/180. Both give the same result.What is the inverse of COS?
ACOS returns the angle (in radians) whose cosine is a given value. Wrap it in DEGREES to read the angle in degrees.How do I get the secant from COS?
=1/COS(x), or use the dedicated SEC function in Excel 2013 and later.Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class