Cotangent Calculator

Compute the cosecant of any angle (in degrees or radians). Cosecant is the reciprocal of sine, defined for all angles except where sinθ = 0 (θ = 0°, 180°, 360°, … or 0, π, 2π, … rad).

° Degrees rad Radians
Cotangent is undefined when sinθ = 0 (θ = 0°, 180°, 360°, … or 0, π, 2π, … rad).
cot(0°) = undefined cot(30°) = √3 ≈ 1.73205 cot(45°) = 1 cot(60°) = 1/√3 ≈ 0.57735 cot(90°) = 0 cot(120°) = -1/√3 ≈ -0.57735 cot(135°) = -1 cot(180°) = undefined cot(270°) = 0 cot(360°) = undefined cot(π/4 rad) = 1
Privacy-first computation: All calculations happen locally in your browser. No data is transmitted or stored.
Cotangent Result & Properties
cot(45°) =
1
Reciprocal & ratio identities
cot(θ) = 1/tan(θ) = cos(θ)/sin(θ)
sin(45°) = 0.7071, cos(45°) = 0.7071
Definition: cotθ = cosθ/sinθ   |   Period: 180° (π rad)   |   Domain: θ ≠ kπ   |   Range: (-∞, ∞)
Graph of y = cot(x) (degrees)
y = cot(x)
Current point (θ, cotθ)
Vertical asymptotes (sinθ = 0)

Graph shown for x in degrees: [-360°, 360°] (two periods). Dashed lines at asymptotes: multiples of 180°.

Understanding Cotangent: definition, properties & applications

The cotangent function, denoted cot(θ), is one of the six fundamental trigonometric functions. It can be defined as the reciprocal of tangent: cot(θ) = 1/tan(θ), or equivalently as the ratio of cosine to sine: cot(θ) = cos(θ)/sin(θ). Geometrically, in a right triangle, cotangent is the ratio of the adjacent side to the opposite side. On the unit circle, cot(θ) corresponds to the x-coordinate divided by the y-coordinate.

cot(θ) = \frac{1}{\tan(θ)} = \frac{\cos(θ)}{\sin(θ)} = \frac{\text{adjacent}}{\text{opposite}}

Derivative: d/dθ cot(θ) = −csc²(θ)   |   Integral: ∫ cot(θ) dθ = ln| sin(θ) | + C

Historical & mathematical context

The cotangent function, together with secant and cosecant, was developed by Islamic mathematicians in the 9th century and later incorporated into European trigonometry. The name “cotangent” comes from “complementi tangens” (tangent of the complement), since cot(θ) = tan(90° − θ). Cotangent appears prominently in integral calculus (the integral of cot is logarithmic), in the formulation of the law of cotangents for triangle solving, and in various physics and engineering contexts.

Key properties and identities

  • Reciprocal: cotθ = 1/tanθ, tanθ = 1/cotθ.
  • Odd function: cot(−θ) = −cot(θ) (symmetric about origin).
  • Period: cot(θ + 180°) = cot(θ) (or π rad). Shorter period than sine/cosine.
  • Range: All real numbers (−∞, ∞).
  • Pythagorean identity: 1 + cot²θ = csc²θ.
  • Derivative: d/dθ cotθ = −csc²θ.
  • Integral: ∫ cotθ dθ = ln| sinθ | + C.
  • Series expansion: cotθ = 1/θ − θ/3 − θ³/45 − … (Laurent series).

Practical applications across disciplines

Surveying & Navigation

The law of cotangents is used in solving triangles when three sides are known. Cotangent also appears in the formula for the distance to the horizon and in celestial navigation calculations.

Physics & Engineering

Cotangent appears in the analysis of alternating current circuits (phase angles), in the description of damped harmonic oscillators, and in the design of antenna radiation patterns.

Computer Graphics & Robotics

Used in inverse kinematics to compute joint angles from end‑effector positions, and in 3D projection algorithms where the field of view is expressed in terms of cot(half‑angle).

Step-by-step calculation method

  1. Convert the input angle to radians if needed (JavaScript trigonometric functions use radians).
  2. Compute the sine and cosine of the angle.
  3. If sinθ is zero (or extremely close due to floating point), display “undefined” and warn the user.
  4. Otherwise, return cotθ = cosθ / sinθ (or 1/tanθ, with tanθ computed as sinθ/cosθ).

Our calculator uses double‑precision floating‑point arithmetic. Due to rounding, sin(180°) may be a very small number (e.g., 1.22e-16), resulting in a very large cot value; we treat any |sinθ| < 1e-12 as undefined.

Common mistakes and misconceptions

  • Confusing cotangent with arctangent: cotθ is the reciprocal of tanθ; arctan is the inverse function.
  • Misunderstanding range: cotθ can take any real value, unlike sec and csc which are bounded away from zero.
  • Asymptote awareness: At 0°, 180°, 360°, cotθ is undefined (sinθ = 0). Some calculators may show a huge number due to floating point.
  • Period confusion: cot has period 180° (π rad), not 360°.

Frequently Asked Questions

cot(θ) = 1/tan(θ) is the reciprocal. arctan(x) is the inverse function: arctan(x) = angle whose tangent is x. They are not related by reciprocal.

Since tan(θ+180°) = tanθ, its reciprocal cot also has period 180°. Graphically, the pattern repeats every 180°.

Our tool detects when |sinθ| < 1e-12 and displays “undefined (asymptote)” with a warning, avoiding an extremely large number.

∫ cotθ dθ = ln| sinθ | + C. This integral appears in problems involving trigonometric substitution, in the solution of certain differential equations, and in probability distributions (e.g., Cauchy distribution).

Yes, cotθ = cosθ/sinθ. It can also be expressed as cotθ = √(csc²θ − 1) with sign determined by quadrant.
Authoritative references: Wolfram MathWorld: Cotangent | Khan Academy: Cotangent | Abramowitz, M. and Stegun, I.A. "Handbook of Mathematical Functions" (1972).

Expert verification: This tool implements standard trigonometric definitions and careful handling of asymptotes. Last update: May 2026.