The COT function returns the cotangent of an angle given in radians, equal to 1/TAN(number). Use it whenever you need cotangent values in trigonometry, engineering, or geometry calculations in Excel.
=COT(number)What does COT do?
The COT function in Excel calculates the cotangent of an angle. Cotangent is the reciprocal of tangent, so COT(x) equals 1/TAN(x). Excel's COT expects the angle in radians, not degrees, which is the most common source of confusion for new users.
Why does this matter? If you work with triangles, slopes, waveforms, or any geometry, you may need cotangent values. Instead of manually computing 1/TAN or converting degrees to radians each time, COT gives you a clean, single-cell formula. It is part of Excel's Math & Trigonometry category and works in all modern Excel versions.
A practical situation: an engineer analysing a roof pitch has angles in degrees and needs cotangent to find horizontal run per unit rise. With COT and RADIANS, the calculation becomes a simple formula that can be copied down a column, reducing errors and saving time.
When to use COT
- Calculating cotangent for angles measured in radians in trigonometric problems.
- Converting degree-based survey or engineering data to cotangent values using RADIANS.
- Finding slopes or gradients where cotangent represents run over rise.
- Solving triangle problems in geometry homework or design work.
- Analysing periodic signals or waveforms in engineering spreadsheets.
- Building reusable calculators for students or colleagues who need cotangent results.
COT syntax
=COT(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The angle in radians for which you want the cotangent. If you have degrees, wrap the angle in RADIANS, e.g., =COT(RADIANS(45)). |
What it returns: The cotangent of the given angle as a numeric value. The result can be positive, negative, or zero depending on the angle. If the angle is a multiple of π, COT returns a very large number due to division by a near-zero tangent.
COT examples
1 Cotangent for a list of survey angles
Here we apply COT to a column of angles from a survey, all in degrees. The goal is to generate cotangent values for further slope calculations. The formula =COT(RADIANS(B3)) converts the angle in B3 (15 degrees) to radians and returns the cotangent. For 15 degrees, the cotangent is approximately 3.732. The result goes in D3.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Point | Angle (degrees) | |||
| 2 | P1 | 10 | |||
| 3 | P2 | 15 | 3.732050808 | ||
| 4 | P3 | 20 | |||
| 5 | P4 | 25 | |||
| 6 |
2 Roof pitch: horizontal run per unit rise
In construction, the cotangent of a roof angle gives the horizontal run for a unit of rise. The goal is to compute this for a 30-degree pitch. The formula =COT(RADIANS(B2)) converts 30 degrees to radians and returns the cotangent, which is about 1.732. This means for every 1 unit of rise, the roof runs about 1.732 units horizontally. The result is in D2.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Roof section | Pitch angle (degrees) | |||
| 2 | Main roof | 30 | 1.732050808 | ||
| 3 | Porch | 22.5 | |||
| 4 | Extension | 35 | |||
| 5 |
3 Engineering: cotangent of phase angles
Electrical engineers often work with phase angles in radians. This example computes cotangent for a set of phase angles. The goal is to get the cotangent for the angle in B4 (1.2 radians). The formula =COT(B4) returns approximately 0.3888. This value might be used in impedance or power factor calculations. The result is placed in D4.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Signal | Phase angle (radians) | |||
| 2 | S1 | 0.8 | |||
| 3 | S2 | 1 | |||
| 4 | S3 | 1.2 | 0.3887795694 | ||
| 5 | S4 | 1.4 | |||
| 6 |
Common COT errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The argument is text or a cell containing non-numeric data. | Ensure the number argument is numeric. Use VALUE or clean the data if needed. |
| #DIV/0! | The angle is a multiple of π (e.g., 0, π, 2π), making tangent zero and cotangent undefined. | Avoid exact multiples of π, or handle with IFERROR to display a message. |
| #NUM! | The argument is extremely large or results in an overflow. | Check that the angle is within a reasonable range and not excessively large. |
| Wrong result (not an error value) | Providing degrees directly instead of radians. | Wrap the angle in RADIANS, e.g., =COT(RADIANS(45)). |
Tips for using COT
- Always convert degrees to radians with RADIANS before using COT.
- Use
=1/TAN(angle)as a mental check; COT should match. - Wrap COT in ROUND if you need a fixed number of decimal places.
- Use IFERROR to handle angles where cotangent is undefined (multiples of π).
- Remember that COT(π/4) equals 1, a useful sanity check.
- For large datasets, enter the formula once and copy down; avoid retyping.
Frequently asked questions
What is the difference between COT and TAN?
COT returns the cotangent (1/TAN), while TAN returns the tangent. They are reciprocals: COT(x) = 1/TAN(x).
Does COT use degrees or radians?
COT uses radians. If your angle is in degrees, convert it with RADIANS first, e.g., =COT(RADIANS(45)).
Why does COT(0) give a huge number instead of an error?
Excel returns a very large number because tangent of 0 is 0, and division by a near-zero value yields a huge result. Mathematically, cotangent of 0 is undefined.
Can I use COT with negative angles?
Yes, COT works with negative angles and returns the correct negative cotangent value.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. COT reference