Algebra & Calculus

Derivative Calculator

Type a function of x and get its derivative with the rule used at each step: power, sum, product, quotient or chain. Add a point to see the slope there, or take a second derivative.

Use x, + − × ÷ ^, sin, cos, tan, ln, log, e^x, sqrt, abs. Example: (x^2+1)^3
Leave blank for the formula only
Try an example:
Answer f′(x) = 3x² + 2
Step-by-step working 5 steps
  1. 1
    The function
    f(x) = x³ + 2x
  2. 2
    Sum rule
    d/dx[x³ + 2x] = d/dx[x³] + d/dx[2x]

    The derivative of a sum is the sum of the derivatives.

  3. 3
    Constant multiple rule
    d/dx[2x] = 2 · d/dx[x] = 2
  4. 4
    Power rule
    d/dx[x³] = 3x²

    d/dx[xⁿ] = n·xⁿ⁻¹.

  5. 5
    Simplify
    f′(x) = 3x² + 2

How to use the derivative calculator

  1. Type the function using x, for example x^3 + 2x.
  2. Choose the first or second derivative.
  3. Optionally enter a value of x to get the slope at that point.
  4. Read each rule applied, then the simplified result.

Derivative rules

d/dx[xⁿ] = n·xⁿ⁻¹
d/dx[f + g] = f′ + g′
d/dx[f·g] = f′g + fg′
d/dx[f/g] = (f′g − fg′)/g²
d/dx[f(g(x))] = f′(g(x))·g′(x)
d/dx[sin x] = cos x,  d/dx[cos x] = −sin x
d/dx[eˣ] = eˣ,  d/dx[ln x] = 1/x

Every answer is also checked numerically against a difference quotient before release.

Worked examples

Each example below is generated by the same calculator you used above, so the working always matches the answer.

x³ + 2x
Answer f′(x) = 3x² + 2
Step-by-step working 5 steps
  1. 1
    The function
    f(x) = x³ + 2x
  2. 2
    Sum rule
    d/dx[x³ + 2x] = d/dx[x³] + d/dx[2x]

    The derivative of a sum is the sum of the derivatives.

  3. 3
    Constant multiple rule
    d/dx[2x] = 2 · d/dx[x] = 2
  4. 4
    Power rule
    d/dx[x³] = 3x²

    d/dx[xⁿ] = n·xⁿ⁻¹.

  5. 5
    Simplify
    f′(x) = 3x² + 2
x·sin(x)
Answer f′(x) = x·cos(x) + sin(x)
Step-by-step working 3 steps
  1. 1
    The function
    f(x) = x·sin(x)
  2. 2
    Product rule
    d/dx[x·sin(x)] = (1)·(sin(x)) + (x)·(cos(x))

    (uv)′ = u′v + uv′, extended to every factor.

  3. 3
    Simplify
    f′(x) = x·cos(x) + sin(x)
(x²+1)³
Answer f′(x) = 6x·(x² + 1)²
  • At x = 2: 300
Step-by-step working 6 steps
  1. 1
    The function
    f(x) = (x² + 1)³
  2. 2
    Power rule with the chain rule
    d/dx[(x² + 1)³] = 3·(x² + 1)^(2)·d/dx[x² + 1] = 6x·(x² + 1)²

    d/dx[uⁿ] = n·uⁿ⁻¹·u′.

  3. 3
    Sum rule
    d/dx[x² + 1] = d/dx[x²] + d/dx[1]

    The derivative of a sum is the sum of the derivatives.

  4. 4
    Power rule
    d/dx[x²] = 2x

    d/dx[xⁿ] = n·xⁿ⁻¹.

  5. 5
    Simplify
    f′(x) = 6x·(x² + 1)²
  6. 6
    Evaluate at x = 2
    f′(2) = 300

    This is the slope of the tangent line at that point.

x²/(x+1)
Answer f′(x) = −x²/(x + 1)² + 2x/(x + 1)
Step-by-step working 4 steps
  1. 1
    The function
    f(x) = x²/(x + 1)
  2. 2
    Quotient rule (product rule with the reciprocal)
    d/dx[x²/(x + 1)] = (2x)·(1/(x + 1)) + (x²)·(−1/(x + 1)²)

    Write u/v as u·v⁻¹ and apply the product rule.

  3. 3
    Power rule
    d/dx[x²] = 2x

    d/dx[xⁿ] = n·xⁿ⁻¹.

  4. 4
    Simplify
    f′(x) = −x²/(x + 1)² + 2x/(x + 1)
e^(2x)·ln(x)
Answer f′(x) = e^(2x)/x + 2ln(x)·e^(2x)
Step-by-step working 4 steps
  1. 1
    The function
    f(x) = ln(x)·e^(2x)
  2. 2
    Product rule
    d/dx[ln(x)·e^(2x)] = (1/x)·(e^(2x)) + (ln(x))·(2e^(2x))

    (uv)′ = u′v + uv′, extended to every factor.

  3. 3
    Derivative of natural log
    d/dx[ln(x)] = 1/x
  4. 4
    Simplify
    f′(x) = e^(2x)/x + 2ln(x)·e^(2x)
x⁴, second derivative
Answer f″(x) = 12x²
Step-by-step working 7 steps
  1. 1
    The function
    f(x) = x⁴
  2. 2
    Power rule
    d/dx[x⁴] = 4x³

    d/dx[xⁿ] = n·xⁿ⁻¹.

  3. 3
    Simplify
    f′(x) = 4x³
  4. 4
    Differentiate again

    Apply the same rules to f′(x) = 4x³.

  5. 5
    Constant multiple rule
    d/dx[4x³] = 4 · d/dx[x³] = 12x²
  6. 6
    Power rule
    d/dx[x³] = 3x²

    d/dx[xⁿ] = n·xⁿ⁻¹.

  7. 7
    Simplify the second derivative
    f″(x) = 12x²

Where you will use this

  • Finding the slope of a curve at a point in Calculus
  • Checking product, quotient and chain rule steps
  • Velocity and rate-of-change problems in physics

Common mistakes to avoid

Forgetting the chain rule

The derivative of sin(x²) is cos(x²)·2x, not just cos(x²). Differentiate the inside too.

Using the power rule on eˣ

eˣ is an exponential, not a power of x: its derivative is eˣ, not x·eˣ⁻¹.

Differentiating a product term by term

The derivative of f·g is f′g + fg′, not f′·g′.

Frequently asked questions

What is the derivative of x²?

2x, by the power rule: bring down the exponent 2 and subtract 1 from it.

What is the derivative of sin(x)?

cos(x). The derivative of cos(x) is −sin(x).

What is the derivative of ln(x)?

1/x, for x > 0.

Does it show the product and quotient rules?

Yes. When a function is a product or quotient, the step names the rule and shows each piece before simplifying.

Related calculators

Browse everything in Algebra & Calculus or the full calculator list.