Skip to content
ihateDesmos

Derivative of cos x

Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The derivative of cos x
ddx(cos(x))=−sin(x)

The derivative of cos x is −sin x. Just after x = 0, cosine starts falling, so its slope is negative while sine is positive, and that is where the minus sign comes from.

−6−4−2246−110
Open in calculator
y=cos(x)
in blue and its derivative
y=−sin(x)
in red.

How to find the derivative of cos x

Method: limit definition.

  1. 1
    Start from the definition: d/dx cos x = limit as h → 0 of (cos(x + h) − cos x) / h.
  2. 2
    Expand with the angle addition formula: cos(x + h) = cos x cos h − sin x sin h.
  3. 3
    Group the terms: cos x · (cos h − 1)/h − sin x · (sin h)/h.
  4. 4
    Use the standard limits (cos h − 1)/h → 0 and (sin h)/h → 1.
  5. 5
    What remains is cos x · 0 − sin x · 1 = −sin x.

What it means on the graph

Cosine is flat at its peak at x = 0, where −sin x is 0. It falls fastest at x = π/2, where −sin x reaches −1. At its lowest point, x = π, it is flat again.

In the window shown, the derivative is zero at x = −2π, x = −π, x = 0, x = π, x = 2π. Those are the points where the graph of cos x has a horizontal tangent.

Table of values

The derivative column uses the formula. The last column estimates the slope directly from the original function, as an independent check.

Values of cos x and its derivative
xcos x−sin xSlope, measured
−5.030.312298−0.949984−0.949984
−3.14−0.9999990.001592650.00159265
−1.260.3058170.952090.95209
0100
1.88−0.3043−0.952576−0.952576
3.77−0.8089650.5878570.587857
5.030.3122980.9499840.949984

Second derivative

Differentiating once more gives:

d2dx2(cos(x))=−cos(x)

The second derivative tells you which way the graph bends: positive means it curves upward, and negative means it curves downward.

Related derivatives

The same result with the chain or product rule. Each of these is checked numerically too.

Related derivatives
FunctionDerivative
cos(2x)
−2sin(2x)
cos(x2)
−2xsin(x2)
cos(ln(x))
−sin(ln(x))x

Common mistakes

  • Dropping the minus sign, which is the most common mistake with this derivative.
  • Using degrees. The formula assumes x is in radians.

Frequently asked questions

What is the derivative of cos x?
The derivative of cos x is −sin x.
What is the second derivative of cos x?
Differentiate −sin x again to get the second derivative. The result is shown on this page under “Second derivative”.
Why is the derivative of cos x negative?
Because cosine decreases on the interval from 0 to π, its slope is negative there, which matches −sin x, since sin x is positive on that interval.
How do I remember which trig derivatives are negative?
Every “co-” function has a negative derivative: cos, cot and csc. So the derivatives of sin, tan and sec start with a plus sign.

Keep going

Differentiate any function

Type your own function into the derivative calculator and see every rule applied, step by step.

Open the derivative calculator