What is cot x? The cotangent definition
The cotangent is one of the six trigonometric functions, and arguably the least famous of them. It rarely gets the spotlight that sine and cosine enjoy, but it still turns up in textbooks, in calculus, and anywhere a slope is measured as run per rise instead of rise per run. This cotangent calculator gives you cot(x) for any angle, in degrees, radians, or gradians, together with the exact value, the graph, and every alternative formula worth knowing.
In a right triangle, the trigonometric functions describe ratios between the side lengths. With α as one of the two acute angles, the cot definition is simply:
cot(α) = adjacent / opposite
Divide the side next to the angle by the side across from it. The strength of this definition is that the actual size of the triangle does not matter: scale the triangle up or down while keeping the angle intact, and both sides scale by the same factor, so the ratio — and with it the cotangent — does not change.
There is a weakness too. A right triangle can only host angles between 0° and 90° (0 to π/2 radians), so the definition above stops there. To reach every angle, including negative ones, we move the whole idea onto the plane. Let A = (x, y) be a point, and let α be the directed angle running counterclockwise from the positive horizontal axis to the segment joining (0, 0) and A. Substituting y for the opposite side and x for the adjacent one gives the general cotangent formula:
cot(α) = x / y
Because α is directed, it can exceed 90°, exceed a full 360° turn, or run clockwise into negative values. And because the formula divides by y, it answers the question of what cot 0 is: at 0° the point sits on the horizontal axis, y = 0, and dividing by zero is not allowed. cot 0 is undefined.
Cot graph
The graph of cot x is a chain of identical, disconnected branches. Each branch falls from +∞ to −∞, crosses zero halfway, and never touches its neighbours:
- Period: π (180°) — not 2π. cot(x + 180°) = cot(x).
- Vertical asymptotes: at x = n·π (…, −180°, 0°, 180°, 360°, …), where sin x = 0.
- Zeros: at x = π/2 + n·π (…, 90°, 270°, …), where cos x = 0.
- Range: all real numbers — cot takes every value on every branch.
- Monotonic: strictly decreasing across each branch.
- Odd function: cot(−x) = −cot(x), so the graph is symmetric about the origin.
This is the tidiest way to keep cot and tan apart. They share a period of π and both sweep the full range of real numbers, but their special points are swapped: tan is undefined where cot is zero, and tan is zero where cot is undefined.
How to find the cotangent function? Alternative cot formulas
Several formulas produce the cotangent, and they are not quite interchangeable:
- cot(x) = cos(x) / sin(x) — the definition this calculator uses. It works at every angle where cot exists.
- cot(x) = 1 / tan(x) — the reciprocal identity, and the one to watch. It quietly fails at 90° and 270°: there tan is undefined, so 1/tan is meaningless, yet cot is a perfectly ordinary 0. The cos-over-sin definition has no such gap.
- cot(x) = tan(90° − x) — the cofunction identity. The "co" in cotangent is exactly this: the tangent of the complementary angle.
- cot(x) = cos(x) · csc(x) — handy when you already have the cosecant.
Exact values repeat every 180°, so a short table covers everything:
| α | 0° | 30° | 45° | 60° | 90° | 120° | 135° | 150° | 180° |
|---|---|---|---|---|---|---|---|---|---|
| cot α | undefined | √3 | 1 | √3/3 | 0 | −√3/3 | −1 | −√3 | undefined |
Notice that cot is positive in quadrants I and III and negative in quadrants II and IV — the same sign pattern as the tangent, since the two differ only by a reciprocal.
Example: using the cotangent calculator
Suppose a ramp rises 3 m and leaves the ground at 30°. How far does it reach horizontally?
- Enter 30 as the angle and leave the unit on degrees.
- The calculator returns cot(30°) = √3 ≈ 1.7320508.
- Enter a rise of 3 and choose m as the unit.
- From cot(α) = x / y we get x = y · cot(α) = 3 · 1.7320508 ≈ 5.196 m (≈ 17.05 ft).
That is the cotangent doing what it is best at: converting a known height into a horizontal run. Because cot(α) is run per unit rise, multiplying it by the rise gives the run directly — no reciprocal, no second step. Add a price per metre or per foot and the calculator will also cost out that horizontal distance in your currency.
Try 90° next: cot(90°) = 0, so the run collapses to zero — the ramp is vertical. Then try 0°: cot is undefined, and the calculator says so, because a ray that never rises can never reach a height of 3 m, no matter how far it travels.