Skip to main content

Derivative Calculator

Try an example:

This derivative calculator finds the derivative of a function and names the rule used at each step. It also finds higher derivatives and draws a graph. It is free and belongs to our math solver.

How to Use the Derivative Calculator

Enter Your Function

Type just the function, such as x^2 sin(x). Use ^ for powers, sqrt( ) for roots, and ln or log for logs.

Find a Higher Derivative

Type second derivative of x^4 or third derivative of sin(x).

Read the Steps

The steps name each rule as it is used. The last step tidies up the answer, so it may look different from your book's and still be equal.

What Is a Derivative?

A derivative measures how fast a function is changing at one point. On a graph, it is the slope of the tangent line, the line that just touches the curve there. A positive derivative means the function is going up, a negative one means down, and zero means it is flat.

The limit definition makes this exact:

f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}

In words: take the slope between two nearby points, and let the gap hh shrink to zero.

Derivative calculator picture: the curve y equals x squared with its tangent line of slope 2 at x equals 1

Rules the Derivative Solver Uses

Power Rule

ddxxn=nxn−1\frac{d}{dx}x^n=nx^{n-1}

In words: bring the power down in front, then lower the power by 1.

Product Rule

(uv)′=u′v+uv′(uv)'=u'v+uv'

In words: first one's derivative times the second, plus the first times the second one's derivative.

Quotient Rule

(uv)′=u′v−uv′v2\left(\frac{u}{v}\right)'=\frac{u'v-uv'}{v^2}

In words: derivative of the top times the bottom, minus the top times derivative of the bottom, all over the bottom squared.

Chain Rule

ddxf(g(x))=f′(g(x))⋅g′(x)\frac{d}{dx}f(g(x))=f'(g(x))\cdot g'(x)

In words: differentiate the outside, keep the inside as it is, then multiply by the derivative of the inside.

FunctionDerivative
cc (a constant)00
sin⁡x\sin xcos⁡x\cos x
cos⁡x\cos x−sin⁡x-\sin x
tan⁡x\tan xsec⁡2x\sec^2 x
exe^xexe^x
axa^xaxln⁡aa^x\ln a
ln⁡x\ln x1x\dfrac{1}{x}

Which Rule Comes First?

Ask what the last operation would be if you put in a number. If it is adding, work term by term. If it is multiplying, use the product rule. If it is dividing, use the quotient rule. If it is a power or a function of something, use the chain rule.

For example, in (3x+1)5(3x+1)^5 the last thing you would do is raise to the 5th power, so the chain rule comes first.

Worked Examples

Example 1: A Polynomial

Differentiate x3−4x+1x^3-4x+1.

  1. Power rule on x3x^3: 3x23x^2.
  2. The derivative of −4x-4x is −4-4.
  3. The derivative of 1 is 0.

The answer is 3x2−43x^2-4.

Example 2: The Product Rule

Differentiate x2sin⁡xx^2\sin x.

  1. Let u=x2u=x^2 and v=sin⁡xv=\sin x. Then u′=2xu'=2x and v′=cos⁡xv'=\cos x.
  2. Product rule: 2xsin⁡x+x2cos⁡x2x\sin x+x^2\cos x.

Example 3: The Chain Rule Inside a Quotient

Differentiate (2x+1)3x\dfrac{(2x+1)^3}{x}.

  1. The last operation is dividing, so use the quotient rule with u=(2x+1)3u=(2x+1)^3 and v=xv=x.
  2. Chain rule for the top: u′=3(2x+1)2⋅2=6(2x+1)2u'=3(2x+1)^2\cdot 2=6(2x+1)^2.
  3. Put it together: 6x(2x+1)2−(2x+1)3x2\dfrac{6x(2x+1)^2-(2x+1)^3}{x^2}.
  4. Multiply out and divide: 16x+12−1x216x+12-\dfrac{1}{x^2}.

Common Mistakes to Check

Forgetting the Inside Derivative

The derivative of sin⁡(x2)\sin(x^2) is 2xcos⁡(x2)2x\cos(x^2). Writing only cos⁡(x2)\cos(x^2) misses the 2x2x from the inside.

Multiplying Two Derivatives Together

The derivative of x2sin⁡xx^2\sin x is not 2xcos⁡x2x\cos x. Products need the product rule.

Putting in the Number Too Early

To find the slope at x=3x=3, differentiate first and then put in 3. If you put in 3 first, you get a constant, and its derivative is always 0.

Practice Problems

  1. Differentiate 7x2−3x+87x^2-3x+8.
  2. Differentiate x2exx^2e^x.
  3. Differentiate sin⁡xx\dfrac{\sin x}{x}.
  4. Differentiate (3x+1)5(3x+1)^5.
  5. Find the second derivative of x4x^4.
Show the answers
  1. 14x−314x-3
  2. x2ex+2xexx^2e^x+2xe^x
  3. xcos⁡x−sin⁡xx2\dfrac{x\cos x-\sin x}{x^2}
  4. 15(3x+1)415(3x+1)^4
  5. 12x212x^2

Related Calculators

Learn More

FAQ

What Does a Derivative Tell You?

The rate of change. If a function gives distance over time, its derivative gives speed. The same idea finds highest and lowest points, since the slope there is usually zero.

What Is the Derivative of a Constant?

Zero. A constant never changes, so its rate of change is 0. That includes the derivative of 0 itself.

What Is a Second Derivative?

The derivative of the derivative. If position is the function, velocity is the first derivative and acceleration is the second.

Can It Do Implicit Differentiation?

Not yet. An equation such as x^2+y^2=25 gets a clear message instead of a wrong answer. Partial derivatives are not supported either.

How Do You Find the Derivative at a Point?

Find the general derivative first, then put the number in. For x3−4x+1x^3-4x+1 at x=2x=2: 3(2)2−4=83(2)^2-4=8.

Why Does My Answer Look Different?

The same derivative can be written in many ways. Use the simplify calculator to compare, or put the same number into both. To go backward, use the integral calculator.


Next step: name the first rule you would use on your next homework problem, then check yourself against this derivative calculator with steps. Used that way, a differentiation calculator teaches you the pattern, not just the answer.