COS Function (OpenOffice Calc)
The COS function in OpenOffice Calc returns the cosine of an angle (in radians). Learn syntax, degree conversion, examples, and best practices.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the COS Function Does ▾
- Computes the cosine of an angle
- Angle must be in radians
- Useful for geometry, waves, oscillations, and rotations
- Works across sheets
- Pairs naturally with SIN, TAN, and PI
COS is ideal when you need horizontal components or phase‑shifted waveforms.
Syntax ▾
COS(number)
Arguments:
- number — Angle in radians
If your angle is in degrees, convert it using:
Degrees * PI() / 180
Basic Examples ▾
Cosine of an angle in radians
=COS(PI())
Result: -1
Cosine of 60 degrees
=COS(60 * PI() / 180)
Result: 0.5
Cosine using a cell reference
=COS(A1)
(Assumes A1 is in radians.)
Convert degrees to radians inside COS
=COS(RADIANS(A1))
Advanced Examples ▾
Cosine wave function
=COS(2 * PI() * Frequency * Time)
Phase‑shifted sine wave (90° shift)
=COS(2 * PI() * f * t)
Equivalent to:
=SIN(2 * PI() * f * t + PI()/2)
Damped cosine wave
=EXP(-Decay * Time) * COS(2 * PI() * Frequency * Time)
Polar to Cartesian conversion
X:
=Radius * COS(AngleRadians)
Y:
=Radius * SIN(AngleRadians)
Oscillation model
=Amplitude * COS(2 * PI() * t / Period)
COS across sheets
=COS(Sheet1.A1)
COS in array formulas
=COS(A1:A10)
Confirm with Ctrl+Shift+Enter.
Cosine of a sum (wave interference)
=COS(A1 + A2)
Rotating a point by θ
New X:
=X0 * COS(θ) - Y0 * SIN(θ)
New Y:
=X0 * SIN(θ) + Y0 * COS(θ)
Common Errors and Fixes ▾
COS returns unexpected values
Almost always caused by:
- Using degrees instead of radians
- Forgetting to convert:
Degrees * PI() / 180 - Incorrect parentheses
COS returns Err:502 (Invalid argument)
Occurs when:
- Input is text
- Input is empty
- A malformed reference is used
COS ignores values you expected it to include
COS ignores:
- Text numbers (
"123") - Empty cells
- Logical values
- Errors
COS includes values you expected it to ignore
COS includes:
- Dates
- Times
- Numeric results of formulas
Err:508 — Missing parenthesis
Usually caused by:
- Missing
) - Using commas instead of semicolons
Best Practices ▾
- Always convert degrees to radians
- Use COS for horizontal components and phase‑shifted waves
- Use named ranges for angles and frequencies
- Keep parentheses clean in multi‑step trig formulas
- Pair COS with SIN for coordinate transformations
COS is just SIN shifted by 90° — use that relationship to simplify wave and rotation formulas.