Cotangent Calculator - cot(x) and arccot(x)

Compute cot(x) and arccot(x) in degrees or radians. Reciprocal of tangent, unit-circle definition, asymptotes, Pythagorean identity 1+cot²=csc² and worked examples.

cot

Inverse cotangent calculator

cot-1
°
rad

What is the Cotangent Function?

The cotangent function, written cot(x), is one of the six trigonometric functions. In a right triangle, cot(θ) is the ratio of the side adjacent to angle θ over the side opposite to it — the upside-down sibling of tan(θ), which is opposite over adjacent. Equivalently, cot(x) = cos(x) / sin(x) = 1 / tan(x). On the unit circle, cot(θ) gives the x-coordinate of the point on the line y = sin(θ) when stretched out to where it intersects the horizontal line y = 1.

Cotangent shows up most often in calculus (it appears in standard integrals and derivatives), in physics (where it links beam deflections to lateral forces), in surveying (telescope inclination measurements use cot of the elevation angle), and in computer graphics (perspective projection matrices include cot(fov/2)). It is also useful in optics for the lensmaker's equation and in mechanical engineering for analysing inclined planes.

The mathematical definition is:

cot(x) = cos(x) / sin(x) = 1 / tan(x)

Key properties of cotangent:

  • Domain: cot(x) is defined for every real x except x = nπ (0, ±π, ±2π, …), where sin(x) = 0 and the function blows up.
  • Range: the cotangent takes every real value from −∞ to +∞.
  • Periodicity: cot(x) repeats every π radians (180°), not 2π. The same shorter period applies to tangent, for the same algebraic reason.
  • Odd symmetry: cot(−x) = −cot(x). Rotational symmetry around the origin.
  • Vertical asymptotes: at every x = nπ (0, π, 2π, …), where sine equals zero and you'd be dividing by zero.
  • Derivative: d/dx cot(x) = −csc²(x). It is always negative wherever cotangent is defined, meaning cot is strictly decreasing on each branch.

Cotangent is the reciprocal of tangent, but it's not just a curiosity — it shows up wherever you'd rather divide by tangent or where the underlying geometry is naturally 'adjacent over opposite' instead of 'opposite over adjacent'.

What is Inverse Cotangent (Arccotangent)?

The inverse cotangent function, written arccot(x) or cot⁻¹(x), takes any real number and returns the angle whose cotangent equals that number. It's the inverse operation of cot: arccot(cot(θ)) = θ when θ is in the canonical range.

Mathematical definition:

arccot(x) = arctan(1/x) for x > 0, and π − arctan(1/|x|) for x < 0

Key properties of the inverse cotangent:

  • Domain: arccot is defined for every real number (all of ℝ).
  • Range: the canonical output range is (0, π), or 0° to 180° exclusive. Some textbooks use (−π/2, π/2) excluding 0 — both conventions exist, which causes confusion.
  • Monotonicity: arccot is strictly decreasing — larger input gives smaller angle.
  • Special values: arccot(0) = π/2 (90°), arccot(1) = π/4 (45°), arccot(√3) = π/6 (30°), arccot(−1) = 3π/4 (135°).
  • Derivative: d/dx arccot(x) = −1 / (1 + x²) — same magnitude as arctan but opposite sign.

The inverse cotangent is used wherever an angle must be recovered from a cotangent reading: surveying instruments, ramp design, and any geometric problem where the natural data is the ratio of adjacent to opposite sides.

Common Cotangent Values

Important cotangent values for common angles:

  • cot(0°) = undefined (vertical asymptote)
  • cot(30°) = √3 ≈ 1.732
  • cot(45°) = 1
  • cot(60°) = 1/√3 ≈ 0.577
  • cot(90°) = 0
  • cot(120°) = −1/√3 ≈ −0.577
  • cot(135°) = −1
  • cot(150°) = −√3 ≈ −1.732

Frequently Asked Questions

Because cot(x) = cos(x) / sin(x), and sin(0°) = 0. Dividing by zero is undefined in standard arithmetic, so cot(0°) — and cot(180°), cot(360°), cot(nπ) for any integer n — has no value. Geometrically, cot(θ) is the slope of the horizontal-to-vertical line in the unit circle picture, and at θ = 0° that line is horizontal (along the x-axis), giving an infinite ratio of horizontal to vertical run. Approaching 0° from above, cot grows toward +∞: cot(1°) ≈ 57.29, cot(0.1°) ≈ 572.96, cot(0.01°) ≈ 5,729.58. Approaching from below (in the fourth quadrant, near 360°), cot heads to −∞. The graph has a vertical asymptote at every multiple of π, exactly where sin crosses zero. The pattern matches tangent's behaviour at π/2 + nπ, where cos hits zero. The cot graph is essentially tangent shifted by 90° and flipped — they share asymptotes but at opposite places.

Mathematically the two are interchangeable — cot(x) = 1/tan(x) — but each is the cleaner choice for different geometries. Use tangent when the natural ratio is rise over run, slope, gradient, or opposite over adjacent: roof pitch, road grade, slope of a line. Use cotangent when the natural ratio is adjacent over opposite: surveying elevation angles where you measure horizontal distance to a tall object and want to know how tall, the cone half-angle of a beam where you measure the lateral spread per unit length, or in spherical trigonometry where cotangent rules show up directly in sub-problems. Numerically there's also a precision argument: near 90°, tan(x) becomes enormous and slightly noisy, while cot(x) becomes nearly zero and behaves cleanly — so problems involving angles close to vertical are better expressed with cotangent. Many calculus textbooks introduce cotangent only to derive its integral ∫cot(x) dx = ln|sin(x)| + C, but it's a genuine workhorse in surveying and optics.

