COT Function in Google Sheets: Radians, Degrees and PI

COT returns the cotangent of an angle supplied in radians. For a degree value, convert it with RADIANS first. At 45 degrees the mathematical result is 1.

COT function syntax

=COT(angle)
  • angle: the angle in radians.
  • Use COT(RADIANS(value)) when the source contains degrees.
  • Mathematically, cotangent equals cosine divided by sine wherever the sine is nonzero.

Set up the example data

Enter this dataset starting in A1. The first row contains headings. Keep the result area separate from the source table.

Radians
0.5
1
1.5
2
2.5

Calculate cotangent from a radian value

Enter this formula in A9. The angle 0.5 radians produces approximately 1.830488. The output is a ratio, not another angle to convert into degrees.

=COT(A2)

Result (rounded for display): 1.830488.

Calculate cotangent from a radian value in Google Sheets, with the formula and its result visible.

Calculate a column of cotangents

ARRAYFORMULA applies COT to all five angles in A2:A6. The results become negative for the final two inputs, 2 and 2.5 radians.

=ARRAYFORMULA(COT(A2:A6))

Result (rounded for display): 1.830488; 0.642093; 0.070915; -0.457658; -1.338648.

Convert degrees before using COT

For 45 degrees, RADIANS supplies the correct input angle. COT then gives approximately 1, matching the exact mathematical value 1/1. Entering COT(45) would use 45 radians.

=COT(RADIANS(45))

Result: 1.

Use an angle expressed with PI

PI()/6 represents 30 degrees in radians. It can go directly into COT without a degree conversion. The result is approximately 1.732051.

=COT(PI()/6)

Result (rounded for display): 1.732051.

Compare COT with the reciprocal of TAN

This checks whether COT and 1/TAN differ by less than 0.000000000001 for the angle in A2. TRUE means they agree within that numerical tolerance.

=ABS(COT(A2)-1/TAN(A2))<1E-12

Result: TRUE.

Understand zero and PI boundaries

COT(0) returns #DIV/0!. Cotangent is mathematically undefined at all integer multiples of pi, but a spreadsheet approximation to PI() can produce a very large finite result instead of an error.

=COT(0)

Result: #DIV/0!.

Other Google Sheets articles you may also like