The COS function returns the cosine of an angle given in radians. It is a fundamental trigonometric function used in geometry, physics, engineering, and data analysis.
=COS(number)What does COS do?
The COS function in Excel calculates the cosine of an angle. Cosine is a trigonometric ratio that, for a right-angled triangle, equals the length of the adjacent side divided by the hypotenuse. In Excel, the angle must be supplied in radians, not degrees. If you have degrees, you can convert them using the RADIANS function or by multiplying by PI()/180.
Why does this matter for office workers and students? Trigonometry appears in many real-world tasks: calculating distances, modelling waves, analysing seasonal patterns, or solving geometry problems. Excel's COS function makes these calculations quick and repeatable, so you don't need a separate calculator or programming language.
Imagine you are an engineer analysing the force on a slanted beam, or a student plotting a cosine curve for a maths assignment. With COS, you can build a spreadsheet that automatically computes cosine values for any angle, update results instantly when inputs change, and combine COS with other functions for more complex analysis.
When to use COS
- Calculating the horizontal component of a force or velocity given an angle.
- Modelling periodic phenomena such as sound waves or seasonal sales cycles.
- Solving right-triangle problems in geometry or surveying.
- Converting polar coordinates to Cartesian coordinates in navigation or graphics.
- Analysing alternating current (AC) circuits in electrical engineering.
- Creating animations or simulations that require circular motion.
COS syntax
=COS(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The angle in radians for which you want the cosine. If you have degrees, convert them first, e.g., =COS(RADIANS(60)) or =COS(60*PI()/180). |
What it returns: The cosine of the given angle, a number between -1 and 1 inclusive.
COS examples
1 Basic Cosine of a Single Angle
This example shows the simplest use of COS. The goal is to find the cosine of an angle stored in cell A2. The formula =COS(A2) takes the value in A2 (which is in radians) and returns its cosine. Because A2 contains 0, the result is 1. This demonstrates that COS works directly on a cell reference.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Angle (radians) | |||
| 2 | 0 | 1 | ||
| 3 | 1.5708 | |||
| 4 | 3.1416 | |||
| 5 | 4.7124 | |||
| 6 | 6.2832 | |||
| 7 |
2 Cosine of Common Angles in Degrees
Here we convert degrees to radians before applying COS. The table lists angles in degrees. The formula =COS(RADIANS(A2)) first converts the degree value in A2 to radians, then computes the cosine. For 0 degrees, the result is 1; for 60 degrees, it is 0.5; for 90 degrees, it is approximately 0 (due to floating-point precision, Excel may return a very small number like 6.12E-17, but we show 0 for simplicity). This example highlights the need to convert units.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Angle (degrees) | |||
| 2 | 0 | 1 | ||
| 3 | 30 | |||
| 4 | 45 | |||
| 5 | 60 | |||
| 6 | 90 | |||
| 7 | 180 | |||
| 8 |
3 Horizontal Component of a Force
In physics, the horizontal component of a force is F * cos(θ). The table gives force magnitudes in newtons and angles in degrees. The formula =B2*COS(RADIANS(C2)) multiplies the force in B2 by the cosine of the angle in C2 (converted to radians). For a 100 N force at 0°, the horizontal component is 100 N. This shows how COS integrates with basic arithmetic for real calculations.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Force (N) | Angle (degrees) | |||
| 2 | 100 | 0 | 100 | ||
| 3 | 100 | 30 | |||
| 4 | 100 | 45 | |||
| 5 | 100 | 60 | |||
| 6 | 100 | 90 | |||
| 7 |
4 Modelling Seasonal Sales with Cosine
Cosine waves can model seasonal patterns. Suppose monthly sales follow a cosine curve with a peak in January. The table has month numbers (1–12) and a base sales figure. The formula =B2*COS(2*PI()*(A2-1)/12) calculates the seasonal factor: when month=1, the cosine term is 1, so sales equal the base; when month=7, the cosine term is -1, so sales are negative (if base is positive), which might represent an off-season dip. This example demonstrates using COS with PI() to create a periodic model.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Base Sales | |||
| 2 | 1 | 1000 | 1000 | ||
| 3 | 2 | 1000 | |||
| 4 | 3 | 1000 | |||
| 5 | 4 | 1000 | |||
| 6 | 5 | 1000 | |||
| 7 | 6 | 1000 | |||
| 8 | 7 | 1000 | |||
| 9 | 8 | 1000 | |||
| 10 | 9 | 1000 | |||
| 11 | 10 | 1000 | |||
| 12 | 11 | 1000 | |||
| 13 | 12 | 1000 | |||
| 14 |
5 Converting Polar to Cartesian Coordinates
In navigation or graphics, you often convert polar coordinates (radius, angle) to Cartesian (x, y). The x-coordinate is r * cos(θ). The table provides radius and angle in degrees. The formula =A2*COS(RADIANS(B2)) computes the x-coordinate. For a radius of 10 at 0°, x = 10; at 90°, x ≈ 0. This example shows a practical application in coordinate geometry.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Radius | Angle (degrees) | |||
| 2 | 10 | 0 | 10 | ||
| 3 | 10 | 30 | |||
| 4 | 10 | 45 | |||
| 5 | 10 | 60 | |||
| 6 | 10 | 90 | |||
| 7 |
Common COS errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The argument is non-numeric, such as text or a blank cell that is interpreted as text. | Ensure the argument is a number or a reference to a cell containing a number. Use ISNUMBER to check. |
| #NAME? | The function name is misspelled, e.g., =COSINE(A1) or =COS(A1) with a missing parenthesis. | Type =COS( and let Excel's autocomplete suggest the function. Check spelling and parentheses. |
| Wrong result (e.g., 0.5 instead of 0.866 | The angle is in degrees but COS expects radians. | Convert degrees to radians using RADIANS(angle) or multiply by PI()/180. |
| #NUM! | The argument is too large or results in an invalid operation (rare for COS, but possible with extremely large numbers). | Check that the angle is within a reasonable range; reduce the magnitude if necessary. |
Tips for using COS
- Always convert degrees to radians before using COS: use =COS(RADIANS(degrees)) or =COS(degrees*PI()/180).
- Remember that COS returns a value between -1 and 1; if you get a larger number, you likely forgot to multiply by a radius or force.
- Use the PI() function for precise radian conversions instead of typing 3.14159.
- Combine COS with other functions like SIN and TAN to solve full triangle problems.
- When modelling periodic data, use COS with a multiplier and phase shift to fit seasonal patterns.
Frequently asked questions
What is the difference between COS and ACOS?
COS returns the cosine of an angle. ACOS (arccosine) does the reverse: it returns the angle whose cosine is a given number. Use COS when you have an angle and want its cosine; use ACOS when you have a cosine value and want the angle.
Can I use degrees directly with COS?
No, COS expects radians. To use degrees, wrap the angle in RADIANS: =COS(RADIANS(60)). Alternatively, multiply by PI()/180: =COS(60*PI()/180).
Why does COS(90 degrees) not return exactly 0?
Due to floating-point precision, Excel may return a very small number like 6.12E-17 instead of 0. This is normal and effectively zero for most calculations. You can round the result if needed.
What is the range of values returned by COS?
COS always returns a number between -1 and 1 inclusive, regardless of the input angle.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. COS reference