Derivative Calculator

Find the first or second derivative of a function of x. Follow the differentiation rules step by step and see the slope of the tangent at a point you choose.

f(x) = x2 sin(x)

Find a derivative

Use x, ^ for powers, and parentheses for functions like sin(x).

Derivative result

—

Enter a function to see its derivative and the rules used.

Derivative rules with examples

Power rule

(xn)′ = nxn−1

Multiply by the exponent and reduce it by one. The derivative of x5 is 5x4.

Product rule

(uv)′ = u′v + uv′

Differentiate one factor at a time and add the terms. The derivative of x cos(x) is cos(x) − x sin(x).

Chain rule

(f(g(x)))′ = f′(g(x))g′(x)

Differentiate the outer function and multiply by the inner derivative. The derivative of sin(3x) is 3 cos(3x).

Quotient rule

(u/v)′ = (u′v − uv′)/v2

The derivative of x/(x + 1) is 1/(x + 1)2, where x ≠ −1.

For more worked examples, see the OpenStax differentiation rules and chain rule guide.

To recreate the tangent in the diagram, enter x^2 in the derivative calculator and set the optional x value to 1. The derivative is 2x, so the tangent has slope 2 at that point.

Derivative Calculator graph of y = x² and its tangent at (1, 1), where the slope is 2.

To find an antiderivative or evaluate a definite integral, use the Integral Calculator.

Derivative calculator FAQs

How do I use the derivative calculator?

Enter the expression for f(x), such as 3x^2 + sin(x). Choose the first or second derivative and click Differentiate. The result shows the formula, and the steps below show the rules applied.

How should I type powers and fractions?

Use ^ for powers and / for division. Type (x + 1)^3 to cube a whole expression and 1/(2x) to keep 2x together in the denominator. Write function arguments in parentheses, as in sin(2x).

Which functions and constants can I enter?

Use sin, cos, tan, asin, acos, atan, exp, ln, log10, sqrt, and abs, along with pi and e. The alias log means the natural logarithm. Trigonometric inputs use radians.

How is the second derivative different from the first?

The first derivative gives the slope of the original function. The second derivative tells you how that slope changes. For x^3 the first derivative is 3x^2 and the second derivative is 6x.

How do I find the tangent slope at a specific point?

Enter the x value in the optional field. When the tangent can be plotted, the dashed line shows it and the caption gives its slope. The tangent to f(x) always uses the first derivative, even when you request the second.

Why can the derivative be undefined at a point?

A corner, a zero denominator, or a function’s domain can prevent a finite derivative. For example, abs(x) has a corner at x = 0. For variable powers such as x^x, this calculator uses the formula on positive bases.

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

The same derivative can be written in different forms. For example, 2(x + 1) and 2x + 2 give the same value. The calculator keeps some factors visible so you can follow the rules used in the steps.