Math and trigonometry functions

COSH

Matches all 33,553 recorded answers

Recorded: 33,550 in the answer bank and 3 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicCOSH
BulgarianCOSH
CzechCOSH
DanishCOSH
GermanCOSH
GreekCOSH
English (Australia)COSH
English (United Kingdom)COSH
English (United States)COSH
SpanishCOSH
EstonianCOSH
FinnishCOSH
FrenchCOSH
HebrewCOSH
CroatianCOSH
HungarianCOSH
IndonesianCOSH
ItalianCOSH
JapaneseCOSH
KoreanCOSH
LithuanianCOSH
LatvianCOSH
NorwegianCOSH
DutchCOSH
PolishCOSH
Portuguese (Brazil)COSH
Portuguese (Portugal)COSH
RomanianCOSH
RussianCOSH
SlovakCOSH
SlovenianCOSH
Serbian (Latin)COSH
SwedishCOSH
ThaiCOSH
TurkishCOSH işlevi
UkrainianCOSH
VietnameseCOSH
Chinese (Simplified)COSH
Chinese (Hong Kong)COSH
Chinese (Traditional)COSH

Names from Microsoft's support site.

What it does

COSH(number)

COSH(number) returns the hyperbolic cosine. Microsoft's page gives the defining formula:

cosh x = (e^x + e^-x) / 2

It is the even part of the exponential function; sinh is the odd part, and e^x = cosh x + sinh x is the decomposition.

PropertyStatement
Domainall real x
Range[1, ∞), with the minimum cosh 0 = 1 attained only at 0
Parityeven: cosh(-x) = cosh(x)
Series1 + x²/2! + x⁴/4! + …, convergent for all x
Fundamental identitycosh²x - sinh²x = 1
Relation to circularcosh x = cos(ix) and cos x = cosh(ix)
Derivatived/dx cosh x = sinh x
Additioncosh(x+y) = cosh x cosh y + sinh x sinh y
Asymptoticscosh x ~ e^abs(x) / 2 as abs(x) → ∞
Entireno poles, no branch cuts; periodic with period 2πi in the complex plane

The catenary is the physical reading: a uniform chain hanging under gravity takes the shape y = a·cosh(x/a). That is also why COSH shows up in engineering spreadsheets far more often than its siblings.

Two numbers fix the practical boundary. cosh x exceeds the largest finite binary64 when |x| passes roughly 709.78 + ln 2 ≈ 710.4758; and cosh x is indistinguishable from e^{|x|}/2 in binary64 once |x| is above about 22, because the e^{-|x|} term has fallen below half an ulp of the result.

Arguments

ArgumentMeaningNotes
numberAny real number. Required.Microsoft documents no magnitude constraint

Note the contrast with the newer hyperbolic surfaces: COTH and CSCH carry a documented |number| < 2^27 constraint on their pages, and COSH — a much older function — carries none.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

Returns Number in [1, ∞).

  • Zero — COSH(0) = 1, exactly, and this is the function's minimum.
  • Sign — the result never depends on the sign of the argument.
  • Never below 1. An implementation that returns a value slightly under 1 for a tiny argument has a cancellation bug; the correct evaluation cannot do it. This is the cheapest self-check on the whole page.
  • The gap between e^709 and cosh(710). A naive implementation that computes EXP(x) first overflows about ln 2 earlier than the true function does. There is a narrow band of arguments where the mathematically representable answer is lost to the algorithm rather than to the format. Whether Excel's answer covers that band is unchecked.

Errors

Microsoft's COSH page documents no error conditions.

ErrorConditionSource
#VALUE!Non-numeric argumentShared call model, not this page
#NUM!The true result is not finiteEV-MATH-0008, which names COSH — kind and error-code convention, no count

That second row is the honest statement of what is known: the FINITE convention is on record with witnesses, and the boundary between the last #NUM!-free argument and the first #NUM! argument has not been located.

How to implement

Numerical notes

Hyperbolic cosine has no cancellation problem — the two terms of (e^x + e^-x)/2 are both positive — and no reduction problem. Its whole difficulty is range.

The standard branch structure, essentially as in fdlibm's e_cosh.c and Cephes' cosh.c:

  1. Tiny |x| (below about 2^-27): return 1. The correction term is below half an ulp.
  2. Small |x| (up to about ln 2 / 2): use t = expm1(|x|) and evaluate cosh x = 1 + t²/(2(1+t)). The point is accuracy in the correction, not in the result: computing (e^x + e^-x)/2 directly here is stable in the result but computes the deviation from 1 poorly, and the deviation is what a caller who then subtracts 1 actually wants. (Excel has no COSHM1, so a spreadsheet user computing COSH(x)-1 for small x gets the cancellation regardless of how good COSH is. The remedy in a worksheet is the series x²/2 + x⁴/24, not a better COSH.)
  3. Moderate |x| (up to about 22): t = e^{|x|}; return (t + 1/t)/2.
  4. Large |x| (up to the overflow threshold of e): return e^{|x|}/2; the reciprocal term is below the rounding of the result.
  5. Near the top (|x| between ln(DBL_MAX) and ln(2·DBL_MAX)): e^{|x|} itself overflows even though cosh x does not. The standard trick is w = e^{|x|/2}, return (w/2)·w — two representable halves multiplied at the end. Skipping this step costs the function its top ln 2 of range, which is the band named above.

A&S chapter 4.5 gives the identity set; 4.5.64 onwards gives the classical polynomial approximations. The accuracy of any of these branches is inherited from EXP, which is why EV-MATH-0001's identification of the exponential's substrate (on the EXP page) is the most relevant external fact about this surface — even though EV-MATH-0001 does not name COSH and nothing from it may be attributed here.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

COSH · 3 lines · calc-func/src/catalogue/math.rs on GitHub
11 cosh "COSH" (1, 1) [V "number"] |s, a, sv| {
    raw(s, a, ExcelRealPolicy::FINITE, k::cosh::cosh_kernel)
}

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
19929Windows, bitness not recorded, CPU not recorded44
20430Windows, 64-bit, CPU not recorded33,550
  • XC-COSH-001: build 19929 versus build 20430; 2 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.

Agreement on these compared inputs does not establish agreement on unmeasured inputs.

Recorded environments and comparison details.

Excel 16.0 build 19929

Windows, bitness not recorded, CPU not recorded

44 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

33,550 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

Relationships

  • SINH — the odd partner. SINH has a cancellation problem near zero that COSH does not have, and the same overflow problem at large arguments. EV-MATH-0008 names both.
  • TANH — sinh/cosh, bounded by 1, and the numerically well-behaved member.
  • SECH — the reciprocal 1/COSH, which underflows smoothly to zero where COSH overflows: the reciprocal pair is not symmetric in difficulty.
  • COTH, CSCH — the 2013-generation hyperbolic reciprocals, with documented magnitude constraints that COSH does not carry.
  • ACOSH — the inverse on [1, ∞), principal branch. ACOSH(COSH(x)) = |x|, which is the useful metamorphic identity here precisely because it exposes the evenness.
  • EXP — the substrate in every plausible implementation, and the surface whose evaluation route has actually been identified. Anything learned about EXP transfers here.
  • COS — cosh x = cos(ix). Related in name and in theory; opposite in every computational respect.
  • IMCOSH — the complex version.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents