# 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.

Source: https://practicecalculus.com/derivatives/constant
Updated: 2026-11-06

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

## At a glance

- **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$

## Key takeaways

- The derivative of any constant is $0$, because a horizontal line has no slope.
- Numbers like $\pi^2$, $e^3$, $\ln 5$ and $\sin 1$ are constants, so their derivatives are $0$.
- An added constant disappears when you differentiate, but a multiplied constant stays.
- This is why every antiderivative has a $+C$: the constant could be anything.

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
title: 'Graph of y = 3 and its derivative y = 0'
caption: 'A constant function is a horizontal line. Its slope is $0$ everywhere, so the derivative lies along the $x$-axis.'
x: [-4, 4]
y: [-1, 4]
functions:
  - expr: 3
    label: y = 3
  - expr: 0
    label: y = 0 (derivative)
    dashed: true
points:
  - [1, 3, 'slope 0']
```

## 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](/rules/constant-rule).

You can also see it with the [power rule](/rules/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](/rules/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](/derivatives/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](/derivatives/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](/blog/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](/integrals/constant).

## 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$.
