Away from the corner, the absolute value is a straight line of slope \(\pm 1\).
\[\frac{d}{dx}\left|x\right| = \operatorname{sgn} x, \; x \neq 0\]
What it says
\(\left|x\right|\) is \(x\) for positive \(x\) and \(-x\) for negative \(x\), so its slope is \(+1\) on the right and \(-1\) on the left. That is exactly the sign function, \(\operatorname{sgn} x\).
At \(x = 0\) there is no derivative at all. Approaching from the right the difference quotient is \(+1\), from the left \(-1\); the one-sided limits disagree, so the two-sided limit does not exist. The graph has a corner, not a tangent.
For a compound argument the chain rule applies as usual: \(\frac{d}{dx}\left|u\right| = \operatorname{sgn}(u)\,u'\), valid wherever \(u \neq 0\).
When it applies
\(\left|x\right|\) or \(\texttt{abs(x)}\), alone or inside a larger expression.
Anywhere the argument is nonzero — the answer is undefined at the zeros of the argument.
Also covers \(\sqrt{x^{2}}\), which is \(\left|x\right|\) rather than \(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[\left|x\right|\right]\]
Split by sign: the graph is \(-x\) then \(x\).
\[\left|x\right| = \begin{cases} x & x > 0 \\ -x & x < 0\end{cases}\]
Each piece is a line, with slope \(+1\) or \(-1\).
The V and its step. f′ jumps from \(-1\) to \(+1\) at the origin with no value in between, and that gap is the whole point: a corner has no tangent. Hover just either side and the readout flips sign without passing through anything.
Undefined at \(x = 0\), where the two slopes meet at a corner.
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.