Start with sin²(θ) + cos²(θ) = 1. Divide everything by sin²(θ) and you get 1 + cot²(θ) = csc²(θ), where csc(θ) = 1/sin(θ) is the cosecant. This is one of the three Pythagorean identities (the others are sin² + cos² = 1 itself, and 1 + tan² = sec²). It's the foundation of many integration techniques — when you see √(1 + x²) in an integrand, the trigonometric substitution x = cot(θ) (or tan(θ)) transforms the radical into csc(θ) (or sec(θ)) and the rest becomes tractable. It also lets you compute cot from a known csc without going through sin and then dividing — useful in spherical trigonometry where csc shows up naturally as the reciprocal of vertical spread. Memorise the three Pythagorean identities together: sin²+cos²=1, 1+tan²=sec², 1+cot²=csc². They are derived from the same identity by dividing by different things.

Because mathematicians never agreed on the canonical output range. Convention A (used by most calculus textbooks, by Wolfram Mathematica, and by GeoGebra): arccot(x) outputs a value in (0, π). This makes arccot continuous everywhere on ℝ, which is mathematically elegant but means arccot is NOT just arctan(1/x) — for negative x, the two differ by π. Convention B (used by some computer-algebra systems, by older textbooks, and naturally implied by the identity arccot(x) = arctan(1/x)): arccot(x) outputs a value in (−π/2, π/2) excluding 0, with a discontinuity at x = 0. Both are defensible; neither is wrong. The practical implication: if you compute arccot(−1) you might get 135° (3π/4) under Convention A or −45° (−π/4) under Convention B. Always check which convention your tool uses. Most programming languages don't provide arccot directly — you compute it as atan2(1, x), which gives a value in (0, π) and matches Convention A. This calculator uses Convention A: the output is always in (0°, 180°).

The derivative is d/dx cot(x) = −csc²(x) = −1/sin²(x). Proof: write cot = cos/sin, apply the quotient rule, and simplify with sin² + cos² = 1. The minus sign means cotangent is strictly decreasing on every branch between asymptotes — start at +∞ at x = 0⁺, decrease through 1 at π/4, hit 0 at π/2, drop through −1 at 3π/4, and head to −∞ as x approaches π. The integral is ∫cot(x) dx = ln|sin(x)| + C. Derivation: substitute u = sin(x), du = cos(x) dx, then ∫cot(x) dx = ∫(cos(x)/sin(x)) dx = ∫du/u = ln|u| + C = ln|sin(x)| + C. The absolute value is crucial — without it the formula would be undefined on the negative branches of sin. Both of these are standard table entries that calculus students memorise, alongside the parallel facts d/dx tan(x) = sec²(x) and ∫tan(x) dx = −ln|cos(x)| + C.

The classic surveying application: you stand a known horizontal distance d from a vertical object (a tree, tower, mountain) and measure the angle of elevation θ from your sightline to the top. The height is h = d · tan(θ). If instead you know the height and want the horizontal distance, you'd write d = h · cot(θ) — cotangent naturally appears when the unknown is the horizontal leg. In structural engineering, the deflection of a cantilever beam under transverse load involves cot of the boundary-condition angles. In optics, the lensmaker's equation in some forms uses cot of the half-angle of the cone of light entering the lens. In computer graphics, the perspective projection matrix in OpenGL and DirectX has cot(fovy/2) in the y-scale entry — that's where the field of view affects vertical zoom. In civil engineering, the slope of a side-cut on a road is sometimes given as ratio 1:n meaning 1 vertical to n horizontal, which is exactly cot(θ) for the slope angle θ. Cotangent is the function that shows up whenever 'how wide per unit of height' is the natural question.

Because cot(x + π) = cos(x + π) / sin(x + π) = (−cos(x)) / (−sin(x)) = cos(x)/sin(x) = cot(x). When you rotate by 180°, both sine and cosine flip sign, and the two negatives cancel in the ratio. So cotangent of an angle equals cotangent of that angle plus a half-turn. Geometrically, the line through the origin at angle θ is the same line as at angle θ + 180° (just traversed in the opposite direction), and cotangent measures something about that line — specifically, its reciprocal slope — so the function can't distinguish the two angles. The same period-halving happens with tangent for the same reason. Sine and cosine, on the other hand, take period 2π because they care about which end of the line you're at, not just the line. This shorter period also means arccot's output range is half the size of arcsin's or arccos's, which is why arccot returns values in (0, π) — a single period.

Beyond surveying and engineering, cotangent appears in: (1) astronomy — the cotangent of the altitude angle of a celestial object scales how far through the atmosphere its light travels, used to model atmospheric extinction in photometry; (2) particle physics — the angular distribution of scattered particles is often written using cot(θ/2), notably in Rutherford scattering where dσ/dΩ ∝ csc⁴(θ/2); (3) audio engineering — the bilinear transform used to convert continuous-time filters to digital ones substitutes s → 2/T · cot(ωT/2), giving the warped frequency relationship; (4) electrical engineering — transmission-line theory uses cot(βℓ) where ℓ is line length and β is the phase constant, to describe short-circuited stubs; (5) crystallography — the geometric structure factor for some lattices contains cotangent terms; (6) finance — though less common, certain interest-rate models with periodic boundary conditions produce cotangent terms in their analytical solutions. The function isn't as glamorous as sine or cosine, but anywhere there is a ratio of horizontal to vertical in a problem with rotational or periodic structure, cot is sitting just below the surface.
Cotangent Calculator - cot(x) and arccot(x) — Compute cot(x) and arccot(x) in degrees or radians. Reciprocal of tangent, unit-circle definition, asymptotes, Pythagore
Cotangent Calculator - cot(x) and arccot(x)