Cotangent Calculator
Calculate cotangent (cot) of any angle in degrees, radians, or gradians. Get exact and decimal values with unit circle visualization.
About
Cotangent is the reciprocal of tangent: cot(θ) = cos(θ)sin(θ). The function is undefined wherever sin(θ) = 0, which occurs at θ = nπ for any integer n. Inputting 0°, 180°, or 360° will correctly return "Undefined" rather than a misleading large number. This distinction matters in engineering and physics: confusing a near-zero denominator with an actual zero leads to division artifacts that propagate through signal processing pipelines and structural load calculations. The calculator handles degrees, radians, and gradians, and provides exact symbolic results for standard angles.
Cotangent appears less frequently than sine or cosine in introductory courses, yet it is central to solving right triangles when the adjacent side and opposite side are known, to impedance phase calculations in AC circuits, and to the formulas for spherical excess in geodesy. This tool approximates cot(θ) using IEEE 754 double-precision arithmetic, so results carry roughly 15 significant digits. For angles extremely close to singularities (within 10−12 radians of nπ), the output is clamped to "Undefined" to prevent floating-point overflow from masquerading as a valid result.
Formulas
The cotangent function is defined as the ratio of the adjacent side to the opposite side in a right triangle, or equivalently as the reciprocal of tangent.
Where θ is the input angle. The function is undefined when sin(θ) = 0, i.e., at θ = nπ for integer n.
Angle unit conversions used internally:
Variable legend: θ = angle input. θrad = angle in radians. θdeg = angle in degrees. θgrad = angle in gradians. n = any integer. The period of cotangent is π radians (180°), and it is an odd function shifted by half its period: cot(−θ) = −cot(θ).
Reference Data
| Angle (°) | Angle (rad) | cot(θ) Exact | cot(θ) Decimal | Quadrant | Sign |
|---|---|---|---|---|---|
| 0 | 0 | Undefined | - | - | - |
| 15 | π/12 | 2 + √3 | 3.73205 | I | + |
| 30 | π/6 | √3 | 1.73205 | I | + |
| 45 | π/4 | 1 | 1.00000 | I | + |
| 60 | π/3 | √33 | 0.57735 | I | + |
| 75 | 5π/12 | 2 − √3 | 0.26795 | I | + |
| 90 | π/2 | 0 | 0.00000 | I | 0 |
| 120 | 2π/3 | −√33 | −0.57735 | II | − |
| 135 | 3π/4 | −1 | −1.00000 | II | − |
| 150 | 5π/6 | −√3 | −1.73205 | II | − |
| 180 | π | Undefined | - | - | - |
| 210 | 7π/6 | √3 | 1.73205 | III | + |
| 225 | 5π/4 | 1 | 1.00000 | III | + |
| 240 | 4π/3 | √33 | 0.57735 | III | + |
| 270 | 3π/2 | 0 | 0.00000 | III/IV | 0 |
| 300 | 5π/3 | −√33 | −0.57735 | IV | − |
| 315 | 7π/4 | −1 | −1.00000 | IV | − |
| 330 | 11π/6 | −√3 | −1.73205 | IV | − |
| 360 | 2π | Undefined | - | - | - |