practicecalculus
Derivative rules

Constant Rule for Derivatives: Why the Derivative of c Is 0

The constant rule says the derivative of any constant is 0. The formula, a one-line proof, examples with π and e, and the mistakes to avoid.

Derivative rules Updated 3 min read

At a glance

\frac{d}{dx}\, c = 0
Applies to
Any expression that does not depend on x, such as 7, \pi, e^2 or \ln 5
In words
A constant never changes, so its rate of change is zero
Graph meaning
The graph of y = c is a horizontal line, which has slope 0 everywhere
Integral version
\int 0\,dx = C, which is why antiderivatives end with +\,C
Related rules
Power rule, constant multiple rule, sum rule
On this page
  1. The constant rule formula
  2. Examples
  3. Why the constant rule works
  4. Constants added vs constants multiplied
  5. The constant rule in reverse
  6. Common mistakes

The constant rule says that the derivative of a constant is zero. A constant never changes, so its rate of change is 0 everywhere. It is the simplest derivative rule, and it quietly appears in almost every derivative you compute.

The constant rule formula

For any constant c:

\frac{d}{dx}\, c = 0

"Constant" means anything that does not depend on the variable you are differentiating with respect to. That includes ordinary numbers, but also expressions like \pi^2, e^3, \sqrt{7}, \sin 1 and \ln 5.

Graph of the constant function y = 3 and its derivative y = 0
The line y = 3 is horizontal, so its slope at every point is 0. The derivative is the line y = 0.

Examples

Function Why it is constant Derivative
7 A number 0
-12.5 A number 0
\pi A number, about 3.14 0
e^3 No x anywhere 0
\ln 5 No x anywhere 0
\sin\frac{\pi}{6} Equals \frac{1}{2} 0

Example: a constant term in a polynomial. With the sum rule, each term is differentiated separately and the constant term drops out:

\frac{d}{dx}\left(x^2 + 4x + 9\right) = 2x + 4 + 0 = 2x + 4

Example: a parameter. If a and b are constants, then

\frac{d}{dx}\left(a^2 + bx\right) = 0 + b = b

The a^2 looks like a power, but it does not depend on x, so it is a constant.

Why the constant rule works

Use the limit definition of the derivative with f(x) = c:

f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} = \lim_{h \to 0} \frac{c - c}{h} = \lim_{h \to 0} 0 = 0

You can also see it as a special case of the power rule: c = c\,x^0, and \frac{d}{dx}\,c\,x^0 = c \cdot 0 \cdot x^{-1} = 0 (for x \ne 0).

Constants added vs constants multiplied

This is where the constant rule meets the constant multiple rule:

Expression Derivative Reason
x^3 + 5 3x^2 An added constant vanishes
5x^3 15x^2 A multiplied constant stays
5 0 Constant rule
5x 5 Constant multiple of x

Shifting a graph up or down by adding a constant does not change its slope anywhere, which is exactly why added constants disappear. Stretching a graph by a factor multiplies every slope by that factor, which is why multiplied constants stay.

The constant rule in reverse

Because every constant has derivative 0, many functions share the same derivative: x^2, x^2 + 1 and x^2 - 8 all differentiate to 2x. So when you integrate, you must add an arbitrary constant:

\int 2x\,dx = x^2 + C

See antiderivatives for more on why +\,C is required.

Common mistakes

  1. Treating constant expressions as variables. \frac{d}{dx}\,e^2 = 0, not 2e or e^2. The exponent is a number, not x.
  2. Zeroing out a constant multiple. \frac{d}{dx}\,4x = 4, not 0. Only a constant on its own, or added, becomes 0.
  3. Confusing which variable is changing. \frac{d}{dx}\,t^2 = 0 when t is a constant, but \frac{d}{dt}\,t^2 = 2t. Always check the variable in the denominator of \frac{d}{d\square}.

The constant rule is usually combined with the power rule and the sum rule. See the full guide to the power rule for practice with all three together.

Practice it now

Sums and constants

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the derivative of a constant?

Zero. A constant function has a horizontal graph, and a horizontal line has slope 0 at every point.

What is the derivative of pi?

\pi is a number, about 3.14159, so \frac{d}{dx}\,\pi = 0. The same goes for \pi^2, e, e^5 and \sqrt{2}.

Why is the derivative of 5x not 0?

5x is a constant times x, not a constant. By the constant multiple rule its derivative is 5 \cdot 1 = 5.

Why do antiderivatives have a + C?

Because the derivative of every constant is 0, functions such as x^2, x^2 + 3 and x^2 - 10 all have derivative 2x. The +\,C stands for that whole family.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.