Calculus

Derivative Calculator

Type a function of x to get its first, second or third derivative, simplified, along with its value and tangent line at any point and a graph of both curves.

Tool no.
ECT-C01
Rev
1.0
Updated
Oct 2026
Method
Symbolic differentiation
Examples

Given

Use x as the variable. Supports + − * / ^, sqrt, exp, ln, log10, sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh, abs, pi and e.

Order of derivative

Solution

f′(x) =
—
Runs in your browser. Nothing you enter is uploaded.Symbolic differentiation · math.js

How to use this calculator

Type a function using x as the variable, choose the order of the derivative, and pick a point. The calculator differentiates symbolically, simplifies the result, evaluates the function and its derivatives at that point, and draws the tangent line. Write multiplication with * when it could be ambiguous: x*sin(x), not xsin(x). A number in front of a variable needs no star, so 3x^2 works.

Differentiation rules

Power ruleddx xn = nxn−1
Product rule(uv)′ = u′v + uv′
Quotient rule(u/v)′ = u′v − uv′v2
Chain ruleddx f(g(x)) = f′(g(x)) · g′(x)
FunctionDerivativeType it as
sin xcos xsin(x)
cos x−sin xcos(x)
tan xsec² xtan(x)
exexe^x or exp(x)
ln x1/xln(x)
√x1/(2√x)sqrt(x)
arctan x1/(1 + x²)atan(x)

Worked example

f(x) = x³ sin x at x = 1 (the default)

  1. Product rule with u = x³ and v = sin x: f′(x) = 3x² sin x + x³ cos x.
  2. At x = 1: f(1) = sin 1 = 0.841471 and f′(1) = 3 sin 1 + cos 1 = 2.524413 + 0.540302 = 3.064715.
  3. Tangent line: y = f(1) + f′(1)(x − 1), which simplifies to y = 3.064715x − 2.223244.

Derivatives in engineering

Derivatives show up whenever one quantity changes with another. Velocity and acceleration are the first and second derivatives of position. In beam theory, slope is the derivative of deflection, bending moment is EI times the second derivative, and shear is the derivative of moment: V = dM/dx. The maximum bending moment in a beam occurs where the shear is zero, which is the same as setting a derivative to zero to find a maximum.

Frequently asked questions

Does log mean natural log?

Yes. Both ln(x) and log(x) mean the natural logarithm. Use log10(x) for base 10.

Are trig functions in radians?

Yes. All trigonometric functions use radians, as calculus requires. To work in degrees, multiply the angle by pi/180, for example sin(x*pi/180).

Why does my answer look different from my textbook’s?

The same derivative can be written many ways. The calculator simplifies automatically, but it may factor or order terms differently from a textbook. Compare the values at a point, or look at the graph, to confirm two forms agree.

Why is the derivative undefined at my point?

Some functions are not differentiable everywhere: ln x needs x > 0, √x has no derivative at 0, and |x| has a corner at 0. The calculator reports the value as undefined in those cases.