COS
Supported, behaves as documentedCategory: Math and trigonometry · Last tested 2026-09-01
Real compatibility results for the COS function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel (desktop) | Yes | No — documented only | n/a |
| Excel for the web | — | Yes (recalc, 2026-09-01) | Supported, behaves as documented |
| Google Sheets | Yes | Yes (Drive import, 2026-08-31) | Supported, behaves as documented |
| LibreOffice Calc | Yes | Yes (25.8.7.3, 2026-08-31) | Supported, behaves as documented |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when COS’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Supported, behaves as documented | 2026-08-31 |
| 24.8.7.2 | Supported, behaves as documented | 2026-08-31 |
| 25.2.0.3 | Supported, behaves as documented | 2026-08-31 |
| 25.8.7.3 | Supported, behaves as documented | 2026-08-31 |
Executed test cases
Excel for the web (executed 2026-09-01 via OneDrive recalculation)
These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(COS(1.047),7) | Microsoft's documented worked example: the cosine of 1.047 radians | 0.5001711 | 0.5001711ProvenanceMicrosoft's page publishes this example's result as 0.5001711. Independently derived: math.cos(1.047) = 0.5001710745970701 -> 0.5001711 at 7 dp. 1.047 is a decimal approximation of pi/3, which is why the result sits just above 0.5 |
Matched |
| =ROUND(COS(60*PI()/180),9) | Microsoft's documented worked example: 60 degrees converted to radians by multiplying by PI()/180 | 0.5 | 0.5ProvenanceMicrosoft's page publishes this example's result as 0.5, and cos(60 degrees) = cos(pi/3) = 1/2 exactly. In IEEE double arithmetic math.cos(math.pi/3) evaluates to 0.5000000000000001, one unit in the last place above 0.5, so the assertion is made at 9 dp where the exact and floating-point values agree |
Matched |
| =ROUND(COS(RADIANS(60)),9) | Microsoft's documented worked example: the same 60 degrees converted with the RADIANS function instead | 0.5 | 0.5ProvenanceMicrosoft's page publishes this example's result as 0.5 as well. Exactly the same mathematics as the previous case; the point of running both is that Excel documents RADIANS and the explicit PI()/180 multiplication as interchangeable, so a divergence between the two rows would be an engine quirk in RADIANS rather than in COS |
Matched |
| =COS(0) | The cosine at zero | 1 | 1.0ProvenanceFollows from the definition of the cosine, cos(0) = 1 exactly, with no rounding needed: this anchors the function at a point where any floating-point implementation must be exact |
Matched |
Google Sheets (executed 2026-08-31 via Drive import)
Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(COS(1.047),7) | Microsoft's documented worked example: the cosine of 1.047 radians | 0.5001711 | 0.5001711ProvenanceMicrosoft's page publishes this example's result as 0.5001711. Independently derived: math.cos(1.047) = 0.5001710745970701 -> 0.5001711 at 7 dp. 1.047 is a decimal approximation of pi/3, which is why the result sits just above 0.5 |
Matched |
| =ROUND(COS(60*PI()/180),9) | Microsoft's documented worked example: 60 degrees converted to radians by multiplying by PI()/180 | 0.5 | 0.5ProvenanceMicrosoft's page publishes this example's result as 0.5, and cos(60 degrees) = cos(pi/3) = 1/2 exactly. In IEEE double arithmetic math.cos(math.pi/3) evaluates to 0.5000000000000001, one unit in the last place above 0.5, so the assertion is made at 9 dp where the exact and floating-point values agree |
Matched |
| =ROUND(COS(RADIANS(60)),9) | Microsoft's documented worked example: the same 60 degrees converted with the RADIANS function instead | 0.5 | 0.5ProvenanceMicrosoft's page publishes this example's result as 0.5 as well. Exactly the same mathematics as the previous case; the point of running both is that Excel documents RADIANS and the explicit PI()/180 multiplication as interchangeable, so a divergence between the two rows would be an engine quirk in RADIANS rather than in COS |
Matched |
| =COS(0) | The cosine at zero | 1 | 1.0ProvenanceFollows from the definition of the cosine, cos(0) = 1 exactly, with no rounding needed: this anchors the function at a point where any floating-point implementation must be exact |
Matched |
LibreOffice Calc 25.8.7.3 (tested 2026-08-31)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(COS(1.047),7) | Microsoft's documented worked example: the cosine of 1.047 radians | 0.5001711 | 0.5001711ProvenanceMicrosoft's page publishes this example's result as 0.5001711. Independently derived: math.cos(1.047) = 0.5001710745970701 -> 0.5001711 at 7 dp. 1.047 is a decimal approximation of pi/3, which is why the result sits just above 0.5 |
Matched |
| =ROUND(COS(60*PI()/180),9) | Microsoft's documented worked example: 60 degrees converted to radians by multiplying by PI()/180 | 0.5 | 0.5ProvenanceMicrosoft's page publishes this example's result as 0.5, and cos(60 degrees) = cos(pi/3) = 1/2 exactly. In IEEE double arithmetic math.cos(math.pi/3) evaluates to 0.5000000000000001, one unit in the last place above 0.5, so the assertion is made at 9 dp where the exact and floating-point values agree |
Matched |
| =ROUND(COS(RADIANS(60)),9) | Microsoft's documented worked example: the same 60 degrees converted with the RADIANS function instead | 0.5 | 0.5ProvenanceMicrosoft's page publishes this example's result as 0.5 as well. Exactly the same mathematics as the previous case; the point of running both is that Excel documents RADIANS and the explicit PI()/180 multiplication as interchangeable, so a divergence between the two rows would be an engine quirk in RADIANS rather than in COS |
Matched |
| =COS(0) | The cosine at zero | 1 | 1.0ProvenanceFollows from the definition of the cosine, cos(0) = 1 exactly, with no rounding needed: this anchors the function at a point where any floating-point implementation must be exact |
Matched |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation