Calculator Tools

Derivative Calculator

Find first and higher-order derivatives with a step-by-step solution. Type a function, check how it is read, and see the answer, the rules used, and a graph.

Enter your function

Leave the point empty for the formula. Add a point to get the value there and, for a first derivative, the tangent line.

We read this as

ddx(x3)

Try an example

How to type your function
x squaredx^2
2 times x2x or 2*x
Square rootsqrt(x)
e to the power xe^x
Natural logln(x) (log(x) also means ln)
Pipi
Trig functionssin(x), cos(x), tan(x)
Sine squaredsin(x)^2
Inverse tangentatan(x)
Absolute valueabs(x)
A fraction1/(x+1)

Use x as the variable and brackets to make the order clear, for example 1/(2x).

Result

ddx(x3)=3⁢x2

Checked: the result was verified numerically against your function.

Step-by-step solution
  1. Power rule

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

    ddx(x3)=3⁢x2

Graph

The graph appears here once there is a valid function.

What is a derivative?

A derivative tells you how fast a function is changing. If you drive for an hour and cover 30 miles, your average speed is 30 miles per hour, but the derivative of your position tells you your exact speed at any single moment. Geometrically, the derivative of f at a point is the slope of the tangent line to the graph there. It is defined by the limit f′(x) = lim (f(x + h) − f(x)) / h as h approaches 0. This free derivative calculator finds first and higher-order derivatives, shows the rule used at each step, checks its own answer, and graphs the function.

How to use the derivative calculator

  1. Type your function. Use x as the variable, for example x^3 + 2x. The keys under the box insert common symbols and functions.
  2. Check the preview. The line "We read this as" shows exactly how your entry was understood, so you can spot a missing bracket early.
  3. Choose the order. Pick the first derivative, or up to the fifth for repeated differentiation.
  4. Add a point (optional). Enter a value for x, such as 2 or pi/2, to get the slope there.
  5. Read the result. You get the derivative, a step-by-step solution, and a graph. For a first derivative at a point, the tangent line is drawn.

Differentiation rules

Constant rule
d/dx [c] = 0
Power rule
d/dx [xⁿ] = n·xⁿ⁻¹
Constant multiple
d/dx [c·f(x)] = c·f′(x)
Sum and difference
d/dx [f(x) ± g(x)] = f′(x) ± g′(x)
Product rule
d/dx [f(x)·g(x)] = f′(x)·g(x) + f(x)·g′(x)
Quotient rule
d/dx [f(x) / g(x)] = (f′(x)·g(x) − f(x)·g′(x)) / g(x)²
Chain rule
d/dx [f(g(x))] = f′(g(x))·g′(x)

Common derivatives

These results come straight from the calculator, so you can compare them with your own work.

FunctionDerivative
50
x33⁢x2
x12⁢x
1x−1x2
exex
2xln⁡(2)⁢2x
ln⁡(x)1x
sin⁡(x)cos⁡(x)
cos⁡(x)−sin⁡(x)
tan⁡(x)sec2⁡(x)
sec⁡(x)sec⁡(x)⁢tan⁡(x)
csc⁡(x)−cot⁡(x)⁢csc⁡(x)
cot⁡(x)−csc2⁡(x)
arcsin⁡(x)11−x2
arctan⁡(x)1(x2+1)
sinh⁡(x)cosh⁡(x)

Examples with the rules

Product rule

When two functions are multiplied, use (f·g)′ = f′·g + f·g′. Here f = sin(x) and g = eˣ.

ddx(ex⁢sin⁡(x))=cos⁡(x)⁢ex+ex⁢sin⁡(x)

Quotient rule

For a fraction, use (f/g)′ = (f′·g − f·g′) / g². Here f = 3x + 9 and g = 2 − x, and the result simplifies a lot.

ddx((3⁢x+9)(2−x))=15(2−x)2

Chain rule

For a function inside another, multiply the outer derivative by the inner one. Here the outer function is ln(u) and the inner one is u = x² + 1.

ddx(ln⁡(x2+1))=2⁢x(x2+1)

Higher-order derivatives

Differentiate again to get the second derivative. Differentiating x⁴ twice gives 12x².

