The COT function in Google Sheets returns the cotangent of an angle measured in radians. To use it, type =COT(angle) into a cell, replacing angle with a number or cell reference. If your angle is in degrees, wrap it in RADIANS first: =COT(RADIANS(45)). That is the entire answer—the rest of this guide covers syntax, practical examples, and the mistakes that produce wrong results or errors.
What You'll Need
- A Google account with access to Google Sheets (the free web version is fine; the mobile app also supports COT).
- A spreadsheet open in edit mode—you cannot enter formulas in view-only mode.
- Your angle values, either already in the sheet or ready to type. Know whether they are in radians or degrees before you start.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com, sign in, and open the file you want to work in. On mobile, open the Sheets app and tap the file. Labels and menu positions can differ slightly between the web version, Android, and iPhone, but the formula itself is identical everywhere.
- Select an empty cell. Click or tap the cell where you want the cotangent result to appear. A good habit is to put your angle in one column and the formula in the next, so you can see both.
- Start the formula. Type an equals sign
=. This tells Sheets you are entering a formula rather than text. If you typeCOTwithout the equals sign, Sheets stores it as plain text and nothing is calculated. - Type the function name. Enter
COTin capitals or lowercase—Sheets is not case-sensitive. As you type, an autocomplete list appears; select COT from it or keep typing. The open parenthesis(follows immediately. - Enter the angle. You can type a number directly, such as
=COT(1), or reference a cell, such as=COT(A2). The value must be a real number representing radians. Do not put units or the word "radians" inside the parentheses—that produces a #VALUE! error. - Close the parenthesis and press Enter. The formula should look like
=COT(A2). Press Enter (or the checkmark on mobile) and the result appears in the cell. - Convert degrees if needed. Most people measure angles in degrees, but COT expects radians. If your sheet holds 45 (meaning 45 degrees), use
=COT(RADIANS(45))or=COT(RADIANS(A2)). RADIANS converts degrees to radians inside the formula, so you do not have to change your source data. - Copy the formula down. Click the cell, grab the small square handle at its bottom-right corner, and drag down—or double-click the handle to fill the column automatically. On mobile, copy the cell and paste it into the cells below. Relative references adjust automatically, so A2 becomes A3, A4, and so on.
- Check a known value. Cotangent of 45 degrees (π/4 radians) equals 1. Enter
=COT(RADIANS(45))and confirm you get 1. If you do, your setup is correct and you can trust the rest of the column. - Format the output. Select the result cells and use the decimal-place buttons in the toolbar to control rounding. COT can return very long decimals; formatting changes only the display, not the stored value, so downstream formulas stay accurate.
Common Mistakes
- Feeding degrees directly into COT.
=COT(45)does not mean 45 degrees—it means 45 radians, which is roughly 2,578 degrees. The result is mathematically correct but almost never what you intended. Always wrap degree values in RADIANS. - Forgetting the equals sign. Without
=, the cell shows the text "COT(1)" instead of a number. - Using a zero or a multiple of π. Cotangent is undefined wherever sine is zero—at 0, π, 2π, and so on. Sheets returns
#DIV/0!because the calculation divides by zero. That is not a bug; it is the correct mathematical behaviour. - Leaving the parenthesis open. Sheets usually fixes this automatically when you press Enter, but if you are editing an existing formula, a missing
)triggers a parse error. - Referencing a text cell. If A2 contains "45°" or a label rather than a number, COT returns #VALUE!. Keep angle cells numeric and put units in the header instead.
- Expecting COT to accept an array of angles in one cell. It takes a single value. To process a whole column, fill the formula down or use ARRAYFORMULA around a range reference.
Tips
- Use
=1/TAN(angle)if you prefer to think in terms of tangent—it gives the same result and makes the relationship obvious. - To process an entire column at once, try
=ARRAYFORMULA(COT(RADIANS(A2:A100)))in a single cell. Leave room below it, because the results spill downward. - Keep a helper column of angles in radians if you run many trig functions. Converting once is cleaner than wrapping every formula in RADIANS.
- Remember the reciprocal pair: SEC is 1/COS, CSC is 1/SIN, and COT is 1/TAN. Sheets has all three built in, so you rarely need to write the division yourself.
- If a result looks like a very small number near a multiple of π, it is not zero—it is a rounding artefact of floating-point maths. Round the display if it matters.
Troubleshooting
You see #DIV/0!. Your angle is 0, π, or another multiple of π. Cotangent is undefined there. Check whether your input is exactly zero or a value that converts to a multiple of π after RADIANS; if so, the error is expected. Use IFERROR to display a blank or a message instead: =IFERROR(COT(RADIANS(A2)),"undefined").
You see #VALUE!. The cell you reference contains text, a unit symbol, or an empty string. Confirm the cell is a plain number. A leading apostrophe also turns a number into text—remove it.
You see #NAME?. The function name is misspelled, often as COTT or COTAN. Correct it to COT. This error also appears if you typed the formula in a locale that uses a different argument separator—try a semicolon instead of a comma if your sheet is set to a European locale.
The result is wildly wrong. Nine times out of ten the input is in degrees but was not converted. Wrap it in RADIANS and compare. If it is still wrong, check whether the reference points at the cell you think it does—merged cells and inserted rows can shift references.
If that did not work, copy your formula into a fresh cell with a hard-coded number, such as =COT(1). If that returns a value, the problem is in your reference or data, not the function. If it does not, reload the sheet (a browser refresh usually clears a stuck calculation) and try again.
Frequently Asked Questions
Does Google Sheets COT use degrees or radians?
Radians. Every trigonometric function in Sheets—SIN, COS, TAN, COT, SEC, CSC—expects radians. Convert degrees with the RADIANS function first.
Why does COT return #DIV/0! for some angles?
Cotangent is cosine divided by sine. Whenever sine is zero—at 0, π, 2π, and negative multiples—the division is undefined, so Sheets reports a divide-by-zero error. This is correct behaviour, not a fault.
Can I use COT on a whole column at once?
Yes, with ARRAYFORMULA. Put =ARRAYFORMULA(COT(RADIANS(A2:A100))) in one cell and the results fill the cells below. Make sure those cells are empty, or you will get a #REF! error.
What is the difference between COT and TAN?
They are reciprocals: COT(x) equals 1/TAN(x). Use whichever matches your formula; the numerical result is the same apart from tiny floating-point differences.
Does COT work in the Google Sheets mobile app?
Yes. The formula is identical on Android and iPhone. Type it into the formula bar the same way, and use the checkmark to confirm instead of pressing Enter.
Why does my answer show many decimal places?
COT returns a full-precision number. Use the toolbar's decrease-decimal-places button or the Format menu to round the display; the underlying value is unchanged.