ACOS function
Returns the arccosine (inverse cosine) in radians: the angle whose cosine is the given number.
Available in All versions of Excel, Excel for the web, Excel for Mac
In every Excel versionWorks in Google Sheets
Syntax
ACOS(number)| Argument | What it means | |
|---|---|---|
number | Required | The cosine of the angle, between −1 and 1. |
Returns: An angle in radians from 0 to π.
How ACOS works
ACOS finds an angle from the horizontal side and the sloping side of a right-angled triangle. A 5 m ladder whose foot is 1.3 m from the wall makes an angle of DEGREES(ACOS(1.3/5)) with the ground. It is also the core of the angle between two vectors and of the spherical law of cosines for distances between GPS coordinates.
The result runs from 0 to π radians (0° to 180°); convert with DEGREES. Inputs outside −1 to 1 return #NUM!. Because of floating-point rounding, a calculated ratio of 1.0000000000000002 can trigger that error; wrap it in MIN(1, MAX(-1, x)) when the value comes from a formula.
Examples
1Angle of a ladder against a wall
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Ladder | Foot distance (m) | Length (m) | |
| 2 | Warehouse | 1.3 | 5 | 74.93 |
Result: 74.93
cos⁻¹(0.26) ≈ 74.93° (2 decimals), close to the recommended 75°.
2Arccosine of −1
| A | |
|---|---|
| 1 | 3.141592654 |
Result: 3.141592654
The angle whose cosine is −1 is π radians (180°).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#NUM! | The number is outside −1 to 1, sometimes only by rounding. | Clamp the input: ACOS(MIN(1, MAX(-1, x))). |
Tips
- Angle between two 2-D vectors:
=DEGREES(ACOS((x1*x2+y1*y2)/(SQRT(x1^2+y1^2)*SQRT(x2^2+y2^2)))).
Google Sheets
ACOS also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
ACOS in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | ARCCOS |
| Danish | ARCCOS |
| Dutch | BOOGCOS |
| German | ARCCOS |
| Hungarian | ARCCOS |
| Italian | ARCCOS |
| Norwegian (Bokmål) | ARCCOS |
| Swedish | ARCCOS |