d2dx2(x4)=12⁢x2

Logarithmic differentiation

When both the base and the exponent contain x, use d/dx [uᵛ] = uᵛ·(v′·ln(u) + v·u′/u).

ddx(xx)=xx⁢(ln⁡(x)+1)

Derivative at a point and tangent lines

To find the slope of the graph at one point, differentiate first and then substitute the value of x. For f(x) = 3 − 4x² at x = 5, the derivative is −8x, so the slope there is −8 · 5 = −40. A negative slope means the function is decreasing at that point.

ddx(3−4⁢x2)=−8⁢x

f′(5)=−40

What this calculator can and cannot do

The calculator works with one variable, x, and handles these kinds of functions:

  • Polynomials, powers, roots, and reciprocals, such as x³, √x, and 1/x².
  • Exponential and logarithmic functions, including aˣ and expressions where the base and exponent both contain x.
  • Trigonometric, inverse trigonometric, and hyperbolic functions, alone or combined.
  • Products, quotients, and compositions of all of these, up to the fifth derivative.

It does not do partial derivatives or implicit differentiation yet. Where a function has a corner, a break, or a vertical tangent, the calculator says that the derivative is not defined there instead of giving a number.

Tips for working with derivatives

  • Rewrite roots and reciprocals as powers first: √x is x^(1/2) and 1/x is x^(−1).
  • Use brackets for fractions: 1/(2x) is not the same as 1/2x.
  • In this calculator, log(x) means the natural logarithm, the same as ln(x).
  • Check a derivative by integrating it. You should get the original function back, plus a constant.
  • A zero derivative marks a flat tangent, which is where a maximum or minimum can occur.

Derivative terms explained

Derivative
The rate at which a function changes. Written f′(x) or dy/dx.
Tangent line
The straight line that just touches a curve at a point and has the same slope as the curve there.
Differentiation
The process of finding a derivative.
Higher-order derivative
A derivative of a derivative, such as the second derivative f″(x).
Chain rule
The rule for differentiating a function of a function.
Critical point
A point where the derivative is zero or does not exist. Maximums and minimums can occur there.

Frequently asked questions

What is a derivative?

A derivative measures how fast a function changes. The derivative of f(x) at a point is the slope of the tangent line to the graph at that point. It is defined as the limit of (f(x + h) − f(x)) / h as h approaches 0.

How do I find the derivative of a function?

Use the differentiation rules: the power rule for terms like x³, the sum and constant multiple rules for expressions with several terms, the product and quotient rules when functions are multiplied or divided, and the chain rule when one function is inside another. This calculator applies these rules for you and lists each one in the step-by-step solution.

What does the second derivative tell me?

The second derivative is the derivative of the derivative. It shows how the slope itself is changing. Where it is positive, the graph curves upward, and where it is negative, the graph curves downward. In motion problems, the first derivative of position is velocity and the second is acceleration.

How do I type a function into the calculator?

Use x as the variable and type the function the way you would on a calculator: x^2 for x squared, 2x or 2*x for 2 times x, sqrt(x) for a square root, e^x for e to the power x, and ln(x) for the natural logarithm. The usual functions work, such as sin(x), cos(x), tan(x), and atan(x). Use brackets for fractions, for example 1/(2x). The preview under the input shows how your entry is read.

How do I find the derivative at a point?

Enter a value in the optional "Evaluate at x" field. The calculator finds the derivative first and then substitutes the point, giving you the slope of the graph there. For a first derivative it also draws the tangent line through that point. You can use numbers or expressions such as pi/2.

Why does the calculator say the derivative is not defined at a point?

A derivative does not exist where the function has a break, a sharp corner, or a vertical tangent. For example, the absolute value function |x| has a corner at x = 0, and 1/x is undefined at x = 0. At those points the calculator reports that there is no derivative instead of giving a number.

Does the calculator show the steps?

Yes. Each rule that is used is listed in order, with the expression it was applied to and the result. The calculator also checks every answer by comparing it with a numerical derivative of your function.

Can it find partial or implicit derivatives?

Not yet. This calculator works with functions of a single variable, x, and finds ordinary derivatives up to the fifth order. Partial derivatives and implicit differentiation need a different input format and are not included.