User Rating 0.0
Total Usage 0 times
Enter a number. Use "pi" or "π" for π (e.g. pi/4).
Presets:
Is this tool helpful?

Your feedback helps us improve.

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.

cotangent cot trigonometry trig calculator angle unit circle math

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.

cot(θ) = cos(θ)sin(θ) = 1tan(θ)

Where θ is the input angle. The function is undefined when sin(θ) = 0, i.e., at θ = nπ for integer n.

Angle unit conversions used internally:

θrad = θdeg × π180
θrad = θgrad × π200

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(θ) Exactcot(θ) DecimalQuadrantSign
00Undefined - - -
15π/122 + 33.73205I+
30π/631.73205I+
45π/411.00000I+
60π/3330.57735I+
755π/122 30.26795I+
90π/200.00000I0
1202π/333−0.57735II
1353π/41−1.00000II
1505π/63−1.73205II
180πUndefined - - -
2107π/631.73205III+
2255π/411.00000III+
2404π/3330.57735III+
2703π/200.00000III/IV0
3005π/333−0.57735IV
3157π/41−1.00000IV
33011π/63−1.73205IV
3602πUndefined - - -

Frequently Asked Questions

At those angles, sin(θ) = 0 exactly, making cot(θ) = cos(θ)/sin(θ) a division by zero. Some calculators display ±∞ or overflow values, but these are mathematically meaningless. This tool detects when the angle is within 10⁻¹² radians of nπ and returns "Undefined" to prevent misleading results. In practical engineering, treating an undefined value as a large finite number can cause numerical instability in iterative solvers.
IEEE 754 double-precision stores approximately 15-17 significant decimal digits. Near nπ, sin(θ) approaches zero and loses relative precision due to catastrophic cancellation. For example, cot(179.9999999°) may produce a result accurate to only 5-6 digits. The tool uses an epsilon threshold of 10⁻¹² to clamp values to "Undefined" rather than display unreliable large numbers. For angles more than 10⁻¹² radians away from singularities, results are reliable to at least 10 significant figures.
Degrees divide a full rotation into 360 equal parts. Radians use the ratio of arc length to radius, so a full rotation equals 2π ≈ 6.28318 radians. Gradians (also called gons) divide a full rotation into 400 parts and are used primarily in surveying and land measurement in continental Europe. The conversion factors are: 1° = π/180 rad ≈ 0.01745 rad, and 1 grad = π/200 rad = 0.9° exactly. Cotangent's period is 180° = π rad = 200 grad.
In Quadrant I (0° - 90°), both cos(θ) and sin(θ) are positive, so their ratio cot(θ) is positive. In Quadrant II (90° - 180°), cos(θ) is negative and sin(θ) is positive, giving a negative ratio. In Quadrant III (180° - 270°), both are negative, so the ratio is positive. In Quadrant IV (270° - 360°), cos(θ) is positive and sin(θ) is negative, yielding a negative result. This sign pattern is identical to cosine divided by sine in each quadrant.
No. This tool computes the circular cotangent cot(θ) = cos(θ)/sin(θ), not the hyperbolic cotangent coth(x) = cosh(x)/sinh(x) = (eˣ + e⁻ˣ)/(eˣ − e⁻ˣ). The hyperbolic variant has a different domain (all real numbers except 0), range (|coth(x)| > 1), and no periodicity. Confusing the two in thermal physics or electrical engineering (e.g., Langevin function) produces incorrect results.
The tool maintains a lookup table of 19 standard angles (0° through 360° in 15° increments). For these angles, it returns symbolic exact values like √3, 1, √3/3, or "Undefined" instead of decimal approximations. This is useful in academic work where exact forms are required. For any non-standard angle, the tool computes a decimal approximation to 10 decimal places using JavaScript's Math.cos and Math.sin functions.