Derivative Calculator — Differentiate Step by Step (Free)

CalculusFreeNo sign-up

To differentiate f(x) = x² sin x, use the product rule (uv)′ = u′v + uv′ with u = x² and v = sin x: f′(x) = 2x sin x + x² cos x. At x = π/2 the slope is f′(π/2) = π ≈ 3.14159. The derivative calculator below does this for any function and names the rule used at every step.

Derivative calculator with steps
Reads asReads asf(x) = x2 sin(x)
Type x^3 for x³, 2x for 2·x, sqrt(x), e^x, ln(x), log(x) (base 10), sin(x), arctan(x), |x|. Brackets are fine: sin(2x)/(x+1).
Try:
First derivative
f′(x) =x2 cos(x) + 2x sin(x)
f(π/2)π2/4 ≈ 2.4674
f′(π/2)π ≈ 3.14159
Tangent line at x = π/2y = πx − π2/4
−2246−20−1010(1.57, 2.47)
f(x) = x² sin(x)f′(x) (slope of f)tangent line at x = π/2
Show steps (5 rules)
  1. Product ruled/dx[x2 sin(x)] = u′v + uv′ with u = x2 and v = sin(x)
  2. Power ruled/dx[x2] = 2·x = 2x
  3. Trig rule: (sin u)′ = cos ud/dx[sin(x)] = cos(x)
  4. Combine the product rule(2x)(sin(x)) + (x2)(cos(x)) = x2 cos(x) + 2x sin(x)
  5. Resultf′(x) = x2 cos(x) + 2x sin(x)
  6. Evaluate at x = π/2f′(π/2) = π ≈ 3.14159. Tangent line (point-slope form y − f(a) = f′(a)(x − a)): y = πx − π²/4.

Next: find where f′(x) = 0 · see the limit definition · tangent line calculator

