The Derivative Calculator with Steps, Explained

After reading this you will know how to read a step-by-step derivative, which rule fires at each stage, and how to spot the few places where a correct answer still looks wrong.

What this tool does

A derivative measures how fast a function changes. Give the tool a function like x^2 sin(x) and it returns the derivative with every rule named along the way, the same way a teacher writes it on a board. For that input the answer is 2x\sin x + x^2\cos x, and the steps show the product rule splitting the work into two pieces before adding them.

The derivative at a point a is the slope of the tangent line there. If f(x) = x^2, then f'(x) = 2x, so at x = 3 the slope is 6. That single number tells you the function is rising, and rising at a rate of 6 units up per 1 unit right.

When to use it, and when not

Reach for this tool when you want to see the rules applied, not just the final expression. It is built for single-variable differentiation: powers, roots, exponentials, logarithms, the six trigonometric functions, arcsin, arccos and arctan, the hyperbolic functions sinh, cosh and tanh, absolute values, and awkward cases like x^x that need logarithmic differentiation.

It is the wrong tool for a few neighboring jobs. For antiderivatives and definite integrals, use the Derivative & Integral Calculator or the Numerical Integrator. For partial derivatives, the gradient or the Hessian of a function of several variables, use the Gradient & Hessian Calculator. If you only want zeros, extrema and inflection points sketched on a graph, the Function Analyzer & Grapher does that directly.

The rules, with intuition

Four rules cover almost everything. The power rule handles a variable raised to a constant:

(x^n)' = n\,x^{n-1}

Here n is any constant exponent. Each power drops by one and the old exponent comes out front as a factor. So (x^5)' = 5x^4 and, with a fractional exponent, (\sqrt{x})' = (x^{1/2})' = \tfrac{1}{2}x^{-1/2}.

The product rule differentiates a product of two functions u and v:

(uv)' = u'v + uv'

You differentiate one factor at a time and add the results. The quotient rule does the same for a ratio:

\left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2}

Note the minus sign and the order: it is u'v first, then subtract uv'. Swapping them is the most common sign error in the whole subject.

The chain rule handles a function inside a function:

\big(f(g(x))\big)' = f'(g(x))\cdot g'(x)

Differentiate the outer function, keep the inner one untouched, then multiply by the derivative of the inner function. For \sin(x^2) the outer derivative is \cos(x^2) and the inner derivative is 2x, giving 2x\cos(x^2).

A worked example: x² sin(x)

Differentiating f(x) = x² sin(x)

This is a product, so name the two factors and the product rule does the rest.

  1. Set u = x^2 and v = \sin x.
  2. Differentiate each: u' = 2x by the power rule, and v' = \cos x.
  3. Apply (uv)' = u'v + uv': that is 2x\cdot\sin x + x^2\cdot\cos x.
  4. The result is f'(x) = 2x\sin x + x^2\cos x. No further simplification helps here.

Check one value. At x = 0: f'(0) = 0 + 0 = 0, which fits, since x^2 flattens the curve at the origin. At x = \pi: f'(\pi) = 2\pi\sin\pi + \pi^2\cos\pi = 0 + \pi^2(-1) \approx -9.87.

The swings grow with x². The slope is zero at the turning points near x = ±2.29 and x = ±5.09, where 2 sin x + x cos x = 0, and at x = 0, where the curve flattens without turning.

Reading and interpreting the result

The tool shows the final derivative and, if you ask for a point, the slope and the tangent line there. The tangent line at x = a is

y = f(a) + f'(a)\,(x - a)

where f(a) is the height and f'(a) is the slope. For f(x) = x^2\sin x at a = 1: f(1) = \sin 1 \approx 0.841 and f'(1) = 2\sin 1 + \cos 1 \approx 2.223, so the tangent line is y \approx 0.841 + 2.223(x - 1).

Higher derivatives describe curvature and beyond. The second derivative f'' tells you whether the graph bends up or down. For f(x) = x^3, f''(x) = 6x, so the curve bends down for x \lt 0 and up for x \gt 0, with the switch (an inflection point) at the origin.

The log(x) setting matters. In many schools log means base 10, so (\log_{10} x)' = \tfrac{1}{x\ln 10} \approx \tfrac{0.4343}{x}. In higher math log often means natural log, where (\ln x)' = \tfrac{1}{x}. Set the convention to match your course before you trust the constant.

Explore: how the slope follows the curve

For f(x) = x^2\sin x, the slope f'(x) = 2x\sin x + x^2\cos x equals 0 near the turning points, is positive where the curve rises, and is negative where it falls. At x = 1 the slope is about 2.223; at x = \pi it is about -9.87.

Common mistakes

A few errors show up again and again. Knowing them speeds up your checking.

Forgetting the chain rule
The derivative of \sin(3x) is 3\cos(3x), not \cos(3x). The inner factor 3 must appear. For e^{5x} you get 5e^{5x}.
Treating a variable exponent as a power
(x^x)' is not x\cdot x^{x-1}. Both base and exponent vary, so you need logarithmic differentiation: the answer is x^x(\ln x + 1).
Quotient rule sign and order
The numerator is u'v - uv'. Writing uv' - u'v flips the sign of the whole result.
Degrees instead of radians
The rule (\sin x)' = \cos x holds only in radians. In degrees an extra factor of \pi/180 \approx 0.01745 appears, so slopes computed in degrees are off by that factor.

A simplified answer can look different from your textbook and still be correct. For example \tfrac{1}{2}(1 - \cos 2x) and \sin^2 x are equal. Expand or factor both forms, or test a value such as x = 1, before deciding an answer is wrong.

Related tools

Once you have a derivative, the natural next steps live in neighboring calculators. To build a polynomial approximation of a function around a point, use the Taylor & Maclaurin Series, which needs exactly the higher derivatives this tool produces. To evaluate a limit, including the 0/0 forms that L'Hopital's rule turns into derivatives, use the Limit Calculator. To solve an equation that involves a derivative, try the Differential Equation Solver. For area estimates that mirror the definition of the integral, use the Riemann Sum Calculator, and to draw a smooth curve through measured data points, the Interpolation Calculator.

Frequently asked questions

How do I find a second or third derivative?

Set the order to 2, 3 or 4. The tool differentiates the result again at each stage. For f(x) = x^4: f' = 4x^3, f'' = 12x^2, f''' = 24x, and f^{(4)} = 24.

What does the slope at a point mean?

It is the rate of change of the function there, equal to the slope of the tangent line. A slope of 2.223 at x = 1 means the output rises about 2.223 units for each unit increase in x near that point.

Can it differentiate with respect to a variable other than x?

Yes. Set the variable in the field, for example t, and every other letter is treated as a constant. So \tfrac{d}{dt}(a t^2) = 2at, with a held fixed.

Why does my answer look different from the tool's?

Correct derivatives can be written many ways. Expand products, factor common terms, or plug in a test value like x = 2 into both expressions. If the numbers match at several points, the two forms are equal.

What is logarithmic differentiation?

For a function with a variable in both base and exponent, take the natural log of both sides first. For y = x^x: \ln y = x\ln x, differentiate to get \tfrac{y'}{y} = \ln x + 1, then multiply by y to reach y' = x^x(\ln x + 1).