Derivative Calculator
- Free
- No sign-up
- Works on phones
- Shows the working
This derivative calculator differentiates any function of \( x \) and shows the work with steps: every rule it applies (power, product, quotient, chain, and the standard derivatives of trig, exponential and log functions) appears as its own line, so you can follow the solution or check your homework against it. It is free, runs in your browser and needs no sign-up.
Use it to check an answer, to see which rule applies where, or to get second and third derivatives without redoing the algebra by hand.
How to use the derivative calculator
- Type your function in the box. Use
^for powers (x^3),sqrt(x)for square roots,sin(x),cos(x),tan(x),ln(x)for the natural log,e^(2x)for exponentials andpifor \( \pi \). - Implicit multiplication works, so
3x,x sin(x)andx^2 cos(3x)are all fine. Use parentheses around anything longer than a single term, such as(x^2 + 1)/(x - 3). - Pick the order: first, second or third derivative.
- Press solve. The simplified result appears at the top, followed by the step-by-step solution. You can copy the result or send the function to the Visual Lab to see its graph.
How it works
The solver works on the structure of your expression, from the inside out, using the standard rules:
$$\frac{d}{dx}x^n = nx^{n-1}, \qquad (uv)' = u'v + uv'$$
$$\left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2}, \qquad \frac{d}{dx}f(g(x)) = f'(g(x))\,g'(x)$$
Each time one of these fires on a piece of your function, the calculator records the rule name and the result for that piece. After the last step it simplifies the answer (collecting like terms and expanding polynomial numerators). For a higher order, it differentiates the simplified result again and shows each extra round as a separate line.
Worked example
Example 1. Differentiate \( f(x) = x^2\cos(3x) \). This is a product, and the second factor needs the chain rule.
- Power rule: \( \frac{d}{dx}x^2 = 2x \).
- Chain rule (cosine): \( \frac{d}{dx}\cos(3x) = -3\sin(3x) \), because the inner function \( 3x \) has derivative 3.
- Product rule: combine the two.
$$f'(x) = 2x\cos(3x) - 3x^2\sin(3x)$$
Type x^2 cos(3x) into the calculator above and you will see exactly these three lines. Switch the order to “Second derivative” and it differentiates once more:
$$f''(x) = 2\cos(3x) - 12x\sin(3x) - 9x^2\cos(3x)$$
Example 2. Differentiate \( g(x) = \frac{x}{x^2 + 4} \). With \( u = x \) and \( v = x^2 + 4 \), we have \( u' = 1 \) and \( v' = 2x \), so the quotient rule gives
$$g'(x) = \frac{(x^2 + 4) - 2x^2}{(x^2 + 4)^2} = \frac{4 - x^2}{(x^2 + 4)^2}$$
The numerator is zero at \( x = 2 \), so the graph has a horizontal tangent there, at the point \( (2, \tfrac14) \). The critical points calculator finds and classifies points like this automatically.
Tips for getting the answer you expect
- Your answer may look different and still be right. \( \frac{4 - x^2}{(x^2+4)^2} \) and \( \frac{-x^2 + 4}{(x^2+4)^2} \) are the same thing. If you are unsure, plug in a number for \( x \) in both forms.
- Group exponents.
e^(5x)means \( e^{5x} \) (derivative \( 5e^{5x} \));e^5xis read as \( e^5 \cdot x \), a constant times \( x \). - Rewrite roots and reciprocals if you like (
sqrt(x)andx^(1/2)both work), but you don’t have to: the solver handlessqrtdirectly and gives \( \frac{1}{2\sqrt{x}} \). - Powers of trig functions can be typed as
sin(x)^2orsin^2(x); both mean \( \sin^2 x \).
If a step surprises you, the rule guides explain it in detail: the chain rule is behind most mistakes, followed by the product rule.
Related guides
Further reading
- Differentiation Formulas (Paul’s Online Math Notes) — the power, sum and constant multiple rules with many worked examples.
- Chain Rule (Paul’s Online Math Notes) — how to spot the inside and outside functions, from simple to heavily nested cases.
FAQ
Can the derivative calculator show steps?
Yes. Every rule it uses is listed in order, with the piece of the function it was applied to and the result, followed by the simplified final answer.
Can it find the second or third derivative?
Yes. Choose “Second derivative” or “Third derivative” in the order menu. The extra rounds of differentiation are added as steps after the first derivative. To evaluate \( f' \) and \( f'' \) at a point, try the second derivative calculator.
Why does the calculator’s answer look different from my textbook’s?
Derivatives can be written in many equivalent forms, for example with terms in a different order or a factored versus expanded numerator. Check equivalence by evaluating both forms at a couple of values of \( x \).
Is the derivative calculator free?
Yes, it is completely free with no sign-up and no limit on how many functions you differentiate.
