Uni-Sine
MathematicsCalculus

Derivative calculator with steps

This derivative calculator differentiates a function and names each rule as it uses it: power, product, quotient, chain, trig, exponential, log and inverse trig. Type f(x) to get f'(x) with full working. It also plots the function with its derivative and a tangent you can drag, so you can read the slope at any point.

It opens on x² sin x, a product, so the first thing you see is the product rule at work. Every example on this page can be typed straight in to check your own working.

Try it

Derivative Calculator

Differentiate any function and see each rule applied

Go to its page

How to use the derivative calculator

  1. Type the function in the f(x) box. Typing pi or sqrt makes the symbol, and / builds a fraction.
  2. Set Order of derivative to 1 for f'(x), 2 for f''(x), and so on up to 6.
  3. In the Tangent section, type the x value you care about in Tangent at x, or drag the point along the curve.
  4. Read the answer and the working. Each step says which rule it is using, and the list of rules used sits beside the answer.
  5. Check the readouts: the value of f, the value of f' (the slope) at your point, and the equation of the tangent there.

The graph shows f, its derivative and the tangent together. Any letter other than x is treated as a constant, and a note says so. To practise, open Practice and help for random functions where you find f'(a) to 3 decimal places, with a hint naming the rule and the full working.

To getType
x³x^3
√xsqrt x
(2x + 1)/(x − 3) as a fraction(2x+1)/(x-3)
eˣ², with x² in the powere^x^2
sin 5xsin(5x)
ln xln(x)
tan⁻¹ xarctan(x)

The derivative rules the calculator uses

These are the rules it names in its working. Each example in the last two columns is what you type and what it gives back.

RuleIn symbolsType thisCalculator gives
Power ruled/dx xⁿ = nxⁿ⁻¹4x^3-5x^2+7x-212x² − 10x + 7
Product rule(uv)' = u'v + uv'x^2e^xxeˣ(x + 2)
Quotient rule(u/v)' = (u'v − uv')/v²(2x+1)/(x-3)−7/(x − 3)²
Chain ruledy/dx = dy/du × du/dx(3x^2+1)^424x(3x² + 1)³
Trig ruled/dx sin x = cos xsin(5x)5cos(5x)
Exponential ruled/dx aˣ = aˣ ln a2^x2ˣ ln 2
Logarithm ruled/dx ln x = 1/xln(x)1/x
Inverse trig ruled/dx tan⁻¹ x = 1/(x² + 1)arctan(x)1/(x² + 1)

Common derivatives to know

These standard results come up so often that it pays to learn them. Type any of these functions into the calculator to see it confirm the result.

f(x)f'(x)f(x)f'(x)
A constant, such as 70sin xcos x
xⁿnxⁿ⁻¹cos x−sin x
√x1/(2√x)tan xsec² x
1/x−1/x²sec xsec x tan x
eˣeˣsin⁻¹ x1/√(1 − x²)
e^(kx)ke^(kx)tan⁻¹ x1/(x² + 1)
ln x1/xlog₁₀ x1/(x ln 10)

Example 1: the power rule

Differentiate f(x) = 4x³ − 5x² + 7x − 2. Bring each power down and reduce it by one. The constant −2 has derivative 0.

f'(x) = 12x^2 - 10x + 7

At x = 1 the slope is 12 − 10 + 7 = 9. Type the function with Tangent at x set to 1 and the calculator shows f'(1) = 9 and the tangent y = 9x − 5. Now try one in the course, then press Mark to check it.

Differentiate a random polynomial and type the derivative.

Press Mark to have your answer marked in the Calculus course.

Example 2: the chain rule

Differentiate (3x² + 1)⁴. There is a function inside a function, so use the chain rule with u = 3x² + 1. Differentiate the outside, 4u³, then multiply by the derivative of the inside, 6x:

\frac{d}{dx}\left(3x^2 + 1\right)^4 = 4\left(3x^2 + 1\right)^3 \times 6x = 24x\left(3x^2 + 1\right)^3

The calculator's steps follow the same path: let u be the inside, differentiate the outside, differentiate the inside, multiply and put the inside back.

Example 3: the quotient rule

Differentiate (2x + 1)/(x − 3). Take u = 2x + 1 on top and v = x − 3 underneath, so u' = 2 and v' = 1:

f'(x) = \frac{2(x - 3) - (2x + 1)(1)}{(x - 3)^2} = \frac{2x - 6 - 2x - 1}{(x - 3)^2} = -\frac{7}{(x - 3)^2}

The answer is always negative, so this curve slopes downwards everywhere it is defined. At x = 4 the slope is −7, which the calculator gives as f'(4) = −7.

Example 4: the product rule

Differentiate x² sin x, the function the calculator opens on. Our product rule guide has more examples. Take u = x² and v = sin x, so u' = 2x and v' = cos x:

f'(x) = 2x\sin x + x^2\cos x

The calculator writes the same answer as x² cos x + 2x sin x. The order of the terms does not matter.

Second derivative calculator and higher derivatives

