COTH returns the hyperbolic cotangent of a number, equal to 1/TANH(number) or (e^x + e^-x)/(e^x - e^-x). It is useful in engineering, physics, and advanced maths models built in Excel.
=COTH(number)What does COTH do?
The COTH function calculates the hyperbolic cotangent of a given number. In mathematical terms, COTH(x) = 1 / TANH(x) = (e^x + e^-x) / (e^x - e^-x). It is part of Excel's Math & Trigonometry category and returns a single numeric result. While hyperbolic functions are less common in everyday office work, they appear in engineering calculations, physics models, and advanced statistical formulas.
You might need COTH when working with transmission line equations, heat transfer models, or any scenario involving exponential growth and decay. For students, COTH helps verify homework and explore function behaviour. For professionals, it saves time by embedding complex maths directly into spreadsheets without manual calculation.
A practical situation: an engineer modelling signal attenuation in a cable needs to compute the hyperbolic cotangent of a length parameter. Instead of using a scientific calculator, they can enter the length values in a column and apply COTH to get results instantly, then chart the outcome.
When to use COTH
- Calculating impedance or attenuation in electrical engineering models.
- Solving heat transfer problems involving hyperbolic functions.
- Verifying calculus or trigonometry homework in Excel.
- Modelling exponential decay in physics simulations.
- Computing normalising constants in advanced statistics.
COTH syntax
=COTH(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The angle in radians for which you want the hyperbolic cotangent. It must be a real number; if the number is 0, COTH returns #DIV/0!. |
What it returns: COTH returns the hyperbolic cotangent of the given number as a decimal value. If the number is 0, it returns #DIV/0!.
COTH examples
1 Basic COTH calculation
This example shows the simplest use of COTH. The goal is to compute the hyperbolic cotangent of a single value. The formula =COTH(B2) takes the number in cell B2 (1) and returns approximately 1.3130. It works by evaluating 1/TANH(1), which Excel calculates internally.
| A | B | C | |
|---|---|---|---|
| 1 | Value | COTH Result | |
| 2 | 1 | 1.313035285 | |
| 3 |
2 COTH with a negative number
Here we apply COTH to a negative value to see the odd symmetry of the function. The formula =COTH(B2) uses the value -0.5 from B2. COTH is an odd function, so COTH(-0.5) = -COTH(0.5). The result is approximately -2.163953414.
| A | B | C | |
|---|---|---|---|
| 1 | Value | COTH Result | |
| 2 | -0.5 | -2.163953414 | |
| 3 |
3 COTH for a small positive value
This example demonstrates COTH for a small positive number, where the result becomes large. The formula =COTH(B2) references 0.1 in B2. As x approaches 0, COTH(x) grows without bound; for 0.1 the result is about 10.03331754. This helps illustrate the function's behaviour near zero.
| A | B | C | |
|---|---|---|---|
| 1 | Value | COTH Result | |
| 2 | 0.1 | 10.03331113 | |
| 3 |
4 COTH in an engineering context
An engineer needs to compute the hyperbolic cotangent of several length parameters for a transmission line model. The formula =COTH(B2) takes the length in B2 (2) and returns approximately 1.037314721. This value can then be used in further calculations for impedance or attenuation.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Parameter | Length (m) | COTH Result | |
| 2 | Line 1 | 2 | 1.037314721 | |
| 3 |
5 COTH with a larger value
For larger inputs, COTH approaches 1. This example uses 3 as the input. The formula =COTH(B2) returns approximately 1.004969823. This shows how the function behaves for values well above zero, which is useful in asymptotic analysis.
| A | B | C | |
|---|---|---|---|
| 1 | Value | COTH Result | |
| 2 | 3 | 1.004969823 | |
| 3 |
Common COTH errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #DIV/0! | The number argument is 0, because COTH(0) is undefined (division by zero in the formula). | Ensure the input is not zero. If zero is possible, wrap the formula in IF to handle it, e.g., =IF(A2=0,"Undefined",COTH(A2)). |
| #VALUE! | The number argument is non-numeric, such as text or an empty cell referenced directly. | Check that the referenced cell contains a number. Use ISNUMBER to validate or convert text to numbers. |
| #NAME? | The function name is misspelled (e.g., COTHH) or the Analysis ToolPak is not enabled in very old Excel versions. | Verify the spelling as COTH. In Excel 2007 and later, COTH is built-in; for older versions, enable the Analysis ToolPak. |
| #NUM! | The result is too large to represent, which can happen with extremely small non-zero inputs. | Avoid inputs very close to zero; if necessary, use a threshold or handle with IFERROR. |
Tips for using COTH
- Remember that COTH expects angles in radians, not degrees. To convert degrees to radians, multiply by PI()/180.
- Use COTH in combination with other hyperbolic functions like SINH, COSH, and TANH for comprehensive models.
- If you need the inverse hyperbolic cotangent, use ACOTH (available in Excel 2013 and later).
- Format the result cell to show enough decimal places to capture the precision you need.
- Test your formula with a known value (e.g., COTH(1) ≈ 1.3130) to confirm it works as expected.
Frequently asked questions
What is the difference between COT and COTH?
COT calculates the cotangent of an angle in radians (trigonometric), while COTH calculates the hyperbolic cotangent, which is based on exponential functions. They are different mathematical functions.
Can COTH handle negative numbers?
Yes, COTH is an odd function, so COTH(-x) = -COTH(x). It accepts any real number except zero.
Why does COTH return #DIV/0! for zero?
Because the hyperbolic cotangent is defined as 1/TANH(x), and TANH(0) = 0, leading to division by zero. COTH(0) is undefined.
Is COTH available in all Excel versions?
COTH is available in Excel 2007 and later as a built-in function. In earlier versions, it required the Analysis ToolPak add-in.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. COTH reference