Derivative Calculator

  • Free
  • No sign-up
  • Works on phones
  • Shows the working

Step-by-step solverExact symbolic engine

Interactive Calculus Problem Solver

Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.

Try:
Input syntax
  • Powers x^2, roots sqrt(x), cbrt(x), absolute value |x|
  • Implicit multiplication works: 3x sin(2x)
  • sin cos tan sec csc cot, asin acos atan, sinh cosh tanh
  • e^x or exp(x); ln(x) and log(x) are both the natural log
  • Constants pi and e; bounds accept inf and -inf
Enter a function and press Solve to see a full worked solution.

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

  1. 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 and pi for \( \pi \).
  2. Implicit multiplication works, so 3x, x sin(x) and x^2 cos(3x) are all fine. Use parentheses around anything longer than a single term, such as (x^2 + 1)/(x - 3).
  3. Pick the order: first, second or third derivative.
  4. 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^5x is read as \( e^5 \cdot x \), a constant times \( x \).
  • Rewrite roots and reciprocals if you like (sqrt(x) and x^(1/2) both work), but you don’t have to: the solver handles sqrt directly and gives \( \frac{1}{2\sqrt{x}} \).
  • Powers of trig functions can be typed as sin(x)^2 or sin^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

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.

Embed this calculator on your website

Teachers, tutors and bloggers are welcome to use this calculator for free. Copy the code below and paste it into any page (in WordPress, use a "Custom HTML" block). The small script makes the calculator grow to fit its answer; if your site removes scripts, it still works at a fixed height. Please keep the credit link.

More calculators

See all calculators