Derivative Calculator

The tool below finds the derivative of an expression and shows each step. Enter a function and the calculator will identify the appropriate rules — power rule, product rule, chain rule, and so on — and apply them one at a time.

Type naturally or click ⌨ in the box to use the math keyboard. Examples: x^2 for x², \sin(x) for sine, e^x for the exponential.

x^2+3x

LaTeX:

The derivative of a function measures its instantaneous rate of change. For \(f(x) = x^2\), the derivative is \(f'(x) = 2x\) — the slope of the tangent line at any value of \(x\). Different functions need different rules: power rule, product rule, quotient rule, and chain rule.

Worked Examples

Three examples worked by hand — the same logic the calculator uses, just spelled out so you can follow it on paper.

Example 1: Power rule — differentiate \(f(x) = x^3 + 4x\)

Apply the power rule \(\frac{d}{dx}(x^n) = nx^{n-1}\) to each term, and use the fact that the derivative of a sum is the sum of derivatives:

\[f'(x) = 3x^2 + 4\]

The \(4x\) becomes \(4 \cdot 1 \cdot x^0 = 4\). Constants out front stay; the exponent drops by one.

Example 2: Product rule — differentiate \(f(x) = x^2 \sin(x)\)

This is a product of two functions, \(u = x^2\) and \(v = \sin(x)\). The product rule says \((uv)' = u'v + uv'\):

\[u' = 2x, \quad v' = \cos(x)\] \[f'(x) = 2x \sin(x) + x^2 \cos(x)\]

Example 3: Chain rule — differentiate \(f(x) = \sin(x^2)\)

A function inside another function uses the chain rule: differentiate the outer function, leave the inner function alone, then multiply by the derivative of the inner function.

Outer is \(\sin(,\cdot,)\), inner is \(x^2\). So:

\[f'(x) = \cos(x^2) \cdot \frac{d}{dx}(x^2) = \cos(x^2) \cdot 2x = 2x \cos(x^2)\]

What is a Derivative?

The derivative of a function \(f(x)\) measures its instantaneous rate of change — how fast the output changes when you wiggle the input. Geometrically, the derivative at a point is the slope of the tangent line to the graph at that point.

Different functions need different rules to differentiate. A polynomial uses the power rule. A product of two functions uses the product rule. A function inside a function uses the chain rule. The calculator above identifies which rules apply and shows the work step by step.

Try These Examples

  • x^2 + 3x — power rule
  • \sin(x) — common trig derivative
  • e^{2x} — chain rule with exponential
  • x^3 \cdot \cos(x) — product rule
  • (x^2 + 1)/(x - 1) — quotient rule
  • \sqrt{x^2 + 1} — chain rule with a root

Common Derivative Rules

A quick reference for the rules this calculator uses:

Function Derivative
\(x^n\) \(nx^{n-1}\)
\(e^x\) \(e^x\)
\(a^x\) \(a^x \ln a\)
\(\ln(x)\) \(\dfrac{1}{x}\)
\(\sin(x)\) \(\cos(x)\)
\(\cos(x)\) \(-\sin(x)\)
\(\tan(x)\) \(\sec^2(x)\)
\(k\) (constant) \(0\)

And the three combining rules for any two functions \(u\) and \(v\):

  • Product rule: \((uv)' = u'v + uv'\)
  • Quotient rule: \(\left(\dfrac{u}{v}\right)' = \dfrac{u'v - uv'}{v^2}\)
  • Chain rule: \(\bigl(f(g(x))\bigr)' = f'(g(x)) \cdot g'(x)\)

Tips for Using the Calculator

  • For powers, use ^: x^3 means \(x^3\)
  • For fractions, use \frac{a}{b} or just a/b
  • For square roots, use \sqrt{x}
  • Trig functions: \sin(x), \cos(x), \tan(x)
  • The natural exponential is e^x; the natural log is \ln(x)
  • The virtual math keyboard gives one-click access to all common symbols

If you want to reverse the process — find an antiderivative or integral — try the Antiderivative Calculator or Integral Calculator.

Frequently Asked Questions

What does the derivative represent geometrically?

The derivative at a point \(x = a\) is the slope of the tangent line to the graph at that point. If the derivative is positive, the function is increasing there; if negative, decreasing; if zero, the graph has a horizontal tangent (often a local max, min, or inflection point).

Why is the derivative of a constant zero?

A constant function doesn't change as \(x\) changes — its graph is a horizontal line. The slope of a horizontal line is zero, so the rate of change is zero. Algebraically, \(\frac{d}{dx}(k) = 0\) for any constant \(k\).

When do I use the chain rule vs the product rule?

Use the product rule when two functions are multiplied: \(x^2 \cdot \sin(x)\) is a product. Use the chain rule when one function is inside another: \(\sin(x^2)\) is a composition — sine of \(x^2\). Look at whether the functions are side by side (product) or nested (chain).

What's a higher-order derivative?

A higher-order derivative is the derivative of a derivative. The second derivative \(f''(x)\) is the derivative of \(f'(x)\); the third \(f'''(x)\) is the derivative of \(f''(x)\); and so on. The second derivative measures the concavity of a function and is what you use to test whether a critical point is a local max or min.

What's the difference between a derivative and an integral?

Differentiation finds the rate of change of a function. Integration is the reverse: given a rate of change, integration finds the original function (an antiderivative). They're inverse operations, formalized by the Fundamental Theorem of Calculus.