← All functions

COTH

Quirk found

Category: Math and trigonometry · Last tested 2026-09-01

Real compatibility results for the COTH 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

EngineDocumentedLive-testedVerdict
Excel (desktop)Yes No — documented only n/a
Excel for the web— Yes (recalc, 2026-09-01) Quirk found
Google SheetsYes Yes (Drive import, 2026-08-31) Supported, behaves as documented
LibreOffice CalcYes 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 COTH’s support changed — not documentation claims, real results.

LibreOffice versionVerdictTested
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 COTH working in LibreOffice?

COTH 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

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.

FormulaDescriptionResultExpectedVerdict
=ROUND(COTH(2),9) Microsoft's documented worked example: the hyperbolic cotangent of 2 1.037314721 1.037314721
Provenance

Microsoft's page publishes this example's result to three decimals as 1.037. Independently derived from the documented relationship coth(x) = 1/tanh(x) = (e^x + e^-x)/(e^x - e^-x): 1/math.tanh(2) = 1.0373147207275482 -> 1.037314721 at 9 dp, agreeing with the published 1.037 at the depth the page prints

Matched
=ROUND(COTH(-2),9) The hyperbolic cotangent of -2, which must be the negative of that of +2 -1.037314721 -1.037314721
Provenance

coth is an odd function: (e^-x + e^x)/(e^-x - e^x) is the negative of (e^x + e^-x)/(e^x - e^-x), so COTH(-2) must be exactly -COTH(2). Verified independently: 1/math.tanh(-2) = -1.0373147207275482

Matched
=COTH(2^27) An argument at the documented magnitude limit of 2^27 1 #NUM!
Provenance

Excel documents: "The absolute value of Number must be less than 2^27" and "If Number is outside its constraints, COTH returns the #NUM! error value." 2^27 = 134217728 is exactly the excluded boundary. Mathematically coth(134217728) is indistinguishable from 1, so this case tests the documented range check rather than the arithmetic. EXECUTED RESULT: all four LibreOffice builds return 1 instead of the documented error, i.e. they answer the mathematics and ignore the range check

Mismatch
=COTH("abc") A non-numeric argument #VALUE! #VALUE!
Provenance

Excel documents: "If Number is a non-numeric value, COTH returns the #VALUE! error value."

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.

FormulaDescriptionResultExpectedVerdict
=ROUND(COTH(2),9) Microsoft's documented worked example: the hyperbolic cotangent of 2 1.037314721 1.037314721
Provenance

Microsoft's page publishes this example's result to three decimals as 1.037. Independently derived from the documented relationship coth(x) = 1/tanh(x) = (e^x + e^-x)/(e^x - e^-x): 1/math.tanh(2) = 1.0373147207275482 -> 1.037314721 at 9 dp, agreeing with the published 1.037 at the depth the page prints

Matched
=ROUND(COTH(-2),9) The hyperbolic cotangent of -2, which must be the negative of that of +2 -1.037314721 -1.037314721
Provenance

coth is an odd function: (e^-x + e^x)/(e^-x - e^x) is the negative of (e^x + e^-x)/(e^x - e^-x), so COTH(-2) must be exactly -COTH(2). Verified independently: 1/math.tanh(-2) = -1.0373147207275482

Matched
=COTH(2^27) An argument at the documented magnitude limit of 2^27 #NUM! #NUM!
Provenance

Excel documents: "The absolute value of Number must be less than 2^27" and "If Number is outside its constraints, COTH returns the #NUM! error value." 2^27 = 134217728 is exactly the excluded boundary. Mathematically coth(134217728) is indistinguishable from 1, so this case tests the documented range check rather than the arithmetic. EXECUTED RESULT: all four LibreOffice builds return 1 instead of the documented error, i.e. they answer the mathematics and ignore the range check

Matched
=COTH("abc") A non-numeric argument #VALUE! #VALUE!
Provenance

Excel documents: "If Number is a non-numeric value, COTH returns the #VALUE! error value."

Matched

LibreOffice Calc 25.8.7.3 (tested 2026-08-31)

FormulaDescriptionResultExpectedVerdict
=ROUND(COTH(2),9) Microsoft's documented worked example: the hyperbolic cotangent of 2 1.037314721 1.037314721
Provenance

Microsoft's page publishes this example's result to three decimals as 1.037. Independently derived from the documented relationship coth(x) = 1/tanh(x) = (e^x + e^-x)/(e^x - e^-x): 1/math.tanh(2) = 1.0373147207275482 -> 1.037314721 at 9 dp, agreeing with the published 1.037 at the depth the page prints

Matched
=ROUND(COTH(-2),9) The hyperbolic cotangent of -2, which must be the negative of that of +2 -1.037314721 -1.037314721
Provenance

coth is an odd function: (e^-x + e^x)/(e^-x - e^x) is the negative of (e^x + e^-x)/(e^x - e^-x), so COTH(-2) must be exactly -COTH(2). Verified independently: 1/math.tanh(-2) = -1.0373147207275482

Matched
=COTH(2^27) An argument at the documented magnitude limit of 2^27 1 #NUM!
Provenance

Excel documents: "The absolute value of Number must be less than 2^27" and "If Number is outside its constraints, COTH returns the #NUM! error value." 2^27 = 134217728 is exactly the excluded boundary. Mathematically coth(134217728) is indistinguishable from 1, so this case tests the documented range check rather than the arithmetic. EXECUTED RESULT: all four LibreOffice builds return 1 instead of the documented error, i.e. they answer the mathematics and ignore the range check

Mismatch
=COTH("abc") A non-numeric argument #VALUE! #VALUE!
Provenance

Excel documents: "If Number is a non-numeric value, COTH returns the #VALUE! error value."

Matched

Docs & syntax

Where COTH behaves differently