A quantity that never changes has no rate of change.
\[\frac{d}{dx}c = 0\]
What it says
A derivative measures how fast something changes as \(x\) moves. A constant — \(5\), \(\pi\), \(\ln 7\) — has the same value at every \(x\), so it does not change at all, and its derivative is zero.
From the definition: if \(f(x) = c\) then the difference quotient is \(\frac{c - c}{h} = 0\) for every \(h \neq 0\), so the limit as \(h \to 0\) is \(0\). Geometrically, \(y = c\) is a horizontal line, and a horizontal line has slope zero everywhere.
The word "constant" always means constant with respect to the variable you are differentiating. In \(\frac{d}{dx}\left[ax\right]\) the symbol \(a\) is a constant; in \(\frac{d}{da}\left[ax\right]\) it is the variable and \(x\) is the constant.
When it applies
The expression contains no occurrence of the differentiation variable at all.
A numeric literal, a named constant such as \(\pi\) or \(e\), or any arithmetic combination of them.
A symbol other than the differentiation variable: \(a\), \(k\) and \(c\) are all constants with respect to \(x\).
Five worked examples
Every line is the step the calculator would show, in the order it applies them. Each graph
is live: hover it to read both curves and see the tangent whose slope is the derivative,
drag to pan, scroll to zoom.
1
Example 1
\[\frac{d}{dx}\left[5\right]\]
The expression contains no \(x\), so its value is the same for every \(x\).
\[\frac{d}{dx}\left[5\right] = 0\]
Answer
\[0\]
f is a horizontal line at 5 and f′ lies flat along the axis. Move anywhere along x and the height never changes, so there is no rate of change to report. Hover at any point and the f′ readout stays at 0.
The graph is the horizontal line \(y = 5\): slope zero everywhere.
Simplify first: any nonzero base raised to the power \(0\) is \(1\).
\[x^{0} = 1\]
Now the constant rule applies.
\[\frac{d}{dx}\left[1\right] = 0\]
Answer
\[0\]
The expression simplifies to 1 before it is drawn, so f is the line \(y = 1\) and f′ is zero.
A common slip is to apply the power rule and write \(0 \cdot x^{-1}\). The answer happens to agree away from \(x = 0\), but the honest route is to simplify to \(1\) first.
Derivative Calculator would like your consent to use your data
Store and read cookies and similar identifiers on your device
Measure how the site is used, and — only if you allow it — personalise advertising
Learn more
How can I change my choice?
Open Privacy settings at the bottom of any page. Your answer can be changed or withdrawn at any time, and takes effect straight away.
What if I do not consent?
Everything still works. The calculator, the graph and every rule page run entirely in your browser, so refusing costs you nothing but the optional cookies.
Do I have to consent to everything?
No. Manage options lets you allow one category and refuse another, and nothing optional is switched on until you switch it on.
Necessary cookies keep the site working and are always on. Anything else — measurement and advertising — runs only with your permission, and no profile is built about you before you give it. Read the privacy policy
Data preferences
Choose what you allow
Each category is described below. Your choice is stored on this device and applies the moment you save it.
Strictly necessary
Keeps the site working: your light or dark theme, your recent expressions and the record of this consent choice. Nothing here identifies you, and it cannot be switched off.
Preferences
Remembers optional settings across visits, such as your language and the way you like results laid out.
Measurement
Counts visits and which rules people look up, so we know what to improve. Aggregated — never used to build a profile about you.
Advertising
Lets advertising partners use cookies to select and measure ads, including personalised ones. Refuse this and any ads shown stay non-personalised.