Derivative Calculator
Type a function and get its exact derivative with every rule named as it is applied: product, quotient, chain and power, worked in your browser.
Calculator
- f'(x) Worked out by applying the rules, so this is exact rather than estimated.
- 3x^2 - 3
- f'(x) at x = 1 The derivative expression above, evaluated at that x.
- 0
Which rule was applied, and to what
- Difference rule, differentiate each term
- x^3 - 3x gives 3x^2 - 3
- Power rule
- x^3 gives 3x^2
- Constant multiple rule
- 3x gives 3
- f'(x) = 3x^2 - 3
Read from the outside in, the way the rules are applied. Indentation shows which part of the expression each rule was working on.
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
Leibniz (1684), rules for differentiating products and quotients
What the rules actually are
The derivative of a function, written f′(x) or
dy/dx, is its rate of change with respect to x,
which is the slope of the tangent to its graph at each point.
Differentiation is not a search for a clever trick. It is a short list of
rules applied from the outside of an expression inwards, and the whole skill
is recognising which shape you are looking at before you start. There are
six that do almost all the work.
- Sum and difference. Differentiate each term on its own.
x³ − 3xbecomes3x² − 3because the two terms never interact. - Power rule.
xⁿbecomesn·x^(n−1). It holds for every constant exponent, negative and fractional included, so1/xwritten asx⁻¹gives−x⁻². - Constant multiple. A number in front comes along for the
ride.
3xgives3, and you do not need the product rule to see it. - Product rule. For two things that both vary,
u′v + uv′. Two terms, not one, which is the mistake this rule exists to prevent. - Quotient rule.
(u′v − uv′) / v². The order of the numerator matters and the minus sign is where most marks are lost. - Chain rule. A function of a function multiplies by the
derivative of the inside.
sin(x²)givescos(x²)·2x, and the2xis the part people forget.
Why the calculator names the rule
An answer on its own is only useful if you already trusted it. The reason this tool lists which rule it applied at each step is that the rule is the part you are being examined on, and the part you can check against your own working line by line. If your answer disagrees with the one here, the step list tells you where it diverged rather than only that it did.
The working reads from the outside in, which is the order the rules are
genuinely applied. For exp(−x²/2) the outermost shape is a
function of a function, so the chain rule goes first; only then does the
inside −x²/2 need the constant multiple rule and the power rule.
Indentation in the step list shows which part of the expression each rule was
looking at.
Worked example
Take x² · cos(3x). Two factors that both vary, so it is the
product rule:
- Differentiate
x²by the power rule:2x. -
Differentiate
cos(3x)by the chain rule: the outside gives−sin(3x), the inside gives3, so−3·sin(3x). -
Assemble
u′v + uv′:2x·cos(3x) − x²·3·sin(3x).
Notice the sign. Nothing was subtracted anywhere in the product rule; the minus arrived from the derivative of cosine and then travelled to the front of the second term. That is the kind of detail a bare answer hides.
Where a derivative does not exist
Some functions have no gradient at particular points, and this tool refuses
them rather than printing something plausible. abs(x) has a
corner at zero: approach from the left and the slope is −1, from the right
it is +1, so there is no single answer. The value usually quoted for it is
sign(x), which is fine away from zero and wrong at exactly the
point anybody studying corners is looking at.
The same applies to floor, ceil,
round and trunc, which are flat between jumps and
undefined at them, and to min and max, which bend
where their arguments cross. Refusing with a reason is more useful than an
answer that is correct almost everywhere.
Common mistakes
- Treating 2ˣ with the power rule. The power rule needs a
constant exponent. With the variable in the exponent the answer is
2ˣ·ln 2, notx·2^(x−1). - Forgetting the inside derivative. The chain rule is the
most commonly dropped factor on the list.
sin(3x)differentiates to3·cos(3x), notcos(3x). - Getting the quotient numerator backwards.
u′v − uv′, in that order. Swapping the terms flips the sign of the whole answer. - Reaching for the product rule on a constant multiple. It gives the right answer and signals that you have not spotted the simpler route, which costs time in an exam.
- Assuming log means natural log. Here
logis base ten andlnis natural, so their derivatives differ by a factor ofln 10.
Common questions
Is the answer exact or estimated?
Exact. The function is parsed into a tree and the differentiation rules are applied to it symbolically, the same way you would on paper, so the result is an expression rather than a number worked out from a small step. That is also why every rule can be named: the tool knows which one it used because it chose it.
Why does it refuse some functions?
Because each has points where it has no derivative. abs has a corner where its argument crosses zero, floor and round are flat between jumps, and min and max bend where their arguments cross. The usual answer given for abs is sign(x), which is wrong at exactly the point most people are looking at, so this says no and explains why instead of being confidently wrong there.
What is the difference between the product rule and the constant multiple rule?
The product rule, u′v + uv′, is for two things that both vary, and the constant multiple rule is what it collapses to when one factor is just a number. That factor’s derivative is zero, so the term carrying it vanishes and the whole thing is the number times the derivative of the rest. Both give the same answer for 3x, but reaching for the product rule there is a sign you have not noticed the shortcut.
Can it do second and third derivatives?
Yes, up to three. Each round differentiates the previous answer, so the working shows the first derivative, then the derivative of that, and so on. Three is where a school or first-year course stops caring, and past it the list of rules grows faster than anybody reads it.
Does it handle log and ln the same way?
No, and the distinction matters. Here log means base ten, matching every hand calculator and school textbook, while ln is the natural logarithm. So the derivative of ln x is 1/x, and the derivative of log x is 1/(x ln 10). Write logb(base, x) if you want an arbitrary base.