Derivative Calculator

Derivative Calculator is loading…

This free derivative calculator finds the derivative of any function and shows each step. It names the rule it uses, such as the power rule, product rule, quotient rule, or chain rule. You can also find second, third, or higher derivatives, and get the slope at a point.

How to Use the Derivative Calculator

  1. Type your function, for example x^2 sin(x).
  2. Choose the variable and the order (1 for the first derivative, 2 for the second, and so on).
  3. Optional: type a number in Evaluate at x = to get the slope at that point.
  4. Press Solve. Open the steps to see every rule, and the graph to compare \(f\) with \(f’\).

What Is a Derivative?

A derivative tells you how fast a function is changing. On a graph, it is the slope of the tangent line at each point. If \(f(x)\) is the position of a car, then \(f'(x)\) is its speed.

The formal definition uses a limit:

\[f'(x) = \lim_{h\to 0} \frac{f(x+h) – f(x)}{h}.\]

In practice, we use rules instead of this limit. The rules are faster and give the same answer. Derivatives and antiderivatives undo each other. See antiderivative vs derivative for a side-by-side look.

Derivative Rules

Rule Formula Example
Constant \(\frac{d}{dx}c = 0\) \(\frac{d}{dx}7 = 0\)
Power \(\frac{d}{dx}x^n = nx^{n-1}\) \(\frac{d}{dx}x^5 = 5x^4\)
Constant multiple \((cf)’ = cf’\) \(\frac{d}{dx}4x^3 = 12x^2\)
Sum \((f+g)’ = f’ + g’\) \(\frac{d}{dx}(x^2 + x) = 2x + 1\)
Product \((fg)’ = f’g + fg’\) \(\frac{d}{dx}x\sin x = \sin x + x\cos x\)
Quotient \(\left(\frac fg\right)’ = \frac{f’g – fg’}{g^2}\) \(\frac{d}{dx}\frac{x}{x+1} = \frac{1}{(x+1)^2}\)
Chain \(\frac{d}{dx}f(g(x)) = f'(g(x))\,g'(x)\) \(\frac{d}{dx}\sin(3x) = 3\cos(3x)\)

Derivatives of Common Functions

Function Derivative Function Derivative
\(\sin x\) \(\cos x\) \(e^x\) \(e^x\)
\(\cos x\) \(-\sin x\) \(a^x\) \(a^x \ln a\)
\(\tan x\) \(\sec^2 x\) \(\ln x\) \(\frac{1}{x}\)
\(\sec x\) \(\sec x\tan x\) \(\sqrt{x}\) \(\frac{1}{2\sqrt{x}}\)
\(\tan^{-1} x\) \(\frac{1}{1+x^2}\) \(\sin^{-1} x\) \(\frac{1}{\sqrt{1-x^2}}\)

Worked Examples

Example 1: Product rule, \(\frac{d}{dx}\left[x^2\sin x\right]\)

Let \(f = x^2\) and \(g = \sin x\). Then \(f’ = 2x\) and \(g’ = \cos x\).

\((fg)’ = 2x\sin x + x^2\cos x\).

Example 2: Chain rule, \(\frac{d}{dx}\,e^{3x^2}\)

The outside is \(e^u\) and the inside is \(u = 3x^2\). The derivative of the outside is \(e^u\). The derivative of the inside is \(6x\).

Answer: \(6x\,e^{3x^2}\).

Example 3: Quotient rule, \(\frac{d}{dx}\frac{\sin x}{x}\)

\(\frac{(\cos x)(x) – (\sin x)(1)}{x^2} = \frac{x\cos x – \sin x}{x^2}\).

Example 4: Logarithmic differentiation, \(\frac{d}{dx}\,x^x\)

Here both the base and the exponent change, so no basic rule fits. Take the log: \(\ln y = x\ln x\). Differentiate both sides: \(\frac{y’}{y} = \ln x + 1\). So \(y’ = x^x(\ln x + 1)\).

Common Mistakes

  • Forgetting the chain rule. \(\frac{d}{dx}\sin(2x)\) is \(2\cos(2x)\), not \(\cos(2x)\).
  • Multiplying derivatives in a product. \((fg)’ \ne f’g’\). Use \(f’g + fg’\).
  • Mixing up the quotient rule order. It is “low d-high minus high d-low, over low squared.”
  • Treating \(e^x\) like \(x^n\). \(\frac{d}{dx}e^x = e^x\), not \(xe^{x-1}\).

Learn the Math Behind the Derivative Calculator

A derivative measures how fast a function changes. Every antiderivative can be checked by taking a derivative.

Frequently Asked Questions

Can this calculator find higher derivatives?

Yes. Pick an order from 1 to 5. For second derivatives with notes on concavity, try the second derivative calculator.

What about functions with x and y?

Use the partial derivative calculator. It treats the other letters as constants.

How do I find the slope at a point?

Type the x-value in Evaluate at x =. The calculator plugs it into \(f'(x)\) for you.

Why does my answer look different from the calculator’s?

Many derivatives can be written in more than one way. For example, \(\frac{1}{x^2+1}\) and \((1+x^2)^{-1}\) are the same. Try both at a value of x to compare.

Related Guides

More free calculus calculators