easyonlinecalculator

Derivative Calculator

Type a function of x and this calculator returns its derivative as a formula, not just a number. It handles sums, products, quotients, powers, sin, cos, tan, ln, sqrt and e^x, lists every differentiation rule it used, and can also give the slope f'(a) and the tangent-line equation at a point you choose. It differentiates one variable, x, and does not do partial, higher-order or implicit derivatives.

Last updated November 4, 2026

Use x, + - * / ^, brackets, sqrt, ln, sin, cos, tan, e^x. Write 2*x, not 2x.

A number or pi / e such as pi/2. Leave blank to skip.

Result

f'(x) = 3*x^2*sin(x) + x^3*cos(x)

f(1) = 0.8414709848; f'(1) = 3.06471526

Tangent line: y = 3.06471526x - 2.223244275

Symbolic result. Trig in radians.

Show the work

Formula: Differentiate term by term with the sum, constant multiple, product, quotient, power and chain rules. Trig functions use radians.

  1. Read the function: f(x) = x^3*sin(x).
  2. Product rule on x^3*sin(x): (u*v)' = u'*v + u*v'.
  3. Power rule on x^3: (u^n)' = n*u^(n-1)*u'.
  4. Derivative of sine on sin(x): (sin u)' = cos(u)*u'.
  5. Derivative of x on x: d/dx[x] = 1.
  6. Assemble the rules: f'(x) = 3*x^2*sin(x) + x^3*cos(x).
  7. Evaluate at x = 1: f(1) = 0.8414709848 and f'(1) = 3.06471526.
  8. Tangent line: y - 0.8414709848 = 3.06471526(x - 1), which gives y = 3.06471526x - 2.223244275.

Result: f'(x) = 3*x^2*sin(x) + x^3*cos(x)

The differentiation rules used

Formula

(u*v)' = u'*v + u*v', (u/v)' = (u'*v - u*v') / v^2, d/dx f(g(x)) = f'(g(x)) * g'(x)

The derivative f'(x) is the rate at which f changes as x changes, and it equals the slope of the tangent line to the curve at each point. The calculator builds it by walking through your expression and applying a small set of standard rules. A constant has derivative 0 and x has derivative 1. A sum or difference is differentiated term by term, and a constant factor stays in front: (c*u)' = c*u'.

For a product it uses the product rule, (u*v)' = u'*v + u*v'. For a quotient it uses the quotient rule, (u/v)' = (u'*v - u*v') / v^2. For a power with a constant exponent it uses the power rule, (u^n)' = n*u^(n-1)*u'. When the inside of a function is more than plain x, such as the x^2 in sin(x^2), the chain rule multiplies by the derivative of the inside.

The function rules are (sin u)' = cos(u)*u', (cos u)' = -sin(u)*u', (tan u)' = u'/cos(u)^2, (ln u)' = u'/u and (sqrt u)' = u'/(2*sqrt(u)). An exponential with a constant base a follows (a^u)' = a^u*ln(a)*u', which becomes e^u*u' for base e. If both base and exponent contain x, as in x^x, the calculator uses logarithmic differentiation: (u^v)' = u^v*(v'*ln(u) + v*u'/u).

See how we calculate for the formulas, sources and review schedule behind every calculator.

Also useful alongside this calculator: Graphing Calculator and Scientific Calculator.

Simplified and raw output

Applying the rules mechanically produces clutter such as 2*x^1 + 0. With simplification on, the calculator does exact arithmetic on whole numbers and fractions, drops terms that are 0 and factors that are 1, writes numeric coefficients first and turns x*x into x^2. Switch simplification off to see the raw rule output.

Simplification here is deliberately modest. It does not factor, expand products or use trigonometric identities, so two correct answers can look different: your textbook may print the same derivative in a rearranged form.

Slope and tangent line at a point

Enter a value for a, either a number or an expression such as pi/2 or 2*e, and the calculator evaluates f(a) and f'(a). The tangent line passes through the point (a, f(a)) with slope m = f'(a), so its equation is y - f(a) = m(x - a), which is shown rearranged as y = mx + b with b = f(a) - m*a.

If f or f' is undefined at the chosen point, the calculator says so instead of guessing. For example, ln(x) has no value at 0, and sqrt(x) has a value at 0 but its derivative does not, so no tangent line exists there.

How to write f(x)

Use a lowercase x, the operators + - * / ^, brackets and the names sin, cos, tan, ln, sqrt and exp, plus the constants e and pi. Multiplication must be explicit: write 2*x rather than 2x and x*(x+1) rather than x(x+1). Functions need brackets, so sin(x) works and sin x does not. Use ln for the natural logarithm; log is rejected because it is ambiguous.

How to use the Derivative Calculator

  1. Type f(x) using x as the variable, for example x^3*sin(x).
  2. Optionally enter a point a, such as 1 or pi/2, to get f'(a) and the tangent line.
  3. Choose whether to simplify the result or see the raw rule output.
  4. Read f'(x) in the result, then open Show the work to see each rule and where it was applied.

Worked example: f(x) = x^3*sin(x) at x = 1

Worked example

The function is a product, so the product rule applies. The power rule gives (x^3)' = 3*x^2 and the derivative of sine is cos, so f'(x) = 3*x^2*sin(x) + x^3*cos(x). At x = 1 the value f(1) = sin(1) is about 0.8415 and the slope is 3*sin(1) + cos(1), about 3.0647, which gives the tangent line shown below.

Derivative of x^3*sin(x) at x = 1
QuantityResult
f(x)x^3*sin(x)
f'(x)3*x^2*sin(x) + x^3*cos(x)
f(1)0.8414709848
f'(1)3.06471526
Tangent line at x = 1y = 3.06471526x - 2.223244275

Frequently asked questions

Is the answer an exact formula or a numerical estimate?

It is an exact symbolic formula built from the differentiation rules. Only the optional value of f'(a) is a decimal, rounded to about ten significant digits.

Why does my textbook show a different but equivalent derivative?

Simplification here is limited, so the form can differ from a hand-simplified one. Evaluate both at a couple of x values and they will agree.

Are angles in degrees or radians?

Radians. The derivative of sin(x) is cos(x) only when x is in radians, so the point a is read in radians too, and pi can be typed for angles.

Why is there no tangent line at some points?

The derivative must exist there. Points where f or f' is undefined, such as x = 0 for sqrt(x) or ln(x), are rejected with a message instead of a wrong slope.

Can it do second derivatives, partial derivatives or implicit differentiation?

No. It finds the first derivative of one function of x. To get a second derivative, copy the result into the input and differentiate it again.