home / Math / derivative calculator

Derivative Calculator

The Derivative Calculator is a free online tool for the rate of change of a function. It computes the derivative numerically at any point, gives the tangent line there, and plots the function alongside its derivative.

Use x as the variable. Functions available: sin, cos, tan, sqrt, abs, exp, ln, log, and ^ for powers.

Related: Integral Calculator | Graphing Calculator | Slope Calculator

What a Derivative Measures

The derivative is the instantaneous rate of change — the slope of the tangent line at a point. Where the average rate of change between two points is a straightforward division, the derivative is what that division approaches as the two points converge:

f′(x) = limh→0 [f(x + h) − f(x)] / h

This calculator evaluates it numerically using a central difference, which is accurate to roughly six significant figures for well-behaved functions.

Common Derivatives

f(x)f′(x)
xⁿn xn−1
exex
ln(x)1/x
sin(x)cos(x)
cos(x)−sin(x)
a constant0

Three rules combine them: the product rule (uv)′ = u′v + uv′, the quotient rule, and the chain rule f(g(x))′ = f′(g(x)) × g′(x). The chain rule is the one that takes practice and the one that appears most often.

What the Sign Tells You

  • f′(x) > 0 — the function is increasing.
  • f′(x) < 0 — decreasing.
  • f′(x) = 0 — a stationary point: a maximum, minimum or saddle.
  • f″(x) > 0 — concave up; a stationary point here is a minimum.
  • f″(x) < 0 — concave down; a stationary point here is a maximum.

This is the basis of optimisation: to find the largest or smallest value, find where the derivative is zero and check the second derivative.

Derivatives in the World

Velocity is the derivative of position; acceleration the derivative of velocity. Marginal cost is the derivative of total cost. In machine learning, gradient descent follows the derivative of a loss function downhill. Every rate — of growth, decay, flow, change — is a derivative.

Where Derivatives Do Not Exist

A function must be continuous and smooth at a point to be differentiable there. Sharp corners fail: |x| has no derivative at zero, because the slope approaches −1 from the left and +1 from the right. Vertical tangents and discontinuities fail too.

Frequently Asked Questions

Why numerical rather than symbolic?

Numerical differentiation works on any expression you can evaluate, including ones with no tidy closed form. Symbolic differentiation gives an exact formula and needs a full computer algebra system.

How accurate is the result?

Typically six or more significant figures. Accuracy falls near discontinuities, sharp corners, and points where the function changes very rapidly.

What is the second derivative for?

Concavity and acceleration. It distinguishes maxima from minima, and it locates inflection points where the curve changes which way it bends.