Contact

COT Function (Gnumeric)

Math Beginner Gnumeric

Learn the COT function in Gnumeric: Returns the cotangent of a number.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked

Quick answer

COT returns the cotangent of an angle. For an angle x in radians, cotangent is cos(x)/sin(x), the reciprocal of tangent where that reciprocal exists. The one-argument call documented by Gnumeric is COT(x); an example in a blank worksheet is =COT(PI()/4), with an independently calculated expected result of approximately 1. Use RADIANS when entering degrees. Official Gnumeric syntax.

Exact syntax and arguments

=COT(x)
Argument Required? Official description Practical interpretation
x Yes number Angle represented as a numeric value; the trigonometric interpretation uses radians, not degrees.

There is no optional argument or documented default. Gnumeric’s Mathematics reference explicitly gives COT(x), x: number, and links to TAN and ACOT; the reference does not specify a complete set of error tokens or numerical tolerance near singular angles. The radians interpretation follows the standard trigonometric definition and Gnumeric’s documentation for related SIN/COS/RADIANS. Official COT entry · Official COS and DEGREES entries.

The English-language examples use commas in multi-argument formulas such as IF(test,yes,no); some locale settings use a different separator or number format. COT itself has only one argument, so its name and argument order are unambiguous. For a different locale, use Gnumeric’s Function Browser and the installed application’s formula separator rather than replacing separators blindly.

Reproducible worksheet example: convert survey angles

Enter the degree values in column A (these are example inputs, not recorded Gnumeric observations):

Cell Enter (degrees) Enter in column B Expected B result, about
A2 30 =COT(RADIANS(A2)) 1.732050808
A3 45 =COT(RADIANS(A3)) 1.000000000
A4 60 =COT(RADIANS(A4)) 0.577350269
A5 89 =COT(RADIANS(A5)) 0.017455065
A6 135 =COT(RADIANS(A6)) -1.000000000

The results above are expected from independent Python calculations of cos(radians(angle))/sin(radians(angle)), rounded for display. They have not been observed in Gnumeric. Values mathematically equal to an integer may appear with small binary floating-point differences.

Steps

  1. Enter 30, 45, 60, 89, 135 in cells A2 through A6.
  2. Enter =COT(RADIANS(A2)) in B2 and fill down to B6.
  3. Format B2:B6 to show at least six decimal places. Compare with the expected column above.
  4. Change A2 to 0 or 180 only to explore the undefined/near-singularity case; do not treat any displayed large finite output as a meaningful physical answer.

The first example has an exact mathematical value of sqrt(3); an independently checked alternate =COS(RADIANS(30))/SIN(RADIANS(30)) should approximate the same value.

Advanced example: horizontal distance from elevation

A surveyor measures a 4.0 m height difference and a 30° upward elevation angle. For a right triangle with vertical rise h and horizontal run d, cot(angle)=d/h; hence d=h*cot(angle).

Cell Value / formula Meaning
A10 4 Rise in metres
B10 30 Elevation angle in degrees
C10 =A10*COT(RADIANS(B10)) Horizontal run in metres

Independently calculated expected C10: approximately 6.928203230 m (4 * sqrt(3)). This assumes a positive acute elevation angle and a valid right-triangle interpretation; it does not include field measurement error. For an alternative expression where supported, =A10/TAN(RADIANS(B10)) is mathematically equivalent away from tangent zeros and poles. Use neither formula when its denominator is zero or effectively zero.

Near-singular angles and a cautious guard

Mathematically, cotangent is undefined where SIN(x)=0, including integer multiples of π. Floating-point trigonometry does not necessarily return an exact zero for SIN(PI()): an unguarded formula can produce a giant or tiny numerical artifact. A heuristic (not an official Gnumeric error-handling guarantee) is:

=IF(ABS(SIN(RADIANS(A2)))<1E-10,"Undefined / near singularity",COT(RADIANS(A2)))

This flags extremely small sine values, but 1E-10 is an illustrative threshold, not a universal application tolerance. Its appropriateness depends on the units and precision requirements of your model. The IF expression is untested in the native application for this guide.

Troubleshooting and limits

Symptom What to check
Result unexpected for 45 or 90 degrees Did you supply degrees directly? Wrap degree inputs in RADIANS(...).
Huge or erratic output at 0°, 180°, 360° Cotangent has a pole there; even if a floating-point value is returned, treat it as undefined.
#NAME? or an unavailable function Check the spelling COT, whether the function is enabled in the installed Gnumeric version/build, and the Function Browser. The exact observed error has not been native-verified for this guide.
Text or blanks give unexpected results Verify that the input is a numeric angle, not a text representation. Coercion and precise error results need native testing.
Results disagree in the last digits Rounding and floating-point precision can differ. Compare using a meaningful tolerance rather than raw equality.

The official Gnumeric COT entry does not document an exact #DIV/0!, #NUM! or #VALUE! rule for the singularity and nonnumeric inputs. Do not assume Excel’s documented error codes or input bounds automatically apply to Gnumeric without native Gnumeric testing.

Microsoft Excel and LibreOffice Calc also document a COT function, and their common real-valued cotangent definition agrees for ordinary nonsingular inputs. However, error tokens, maximum argument magnitudes, coercion, release support and display precision must be verified per application; Excel-specific error limits are not transferred into this Gnumeric guide. Use the official Gnumeric manual as the primary authority. Gnumeric COT · Microsoft COT reference.

How this guide was checked

The official Gnumeric reference establishes the function’s purpose and argument structure. The arguments and worked examples were editorially reviewed and the stated expected results were independently calculated. The tagged Gnumeric 1.12.62 numerical implementation was additionally checked for the sine/cosine ratio used by COT.

Review date: 2026-10-12. No native application run: the worked outputs are documentation-based or independently calculated expectations, not measurements from installed Gnumeric. Ordinary numeric cases and the stated text-construction examples are checked; blank/text coercion, machine extremes and workbook round trips are not certified. The formula editor in your installed version is the authority for localized separators.

Example-check record · Editorial standards.