Skip to main content
ToolSmartly

Derivative Calculator: Find the Derivative of a Function Online

Enter a function of x to get its exact derivative, calculated symbolically: simplified form, rules applied, derivatives up to order 4, the value of f′(a), the tangent line equation and a plot of f and f′. Everything is calculated in your browser.

f(x) =
x² x³−2x+1 sin(x) cos(x) eˣ ln(x) √x x²·sin(x) sin(x)/x (x²+1)/(x−1) x·eˣ arctan(x)
f(x) =
x⁴ sin(x) eˣ x⁵−3x³+x cos(x)
f(x) =
x²+sin(x), a=1 eˣ, a=0 ln(x), a=1 x³, a=2 sin·cos, a=0
↵ Enter to differentiate
Enter a function and click Differentiate.

How to calculate a derivative online?

The derivative of a function f(x) represents the instantaneous rate of change of the function at each point. Written f'(x) or df/dx, it is fundamental in mathematical analysis, physics and economics. Our calculator uses symbolic differentiation to produce the exact derivative expression.

Main differentiation rules

The fundamental rules are: sum rule (f+g)' = f'+g', product rule (f·g)' = f'·g + f·g', quotient rule (f/g)' = (f'g−fg')/g², and chain rule (f∘g)' = f'(g(x))·g'(x). Standard derivatives: (xⁿ)' = n·xⁿ⁻¹, (sin x)' = cos x, (cos x)' = −sin x, (eˣ)' = eˣ, (ln x)' = 1/x.

Second derivative and interpretation

The second derivative f''(x) gives the curvature of the function. If f''(x) > 0, the function is convex (curving upward); if f''(x) < 0, it is concave. Inflection points are at zeros of f''(x). The second derivative is also acceleration in physics (derivative of velocity).

How to find a derivative: syntax and modes

The calculation is symbolic: the tool uses the math.js library to apply the rules of differentiation to the expression itself, not a numerical approximation. The variable is always x.

How to use it

  1. Symbolic derivative: enter f(x) to get f′(x), its simplified form, the rules applied and a plot of both curves.
  2. n-th derivative: choose the order (1 to 4) to get f′′, f′′′ or f⁽⁴⁾.
  3. Value f′(a): give a point a to get f(a), the slope f′(a) and the equation of the tangent line.

Writing a function

InputMeaning
x^3x cubed
2*x or 2x2 times x
sqrt(x)square root
exp(x)exponential eˣ
log(x)natural logarithm (ln); log10(x) for base 10
sin(x), cos(x), tan(x)trigonometric functions, x in radians

Put brackets around compound numerators, denominators and exponents: (x+1)/(x-1), e^(2*x).

Example: tangent line at a point

For f(x) = x³ − 2x + 1, the tool gives f′(x) = 3x² − 2. At a = 1: f(1) = 0 and f′(1) = 1, so the tangent line is y = f′(a)(x − a) + f(a), that is y = x − 1.

Frequently asked questions

Why doesn’t the result look like my textbook’s answer?

The same derivative can be written in several equivalent ways (expanded or factored, terms in a different order). Compare values at a point with the “Value f′(a)” mode to check that they match.

Can I differentiate with respect to a variable other than x?

No, the variable of differentiation is x. Rename your function’s variable to x before entering it; other letters are treated as unknown constants and may cause an error.

What do the second and third derivatives tell me?

The second derivative gives the curvature: where f′′(x) > 0 the curve bends upwards (convex), where it is negative it bends downwards, and a sign change marks an inflection point. In physics, if f is a position over time, f′ is the velocity and f′′ the acceleration.