Cotangent Calculator
Calculate cotangent instantly with our math tool. Shows detailed work, formulas used, and multiple solution methods. Includes formulas and worked examples.
Calculator
Adjust values & calculateFormula
The cotangent of angle x equals the cosine divided by the sine, or equivalently the reciprocal of the tangent. In a right triangle, it is the ratio of the adjacent side to the opposite side.
Last reviewed: December 2025
Worked Examples
Example 1: Cotangent of 45 Degrees
Example 2: Cotangent of 120 Degrees
Background & Theory
The Cotangent Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.
History
The history behind the Cotangent Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.
Frequently Asked Questions
Formula
cot(x) = cos(x) / sin(x) = 1 / tan(x) = adjacent / opposite
The cotangent of angle x equals the cosine divided by the sine, or equivalently the reciprocal of the tangent. In a right triangle, it is the ratio of the adjacent side to the opposite side.
Worked Examples
Example 1: Cotangent of 45 Degrees
Problem: Calculate cot(45 degrees) and verify the reciprocal relationship with tangent.
Solution: cos(45) = sqrt(2)/2 = 0.70710678\nsin(45) = sqrt(2)/2 = 0.70710678\ncot(45) = cos(45)/sin(45) = 0.70710678/0.70710678 = 1.0\ntan(45) = 1.0\nReciprocal check: cot(45) x tan(45) = 1.0 x 1.0 = 1.0 (confirmed)
Result: cot(45) = 1.0 | tan(45) = 1.0 | Reciprocal verified
Example 2: Cotangent of 120 Degrees
Problem: Find cot(120 degrees) and determine the sign from the quadrant.
Solution: 120 degrees is in Quadrant II. Reference angle = 180 - 120 = 60 degrees.\ncos(120) = -0.5, sin(120) = 0.86602540\ncot(120) = cos(120)/sin(120) = -0.5/0.86602540 = -0.57735027\nCotangent is negative in Q2 (cosine negative, sine positive).\nEquivalent: cot(120) = -cot(60) = -1/sqrt(3)
Result: cot(120) = -0.57735027 | Quadrant II (negative) | Reference = 60 deg
Frequently Asked Questions
What is the cotangent function?
The cotangent function, written as cot(x), is defined as the reciprocal of the tangent function, meaning cot(x) = 1/tan(x). Equivalently, it equals cos(x)/sin(x), the ratio of the cosine to the sine of an angle. In a right triangle, cotangent represents the ratio of the adjacent side to the opposite side. While less commonly used than sine, cosine, and tangent in basic trigonometry courses, cotangent plays an important role in advanced mathematics, calculus, and various engineering applications. Its values range from negative infinity to positive infinity, and it has a period of 180 degrees (pi radians), completing one full cycle in half the period of sine and cosine.
When is cotangent undefined?
Cotangent is undefined whenever sin(x) = 0, which occurs at integer multiples of 180 degrees (0, 180, 360, -180, etc.) or integer multiples of pi radians. At these points, the cotangent function has vertical asymptotes. This makes intuitive sense because cot(x) = cos(x)/sin(x), and division by zero is undefined. In a right triangle context, cotangent is undefined when the opposite side has zero length, which corresponds to a degenerate triangle. It is important to check for these undefined points when solving equations involving cotangent, as they represent boundaries where the function transitions from positive infinity to negative infinity or vice versa.
How does cotangent relate to tangent?
Cotangent and tangent are reciprocals of each other: cot(x) = 1/tan(x) and tan(x) = 1/cot(x). Their product always equals 1 whenever both are defined: cot(x) times tan(x) = 1. However, they have different undefined points: tangent is undefined at 90 degrees plus multiples of 180 degrees, while cotangent is undefined at multiples of 180 degrees. Both functions have the same period of 180 degrees. An important cofunction relationship also exists: cot(x) = tan(90 - x), meaning the cotangent of an angle equals the tangent of its complement. This is the origin of the co- prefix in cotangent. Both functions share the same sign pattern: positive in quadrants 1 and 3, negative in quadrants 2 and 4.
In which quadrants is cotangent positive or negative?
Cotangent follows the same sign pattern as tangent because cot(x) = cos(x)/sin(x), and the sign is determined by the signs of cosine and sine together. In the first quadrant (0-90 degrees), both sine and cosine are positive, so cotangent is positive. In the second quadrant (90-180 degrees), sine is positive but cosine is negative, making cotangent negative. In the third quadrant (180-270 degrees), both sine and cosine are negative, so cotangent is positive again. In the fourth quadrant (270-360 degrees), sine is negative but cosine is positive, making cotangent negative. The ASTC mnemonic applies: cotangent is positive where tangent is positive (Q1 and Q3).
What is the graph of the cotangent function?
The cotangent graph has a distinctive shape: it is a decreasing curve between each pair of vertical asymptotes. The asymptotes occur at x = 0, 180, 360, -180 degrees (multiples of pi in radians). Between consecutive asymptotes, the function decreases from positive infinity to negative infinity. This is opposite to tangent, which increases from negative infinity to positive infinity between its asymptotes. The graph passes through zero midway between each pair of asymptotes, at x = 90, 270, -90 degrees (odd multiples of pi/2). Unlike sine and cosine, cotangent has no maximum or minimum values and no amplitude. Its period is 180 degrees, meaning each repeating section spans exactly 180 degrees.
What is the derivative and integral of cotangent?
The derivative of cot(x) with respect to x is -csc squared(x), written as d/dx[cot(x)] = -csc2(x). This means cotangent always has a negative slope (it is always decreasing within each period), which is consistent with its graph. The integral of cot(x) dx is ln|sin(x)| + C, where C is the constant of integration and ln denotes the natural logarithm. This integral can be derived by rewriting cot(x) as cos(x)/sin(x) and using u-substitution with u = sin(x). These formulas assume radian measure. The derivative of cot(x) appears frequently in differential equations and physics, particularly in problems involving oscillatory motion and wave mechanics.
References
Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy