Cotangent Calculator
Enter an angle, choose degrees or radians and the calculator returns its cotangent. The guide covers the definition, the angles where cotangent breaks down and a few practical examples.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
The cotangent function, cot(x)
The cotangent is the reciprocal of the tangent. In a right triangle with acute angle θ, it compares the leg next to the angle with the leg opposite it, which is the tangent upside down. It is sometimes abbreviated cotan.
cot θ = adjacent ÷ opposite = 1 ÷ tan θ = cos θ ÷ sin θ
- Domain: every angle except whole multiples of 180° (π radians), where sin θ = 0 and the division fails.
- Range: all real numbers; there is no largest or smallest cotangent.
- Period: 180° (π radians), half that of sine and cosine.
- Symmetry: an odd function, cot(−θ) = −cot θ.
- Direction: it decreases from +∞ just after 0° to −∞ just before 180°, passing through 0 at 90°.
Another way to see it: cot θ = tan(90° − θ). The cotangent of an angle is the tangent of its complement, which is where the “co” in the name comes from.
How to use the calculator, and what it reports
Type the angle, select degrees or radians and press Calculate. The answer is written as cot(angle) = value and is rounded to six decimals. Whole numbers appear bare (cot 45° = 1, cot 90° = 0), values that need at most two decimals get two, those needing three or four get four, and larger magnitudes use thousands separators, for example cot 0.0005 rad = 1,999.999833.
Undefined angles. In degree mode the calculator drops the fractional part of the angle and checks whether the remaining whole number is a multiple of 180. If so, it answers “Cotangent of … is not defined.” That catches 0°, 180°, 360° and −540°, but it also catches angles such as 0.5° or 180.5°, which are defined mathematically. To get the cotangent of a very small angle, convert it to radians first (0.5° = 0.0087266 rad) and use the radian setting: cot 0.5° = 114.588650.
Radian mode has no such check. Entering 0 radians returns “inf”, and entering 3.141592653589793 (the closest decimal to π) returns −8,165,619,676,597,685 instead of “undefined”, because no computer can store π exactly and the sine of that stored number is a tiny non-zero figure. Treat enormous results near multiples of π as signs of an undefined point.
Write the angle as a plain decimal such as 30, -12.5 or 0.001. Exponent notation, a leading plus sign or a comma will produce an error.
Cotangent of common angles
| Degrees | Radians | Exact cotangent | Decimal |
|---|---|---|---|
| 30° | π/6 | √3 | 1.732051 |
| 45° | π/4 | 1 | 1 |
| 60° | π/3 | √3/3 | 0.577350 |
| 90° | π/2 | 0 | 0 |
| 120° | 2π/3 | −√3/3 | −0.577350 |
| 135° | 3π/4 | −1 | −1 |
| 150° | 5π/6 | −√3 | −1.732051 |
| 0°, 180°, 360° | 0, π, 2π | undefined | not defined |
Working out a cotangent by hand
The simplest route is to find the tangent (or the sine and cosine) and invert. Example: tan 20° = 0.363970, so cot 20° = 1 ÷ 0.363970 = 2.747477. The complement rule gives the same figure, because tan 70° = 2.747477 as well.
For a small angle x measured in radians, the cotangent is close to the reciprocal of the angle. A more accurate expansion is:
cot x ≈ 1/x − x/3 − x³/45 − …x in radians, valid for 0 < x < π.
Example: x = 0.1 radian. 1/x = 10, x/3 = 0.033333 and x³/45 = 0.000022, so cot 0.1 ≈ 10 − 0.033333 − 0.000022 = 9.966644, matching the calculator.
Worked example: length of a shadow
A flagpole is 12 m tall and the sun stands 35° above the horizon. The shadow is the leg next to the 35° angle, and the pole is the leg opposite it, so the shadow length is the height multiplied by the cotangent.
shadow = height × cot 35° = 12 × 1.428148 ≈ 17.14 m
Check: enter 35 in degree mode to read 1.428148. As the sun climbs, the cotangent falls; at 45° the shadow equals the pole's height, and at 90° (cot = 0) it vanishes.
Identities and related tools
- Pythagorean form: 1 + cot²θ = csc²θ, where csc θ = 1 ÷ sin θ.
- Sum formula: cot(A + B) = (cot A · cot B − 1) ÷ (cot A + cot B).
- Inverse: the arccotangent calculator turns a cotangent value back into an angle.
- Partner function: the tangent calculator gives the reciprocal, and the trigonometry calculator solves whole triangles.
Cotangent is handy whenever the known side is the opposite leg and you need the adjacent one, as in slope, ramp and surveying problems.
Frequently asked questions
Why does the calculator say the cotangent of 180 is not defined?
At 180° the sine is zero and cot = cos ÷ sin would divide by zero. The same happens at every whole multiple of 180°, including 0° and 360°. The graph has a vertical asymptote at each of those angles.
How do I calculate cotangent from tangent?
Take the reciprocal: cot θ = 1 ÷ tan θ. For tan 20° = 0.363970 you get cot 20° = 2.747477.
What is cot(90)?
In degrees it is 0, because the cosine of a right angle is zero while its sine is 1. In radians, 90 means 90 radians, and cot(90) is a different number, about −0.501203.
Why does cot(0) give “inf” in radian mode?
At zero the cotangent tends to infinity, so the radian calculation divides by zero and shows inf. In degree mode the same input is flagged as not defined.
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Cotangent Calculator. Reeliy. https://reeliy.com/calculators/cot-calculator“Cotangent Calculator.” Reeliy, 2026, https://reeliy.com/calculators/cot-calculator.