COS
Returns the cosine of an angle in radians.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=COS(number)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
number | number | Required | — |
How it works
Cosine is the horizontal coordinate on the unit circle at angle x, measured in radians. Its real domain is unrestricted.
Remarks
- Input must be in radians.
- Supports elementwise evaluation for array inputs.
Examples
Read the unit-circle horizontal coordinate at half a radian.
Formula =COS(0.5)
Expected result 0.877582561890373
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Opposite angles have the same horizontal coordinate.
Formula =COS(-0.5)
Expected result 0.877582561890373
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
At zero radians, the horizontal coordinate is one.
Formula =COS(0)
Expected result 1
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
The text “invalid” cannot be used as the input to the cosine.
Formula =COS("invalid")
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Cosine at PI
Formula =COS(PI())
Expected result -1
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Why can COS look wrong for degree values like 60?
COS interprets 60 as radians, not degrees; use COS(RADIANS(60)).