practicecalculus
Powers, roots and polynomials

Derivative of a Constant: Formula, Proof and Examples

The derivative of a constant is 0. See why with the limit definition, plus tricky cases like π², e³, ln 5 and constants multiplied by functions.

Powers, roots and polynomials Updated 2 min read

At a glance

\frac{d}{dx}\,c = 0
Derivative
0 for every constant c
Graph
A horizontal line, which has slope 0
Added constant
\dfrac{d}{dx}\big(f(x) + c\big) = f'(x)
Constant multiple
\dfrac{d}{dx}\big(c\,f(x)\big) = c\,f'(x)
Integral version
\int c\,dx = cx + C
On this page
  1. Graph of a constant and its derivative
  2. Proof from the limit definition
  3. Spotting constants in disguise
  4. Added constants vs multiplied constants
  5. Worked examples
  6. Common mistakes

The derivative of a constant is 0. If f(x) = c for some fixed number c, then f'(x) = 0 for every x.

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

Graph of a constant and its derivative

Graph of y = 3 and its derivative y = 0
A constant function is a horizontal line. Its slope is 0 everywhere, so the derivative lies along the x-axis.

Proof from the limit definition

For f(x) = c, both f(x + h) and f(x) equal c:

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

The numerator is exactly 0 for every h \ne 0, so the limit is 0. This is the constant rule.

You can also see it with the power rule: c = c\,x^0, and \frac{d}{dx}\,x^0 = 0 \cdot x^{-1} = 0.

Spotting constants in disguise

The tricky part is not the rule, it is recognizing a constant. Anything without the variable is a constant, no matter how it looks.

Expression Constant? Derivative with respect to x
7 yes 0
\pi^2 yes 0
e^3 yes 0
\ln 5 yes 0
\sin\frac{\pi}{6} yes, it equals \frac{1}{2} 0
a^2 + b (letters other than x) yes, if they do not depend on x 0
e^x no e^x

Added constants vs multiplied constants

An added constant vanishes:

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

A multiplied constant stays, by the constant multiple rule:

\frac{d}{dx}\left(10x^2\right) = 10 \cdot 2x = 20x

The reason is geometric. Adding 10 shifts the graph up, which does not change any slope. Multiplying by 10 stretches the graph, which makes every slope 10 times steeper.

Worked examples

Example 1. \frac{d}{dx}\left(4x^3 - 2x + \pi\right) = 12x^2 - 2.

Example 2. \frac{d}{dx}\left(e^2 x\right) = e^2. Here e^2 multiplies x, so it stays, and the derivative of x is 1.

Example 3. \frac{d}{dx}\left(\ln 3 + \ln x\right) = \frac{1}{x}. The \ln 3 is a constant. See the derivative of ln x.

Example 4: other variables. In \frac{d}{dx}(x^2 y^3), if y does not depend on x, treat y^3 as a constant multiple: the answer is 2xy^3. This idea becomes partial derivatives in Calculus 3.

Common mistakes

  1. Differentiating e^2 as if it were e^x. \frac{d}{dx}e^2 = 0, not e^2 or 2e.
  2. Dropping a multiplied constant. \frac{d}{dx}(3x) = 3, not 0.
  3. Using the power rule on a constant base. \frac{d}{dx}\pi^3 is 0, not 3\pi^2.

Going the other way, every antiderivative carries a +C because constants differentiate to 0. See the integral of a constant.

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?

It is 0. A constant function f(x) = c never changes, so its rate of change is zero.

What is the derivative of e?

The number e \approx 2.718 is a constant, so its derivative is 0. Do not confuse it with e^x, whose derivative is e^x.

What is the derivative of pi?

It is 0. \pi is a fixed number, about 3.14159.

What is the derivative of 5x?

It is 5. The 5 is a constant multiple, not an added constant, so it stays: 5 \cdot \frac{d}{dx}x = 5.

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.