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.
Derivative Calculator
Differentiate any function and see each rule applied
How to use the derivative calculator
- Type the function in the f(x) box. Typing pi or sqrt makes the symbol, and / builds a fraction.
- Set Order of derivative to 1 for f'(x), 2 for f''(x), and so on up to 6.
- In the Tangent section, type the x value you care about in Tangent at x, or drag the point along the curve.
- Read the answer and the working. Each step says which rule it is using, and the list of rules used sits beside the answer.
- 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 get | Type |
|---|---|
| x³ | x^3 |
| √x | sqrt x |
| (2x + 1)/(x − 3) as a fraction | (2x+1)/(x-3) |
| eˣ², with x² in the power | e^x^2 |
| sin 5x | sin(5x) |
| ln x | ln(x) |
| tan⁻¹ x | arctan(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.
| Rule | In symbols | Type this | Calculator gives |
|---|---|---|---|
| Power rule | d/dx xⁿ = nxⁿ⁻¹ | 4x^3-5x^2+7x-2 | 12x² − 10x + 7 |
| Product rule | (uv)' = u'v + uv' | x^2e^x | xeˣ(x + 2) |
| Quotient rule | (u/v)' = (u'v − uv')/v² | (2x+1)/(x-3) | −7/(x − 3)² |
| Chain rule | dy/dx = dy/du × du/dx | (3x^2+1)^4 | 24x(3x² + 1)³ |
| Trig rule | d/dx sin x = cos x | sin(5x) | 5cos(5x) |
| Exponential rule | d/dx aˣ = aˣ ln a | 2^x | 2ˣ ln 2 |
| Logarithm rule | d/dx ln x = 1/x | ln(x) | 1/x |
| Inverse trig rule | d/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 7 | 0 | sin x | cos x |
| xⁿ | nxⁿ⁻¹ | cos x | −sin x |
| √x | 1/(2√x) | tan x | sec² x |
| 1/x | −1/x² | sec x | sec x tan x |
| eˣ | eˣ | sin⁻¹ x | 1/√(1 − x²) |
| e^(kx) | ke^(kx) | tan⁻¹ x | 1/(x² + 1) |
| ln x | 1/x | log₁₀ x | 1/(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.
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:
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:
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:
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:
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.
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.
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:
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?
What is the derivative of eˣ?
What is the derivative of sin x and cos x?
Can the calculator find the second derivative?
Can it do partial derivatives?
Does it do implicit differentiation?
What is the derivative of a constant?
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