SEC
Quirk foundCategory: Math and trigonometry · Last tested 2026-09-01
Real compatibility results for the SEC 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) | Quirk found |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when SEC’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Quirk found | 2026-08-31 |
| 24.8.7.2 | Quirk found | 2026-08-31 |
| 25.2.0.3 | Quirk found | 2026-08-31 |
| 25.8.7.3 | Quirk found | 2026-08-31 |
Why isn't SEC working in LibreOffice?
SEC exists in LibreOffice 25.8.7.3, but it is not a drop-in match for
Excel — our executed tests found real behavioral differences (detailed in the test results on this
page). If a formula that works in Excel or Google Sheets misbehaves in LibreOffice, compare your usage
against the failing cases above before assuming your data is wrong.
Discovered quirks
-
=SEC(200000000) on
LibreOffice Calc returned
-1.35887556717362, but the documented/expected
result is #NUM!.
Provenance
The Remarks publish: "The absolute value of number must be less than 2^27" and "If number is outside its constraints, SEC returns the #NUM! error value." 2^27 = 134217728, so 200000000 is outside the documented range. LIBREOFFICE DOES NOT ENFORCE THE LIMIT: all four builds returned -1.35887556717362 rather than #NUM!. That is a silent wrong answer rather than a harmless permissiveness, and the limit exists precisely because of it -- at 2e8 radians the argument reduction consumes every bit of a double's precision, so the secant returned is numerically meaningless. Excel documents the guard; LibreOffice computes through it.; MISMATCH vs expected: expected '#NUM!', got -1.35887556717362
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(SEC(45),5) | Microsoft's first documented example, at the five decimals it publishes | 1.90359 | 1.90359ProvenanceMicrosoft publishes =SEC(45) = 1.90359. DERIVATION: SEC is 1/COS, and the argument is in RADIANS, so this is 1/cos(45 rad) = 1.9035944074044247389 at 50 digits (mpmath), which is 1.90359 at the published precision. THE PAGE'S OWN DESCRIPTION IS WRONG ABOUT THE UNIT: it reads "Returns the secant of a 45 degree angle", but 45 DEGREES would give 1/cos(pi/4) = 1.4142135624, not the 1.90359 the same row publishes. The page's Remarks bullet contradicts its own description and is the correct half -- "If you want to supply the angle in degrees, multiply the angle by PI()/180 or use the RADIANS function" -- so the published RESULT is right and the word "degree" in the description is the error. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/sec-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =ROUND(SEC(30),5) | Microsoft's second documented example | 6.48292 | 6.48292ProvenanceMicrosoft publishes =SEC(30) = 6.48292. Derived independently as 1/cos(30 rad) = 6.482921234962677788 at 50 digits, i.e. 6.48292 at the published precision. Same description/unit error as the 45 row: 30 DEGREES would give 1/cos(pi/6) = 1.1547005384. |
Matched |
| =ROUND(SEC(45),10) | The same example carried to ten decimals, where a unit or reciprocal error cannot hide | 1.9035944074 | 1.9035944074ProvenanceFive published decimals cannot separate an engine that computes 1/COS from one that computes COS of a reciprocal, or one that silently converts units. Asserted at ten places from the independent derivation: 1.9035944074. |
Matched |
| =ROUND(SEC(45*PI()/180),10) | The page's own documented degrees-to-radians conversion, which must give the secant of a true 45 degrees | 1.4142135624 | 1.4142135624ProvenanceThe Remarks bullet says to convert degrees with PI()/180. A true 45-degree secant is 1/cos(pi/4) = sqrt(2) = 1.41421356237309504880, i.e. 1.4142135624 at ten places -- a structural assertion with no derived constant, since sec(45 deg) is exactly sqrt(2). It is also the value the page's own "45 degree angle" description would require, which is how the description was shown to be wrong. |
Matched |
| =SEC("abc") | A non-numeric argument, which the page assigns an error code | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If number is a nonnumeric value, SEC returns the #VALUE! error values." (the trailing plural is Microsoft's, recorded as published). |
Matched |
| =SEC(200000000) | An argument beyond the documented magnitude limit | #NUM! | #NUM!ProvenanceThe Remarks publish: "The absolute value of number must be less than 2^27" and "If number is outside its constraints, SEC returns the #NUM! error value." 2^27 = 134217728, so 200000000 is outside the documented range. LIBREOFFICE DOES NOT ENFORCE THE LIMIT: all four builds returned -1.35887556717362 rather than #NUM!. That is a silent wrong answer rather than a harmless permissiveness, and the limit exists precisely because of it -- at 2e8 radians the argument reduction consumes every bit of a double's precision, so the secant returned is numerically meaningless. Excel documents the guard; LibreOffice computes through it. |
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(SEC(45),5) | Microsoft's first documented example, at the five decimals it publishes | 1.90359 | 1.90359ProvenanceMicrosoft publishes =SEC(45) = 1.90359. DERIVATION: SEC is 1/COS, and the argument is in RADIANS, so this is 1/cos(45 rad) = 1.9035944074044247389 at 50 digits (mpmath), which is 1.90359 at the published precision. THE PAGE'S OWN DESCRIPTION IS WRONG ABOUT THE UNIT: it reads "Returns the secant of a 45 degree angle", but 45 DEGREES would give 1/cos(pi/4) = 1.4142135624, not the 1.90359 the same row publishes. The page's Remarks bullet contradicts its own description and is the correct half -- "If you want to supply the angle in degrees, multiply the angle by PI()/180 or use the RADIANS function" -- so the published RESULT is right and the word "degree" in the description is the error. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/sec-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =ROUND(SEC(30),5) | Microsoft's second documented example | 6.48292 | 6.48292ProvenanceMicrosoft publishes =SEC(30) = 6.48292. Derived independently as 1/cos(30 rad) = 6.482921234962677788 at 50 digits, i.e. 6.48292 at the published precision. Same description/unit error as the 45 row: 30 DEGREES would give 1/cos(pi/6) = 1.1547005384. |
Matched |
| =ROUND(SEC(45),10) | The same example carried to ten decimals, where a unit or reciprocal error cannot hide | 1.903594407 | 1.9035944074ProvenanceFive published decimals cannot separate an engine that computes 1/COS from one that computes COS of a reciprocal, or one that silently converts units. Asserted at ten places from the independent derivation: 1.9035944074. |
Matched |
| =ROUND(SEC(45*PI()/180),10) | The page's own documented degrees-to-radians conversion, which must give the secant of a true 45 degrees | 1.414213562 | 1.4142135624ProvenanceThe Remarks bullet says to convert degrees with PI()/180. A true 45-degree secant is 1/cos(pi/4) = sqrt(2) = 1.41421356237309504880, i.e. 1.4142135624 at ten places -- a structural assertion with no derived constant, since sec(45 deg) is exactly sqrt(2). It is also the value the page's own "45 degree angle" description would require, which is how the description was shown to be wrong. |
Matched |
| =SEC("abc") | A non-numeric argument, which the page assigns an error code | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If number is a nonnumeric value, SEC returns the #VALUE! error values." (the trailing plural is Microsoft's, recorded as published). |
Matched |
| =SEC(200000000) | An argument beyond the documented magnitude limit | #NUM! | #NUM!ProvenanceThe Remarks publish: "The absolute value of number must be less than 2^27" and "If number is outside its constraints, SEC returns the #NUM! error value." 2^27 = 134217728, so 200000000 is outside the documented range. LIBREOFFICE DOES NOT ENFORCE THE LIMIT: all four builds returned -1.35887556717362 rather than #NUM!. That is a silent wrong answer rather than a harmless permissiveness, and the limit exists precisely because of it -- at 2e8 radians the argument reduction consumes every bit of a double's precision, so the secant returned is numerically meaningless. Excel documents the guard; LibreOffice computes through it. |
Matched |
LibreOffice Calc 25.8.7.3 (tested 2026-08-31)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(SEC(45),5) | Microsoft's first documented example, at the five decimals it publishes | 1.90359 | 1.90359ProvenanceMicrosoft publishes =SEC(45) = 1.90359. DERIVATION: SEC is 1/COS, and the argument is in RADIANS, so this is 1/cos(45 rad) = 1.9035944074044247389 at 50 digits (mpmath), which is 1.90359 at the published precision. THE PAGE'S OWN DESCRIPTION IS WRONG ABOUT THE UNIT: it reads "Returns the secant of a 45 degree angle", but 45 DEGREES would give 1/cos(pi/4) = 1.4142135624, not the 1.90359 the same row publishes. The page's Remarks bullet contradicts its own description and is the correct half -- "If you want to supply the angle in degrees, multiply the angle by PI()/180 or use the RADIANS function" -- so the published RESULT is right and the word "degree" in the description is the error. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/sec-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =ROUND(SEC(30),5) | Microsoft's second documented example | 6.48292 | 6.48292ProvenanceMicrosoft publishes =SEC(30) = 6.48292. Derived independently as 1/cos(30 rad) = 6.482921234962677788 at 50 digits, i.e. 6.48292 at the published precision. Same description/unit error as the 45 row: 30 DEGREES would give 1/cos(pi/6) = 1.1547005384. |
Matched |
| =ROUND(SEC(45),10) | The same example carried to ten decimals, where a unit or reciprocal error cannot hide | 1.9035944074 | 1.9035944074ProvenanceFive published decimals cannot separate an engine that computes 1/COS from one that computes COS of a reciprocal, or one that silently converts units. Asserted at ten places from the independent derivation: 1.9035944074. |
Matched |
| =ROUND(SEC(45*PI()/180),10) | The page's own documented degrees-to-radians conversion, which must give the secant of a true 45 degrees | 1.4142135624 | 1.4142135624ProvenanceThe Remarks bullet says to convert degrees with PI()/180. A true 45-degree secant is 1/cos(pi/4) = sqrt(2) = 1.41421356237309504880, i.e. 1.4142135624 at ten places -- a structural assertion with no derived constant, since sec(45 deg) is exactly sqrt(2). It is also the value the page's own "45 degree angle" description would require, which is how the description was shown to be wrong. |
Matched |
| =SEC("abc") | A non-numeric argument, which the page assigns an error code | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If number is a nonnumeric value, SEC returns the #VALUE! error values." (the trailing plural is Microsoft's, recorded as published). |
Matched |
| =SEC(200000000) | An argument beyond the documented magnitude limit | -1.35887556717362 | #NUM!ProvenanceThe Remarks publish: "The absolute value of number must be less than 2^27" and "If number is outside its constraints, SEC returns the #NUM! error value." 2^27 = 134217728, so 200000000 is outside the documented range. LIBREOFFICE DOES NOT ENFORCE THE LIMIT: all four builds returned -1.35887556717362 rather than #NUM!. That is a silent wrong answer rather than a harmless permissiveness, and the limit exists precisely because of it -- at 2e8 radians the argument reduction consumes every bit of a double's precision, so the secant returned is numerically meaningless. Excel documents the guard; LibreOffice computes through it. |
Mismatch |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation
Where SEC behaves differently
- When the documentation is wrong: 29 vendor doc defects found by execution
Independent derivation across 586 executed functions found 29 places where a vendor's own page is contradicted by its own inputs, its own table, or the live engine: 23 Microsoft, 5 Google, 1 LibreOffice. Includes T.INV.2T's doubly-wrong Remark, DISC's stale figure, ISDATE's page against the live engine, and RAWSUBTRACT's help against LibreOffice's own result. - Your function exists but your file cannot say so: _xlfn storage tokens
Executed: eight IM* functions LibreOffice implements return #NAME? on all four builds because it cannot read Excel's _xlfn. token for them, while COT and CSC only work under that same prefix. Eleven LibreOffice aliases are erased by its own exporter, and a token change between 24.2 and 24.8 makes a 24.8-written file open as #NAME? in 24.2.