Move the Order of derivative slider to 2 and the calculator differentiates twice, showing both rounds of working. It goes up to the sixth derivative. The second derivative f''(x) tells you how the slope is changing, which is how you sort turning points into maximums and minimums.

Example 5: classifying turning points

Take f(x) = x⁴ − 3x². The first derivative is f'(x) = 4x³ − 6x, which is zero when x = 0 or x = ±√1.5, about ±1.2247. The second derivative is:

f''(x) = 12x^2 - 6

At x = 0, f''(0) = −6, which is negative, so the curve bends downwards there: a local maximum. At x = ±1.2247, f''(x) = 12 × 1.5 − 6 = 12, which is positive: two local minimums, each at y = −2.25.

y = { x}^{4}-3{ x}^{2}
-2-1.5-1-0.50.511.52-4-2246810minimummaximumminimum
Drag to pan, scroll to zoom. x from -2.2 to 2.2, y from -4.48 to 11.1.

Here x is the input and y is f(x). Set the order to 2 in the calculator and type the turning points into Tangent at x to see the second derivative at each one.

Slope and tangent line at a point

The derivative at a point is the slope of the tangent there. The calculator gives that slope as f'(a) and writes the tangent as y = mx + c.

Example 6: a tangent line

Find the tangent to f(x) = x³ − 2x at x = 2. First f(2) = 8 − 4 = 4, so the point is (2, 4). Then f'(x) = 3x² − 2, so the slope is f'(2) = 12 − 2 = 10.

y - 4 = 10(x - 2) \Rightarrow y = 10x - 16

The calculator gives f(2) = 4, f'(2) = 10 and the tangent y = 10x − 16. For the slope of a straight line between two points, use the slope calculator instead.

Partial derivative calculator: other letters as constants

A partial derivative differentiates with respect to one variable and holds the others fixed. This calculator always differentiates with respect to x when x is in the function, and treats every other letter as a constant. So it gives the partial derivative with respect to x: type x^2y and it returns 2xy, with a note that y was treated as a constant.

For the partial derivative with respect to y, swap x and y before you type. x²y becomes y²x, the calculator differentiates in x and gives y², and swapping back gives ∂/∂y (x²y) = x². It does not do directional derivatives, or implicit differentiation, where y is a function of x.

Example 7: a partial derivative

Find ∂f/∂x for f(x, y) = x²y. Hold y fixed, so it behaves like a number such as 5 in 5x². The power rule then gives:

\frac{\partial}{\partial x}\left(x^2y\right) = 2xy

Type x^2y and the calculator returns 2xy, with the note that y is treated as a constant. Its graph uses y = 1, so the curve it draws is y = x².

Common mistakes

  • Forgetting the inside derivative in the chain rule. The derivative of sin(5x) is 5cos(5x), not cos(5x).
  • Multiplying derivatives for a product. The derivative of x² sin x is not 2x cos x. Use u'v + uv'.
  • Getting the quotient rule backwards. It is u'v − uv' on top, with the minus in that order, over v².
  • Keeping a constant. A constant term has derivative 0, but a constant multiplying x stays: the derivative of 7x is 7.
  • Rewriting roots and fractions wrongly. √x is x to the power 1/2 and 1/x is x to the power −1. Rewrite them before using the power rule.
  • Working in degrees. The rule that sin x differentiates to cos x only holds in radians.

Practise differentiation in a short timed paper

Differentiation runs through AP Calculus AB and AP Calculus BC practice, and through A-level Maths: Calculus in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. The Calculus course builds the rules up from the gradient of a curve, and the integral calculator runs the process in reverse.

Common questions

What is the derivative of ln x?
1/x, for x greater than 0. With the chain rule, the derivative of ln(u) is u'/u, so ln(x² + 1) differentiates to 2x/(x² + 1).
What is the derivative of eˣ?
eˣ itself. It is the only function, apart from multiples of it, that is its own derivative. With a power inside, e^(kx) differentiates to ke^(kx).
What is the derivative of sin x and cos x?
The derivative of sin x is cos x, and the derivative of cos x is −sin x. Both need x in radians.
Can the calculator find the second derivative?
Yes. Set Order of derivative to 2 for f''(x), or anything up to 6 for higher derivatives. The working shows each round of differentiation.
Can it do partial derivatives?
It gives partial derivatives with respect to x, because it treats every letter other than x as a constant. For a partial derivative with respect to another letter, swap that letter with x before typing.
Does it do implicit differentiation?
No. It differentiates functions written as y = f(x). For an implicit equation, differentiate each term by hand, remembering the dy/dx on every y term.
What is the derivative of a constant?
0. A constant does not change, so its rate of change is zero. That is also why integrating needs a + C.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Derivative Calculator

    Differentiate any function and see each rule applied

    Open the tool
  • Learn it

    Calculus

    Differentiation, integration and the mathematics that drives physics and engineering

    Start the course
  • Test it

    AP Calculus AB

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · CalculusWhat is a derivative? Meaning, definition and examplesWhat a derivative is, in plain words and in symbols: the slope of a tangent, the limit definition, the power rule, worked examples and real uses.