Derivative Calculator — Differentiate Step by Step (Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

Need an integral, a limit or an algebra step too? Try the free Math Solver, which covers algebra through calculus with every step shown and checked.

How to use the derivative calculator

  1. Type the function, for example 3x^3 – 2x^2 + 5x – 7, (x+1)/(x-2), sqrt(x^2+1) or e^(2x) cos(x). The “Reads as” line shows how your input was understood, so you can catch a missing bracket before you rely on the answer.
  2. Choose the order: first, second, third, up to the tenth derivative. Change the variable to t, y, z or u if your problem uses a different letter.
  3. Optionally enter a point such as 2 or pi/4. You get f(a), the slope f′(a) and the tangent line, exact when possible.
  4. Open Show steps. Each line names the rule (power, product, quotient, chain, exponential, logarithm or trig rule) and shows the result of that rule.
  5. To check homework, type your own answer in Check your answer. The tool compares it with the correct derivative at many points, so an equivalent form such as 2x sin x + x² cos x in a different order still counts as correct.

What a derivative tells you

The derivative f′(x) is the slope of the tangent line to y = f(x) at each x. It is also the instantaneous rate of change: how fast f changes when x changes by a tiny amount. Formally,

f′(x) = limh→0 [f(x + h) − f(x)] / h

For f(x) = x², the quotient is (2xh + h²)/h = 2x + h, which tends to 2x. So the slope of y = x² at x = 3 is 6. The difference quotient calculator shows that limit algebra step by step; the rules below are shortcuts that give the same answer.

Derivative rules the steps use

Rule Formula Example
Constant (c)′ = 0 (7)′ = 0
Power (xⁿ)′ = n xⁿ⁻¹ (x⁵)′ = 5x⁴
Constant multiple (c·f)′ = c·f′ (4x³)′ = 12x²
Sum and difference (f ± g)′ = f′ ± g′ (x² + 5x)′ = 2x + 5
Product (uv)′ = u′v + uv′ (x eˣ)′ = eˣ + x eˣ
Quotient (u/v)′ = (u′v − uv′)/v² (x/(x+1))′ = 1/(x+1)²
Chain f(g(x))′ = f′(g(x))·g′(x) (sin 3x)′ = 3 cos 3x
Exponential (eˣ)′ = eˣ, (aˣ)′ = aˣ ln a (2ˣ)′ = 2ˣ ln 2
Logarithm (ln x)′ = 1/x (ln(x² + 1))′ = 2x/(x² + 1)
Trig (sin x)′ = cos x, (cos x)′ = −sin x, (tan x)′ = sec² x (cos 2x)′ = −2 sin 2x
Inverse trig (arctan x)′ = 1/(1 + x²) (arctan 3x)′ = 3/(1 + 9x²)

The power rule works for any real exponent once you rewrite roots and fractions as powers: √x = x^(1/2), so (√x)′ = (1/2)x^(−1/2) = 1/(2√x), and 1/x² = x^(−2), so its derivative is −2x^(−3) = −2/x³.

Worked examples

Example 1: a polynomial with the power rule

f(x) = 3x³ − 2x² + 5x − 7. Differentiate term by term: (3x³)′ = 9x², (2x²)′ = 4x, (5x)′ = 5 and (7)′ = 0. So f′(x) = 9x² − 4x + 5, and at x = 2 the slope is 36 − 8 + 5 = 33.

Example 2: the quotient rule

f(x) = (x + 1)/(x − 2). With u = x + 1 and v = x − 2, u′ = v′ = 1, so f′(x) = [(1)(x − 2) − (x + 1)(1)]/(x − 2)² = −3/(x − 2)². The derivative is negative wherever it exists, so f decreases on each side of x = 2.

Example 3: the chain rule

f(x) = √(x² + 1) = (x² + 1)^(1/2). The outer function is u^(1/2) and the inner function is u = x² + 1. Then f′(x) = (1/2)(x² + 1)^(−1/2) · 2x = x/√(x² + 1). At x = 0 the slope is 0, which matches the lowest point of the graph.

Example 4: higher-order derivatives

For f(x) = 3x³ − 2x² + 5x − 7, the second derivative is f″(x) = (9x² − 4x + 5)′ = 18x − 4. It is positive when x > 2/9, so the graph is concave up there. The third derivative is 18 and every derivative after that is 0.

Common derivatives to know

f(x) f′(x) f(x) f′(x)
x 1 eˣ eˣ
x² 2x ln x 1/x
√x 1/(2√x) sin x cos x
1/x −1/x² cos x −sin x
|x| x/|x| (x ≠ 0) tan x sec² x
xˣ xˣ(ln x + 1) arcsin x 1/√(1 − x²)

Common mistakes with derivatives

Mistake Correct approach
Writing (uv)′ = u′v′ Use u′v + uv′: (x² sin x)′ is not 2x cos x.
Forgetting the inner derivative (sin 3x)′ = 3 cos 3x, not cos 3x. Multiply by the derivative of the inside.
Reversing the quotient rule numerator It is u′v − uv′; swapping the order flips the sign.
Leaving roots and fractions as they are Rewrite √x as x^(1/2) and 3/x² as 3x^(−2) before using the power rule.
Dropping brackets when typing Type sin(2x)/(x+1), not sin 2x/x+1. Check the “Reads as” line.
Rounding too early Keep exact values such as π or √2 until the last step.

Using a derivative calculator for homework

The tool helps most as a checker, not a replacement for practice. Work the problem by hand first, then compare. If your answer differs, open the steps and find the first rule where your work disagrees; that is usually a missed chain-rule factor or a sign in the quotient rule. Then redo a similar problem without help. On tests that allow a graphing calculator, the TI-84 command nDeriv( gives the slope at a single point (for example nDeriv(X³, X, 2) returns 12), but it does not give the formula, which is why the symbolic steps here are useful when you study.

Derivatives practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is the derivative of f(x) = 4x³ − 6x + 2?

Found a mistake? Let us know!

2. What is the derivative of x² cos x?

Found a mistake? Let us know!

3. What is the derivative of (3x + 1)⁴?

Found a mistake? Let us know!

4. What is the derivative of x/(x + 2)?

Found a mistake? Let us know!

5. What is the derivative of √x?

Found a mistake? Let us know!

6. What is the derivative of e^(5x)?

Found a mistake? Let us know!

7. What is the derivative of ln(x² + 1)?

Found a mistake? Let us know!

8. If f(x) = x³, what is f″(x)?

Found a mistake? Let us know!

9. What is the slope of the tangent line to y = x² − 3x at x = 4?

Found a mistake? Let us know!

10. What is the derivative of sin(x²)?

Found a mistake? Let us know!

Frequently asked questions

What is a derivative in Calc 1?

It is the slope of the tangent line, or the instantaneous rate of change, of a function at each point. For f(x) = x², f′(x) = 2x, so the slope at x = 3 is 6.

How do you find the second derivative?

Differentiate twice. For 3x³ − 2x² + 5x − 7, f′(x) = 9x² − 4x + 5 and f″(x) = 18x − 4. Choose "2nd" in the calculator to see both rounds of steps.

What is the derivative of x?

The derivative of x is 1, because y = x has slope 1 everywhere. Likewise (x²)′ = 2x, (5x)′ = 5 and the derivative of a constant such as 7 is 0.

How do derivative calculators work?

This one reads your input into an expression tree, applies the differentiation rules to each part symbolically, and then simplifies: it collects like terms, cancels common factors and combines fractions. Numeric tools such as nDeriv( instead estimate a slope with a symmetric difference, [f(x + h) − f(x − h)]/(2h), which gives a decimal at one point rather than a formula.

When do you use the chain rule?

Whenever one function sits inside another, such as sin(x²), e^(3x) or (x² + 1)⁵. Differentiate the outer function, keep the inside unchanged, then multiply by the derivative of the inside: (x² + 1)⁵ gives 5(x² + 1)⁴ · 2x = 10x(x² + 1)⁴.

Is derivative calculus hard?

The rules are short; most errors come from algebra. The power rule alone handles every polynomial, for example 4x³ becomes 12x². Products, quotients and compositions add one rule each, and the steps above show which one applies where.

Related calculators

More calculus calculators

Browse all 206 calculators

Related to This Article

What people say about "Derivative Calculator: Differentiate Step by Step, Free"?

No one replied yet.

Leave a Reply