ΣCalcSolver
Calculus & graphs

Derivative Calculator

Type a function and get its exact derivative, with the differentiation rules written out. Works for polynomials, trig, exponential and log functions, products, quotients and chains. Choose a higher order for the second or third derivative, and add a point to get the slope of the curve there.

Loading the solver…

Quick start

  1. Enter f(x), for example x^3 * sin(x) or 4x^2 - 5x + 1. Use ^ for powers, ln(x) for the natural log, sqrt(x) for square roots and e^x or exp(x) for the exponential.
  2. Set the order: 1 for the first derivative f′, 2 for the second derivative f″, up to 8.
  3. To find the slope at a point, type a value in "Evaluate at".

The rules of differentiation

RuleFormulaUse it for
Power(xⁿ)′ = n·xⁿ⁻¹x², x³, √x, 1/x
Sum(f + g)′ = f′ + g′Polynomials, term by term
Product(uv)′ = u′v + uv′Two functions multiplied
Quotient(u/v)′ = (u′v − uv′) ÷ v²One function divided by another
Chainf(g(x))′ = f′(g(x)) · g′(x)A function inside a function

Derivatives of common functions

f(x)f′(x)f(x)f′(x)
c (constant)0sin xcos x
x1cos x−sin x
xⁿn·xⁿ⁻¹tan xsec² x
√x1 ÷ (2√x)eˣeˣ
1/x−1/x²ln x1/x

Worked examples

FunctionRuleDerivative
x³ − 4x² + 5Power, term by term3x² − 8x
x² · eˣProducteˣ(x² + 2x)
sin(3x²)Chain6x · cos(3x²)
e^(2x)Chain2e^(2x)
ln(x² + 1)Chain2x ÷ (x² + 1)
(x² + 1) ÷ (x − 1)Quotient(x² − 2x − 1) ÷ (x − 1)²

For the chain rule, differentiate the outside function and leave the inside alone, then multiply by the derivative of the inside. In sin(3x²), the outside gives cos(3x²) and the inside 3x² gives 6x.

Using derivatives: slopes, maxima and minima

The first derivative is the slope of the curve. For f(x) = x³ − 4x² + 5, f′(x) = 3x² − 8x, so at x = 1 the slope is 3 − 8 = −5: the curve is falling there.

Where f′(x) = 0 the curve is flat. Here 3x² − 8x = 0 at x = 0 and x = 8/3. The second derivative f″(x) = 6x − 8 tells you which is which: f″(0) = −8 is negative, so x = 0 is a local maximum; f″(8/3) = 8 is positive, so x = 8/3 is a local minimum.

Radians only

The formulas for sin, cos and tan only hold when angles are measured in radians, so this calculator always differentiates in radians, even if the main calculator is set to degrees.

Related calculators

Common questions

How do I find the derivative of a function?

Type the function in the box. The calculator applies the power, product, quotient and chain rules and shows the exact result.

Can it find the second derivative?

Yes. Set the order to 2 for f″(x), or any number up to 8 for higher derivatives.

How do I get the slope at a point?

Type the x-value in "Evaluate at". The result is the slope of the tangent line there.

What is the derivative of ln x?

1/x. For ln of a function, such as ln(x² + 1), the chain rule gives 2x ÷ (x² + 1).

How do I write the natural log and powers?

Use ln(x) for the natural log, log(x) for base 10, and ^ for powers, such as x^3.

Can I use t or another variable?

Yes. Type the letter in the Variable box and use it in the function.