Derivative Calculator
Differentiate any function step by step, evaluate f'(a), and see f and f' graphed together
Function to differentiate
Derivative
Enter a function and tap Differentiate to see its derivative, evaluate it at a point and graph it.
About this tool
This derivative calculator performs symbolic differentiation entirely in your browser. It parses your function into an expression tree, applies the differentiation rules of calculus (the power, product, quotient and chain rules) and simplifies the result, so you get an exact derivative rather than a numeric approximation. You can differentiate with respect to x or any other variable such as t or n, take the first, second or third derivative, evaluate the derivative at a specific point, and view f(x) and f'(x) plotted on the same axes. It handles polynomials, trigonometric and inverse trigonometric functions, exponentials and logarithms, hyperbolic functions, roots and absolute value. Nothing is sent to a server, which keeps it fast and private for homework, exam prep and quick checks.
How to use
- 1 Type the function you want to differentiate, for example x^2, sin(x) or x*cos(x).
- 2 Set the variable (x by default) and choose the order: 1st, 2nd or 3rd derivative.
- 3 Tap Differentiate to get the simplified derivative, then copy it if you need it.
- 4 Optionally enter a value to evaluate f'(a), and open the graph to compare f and f' visually.
How it works
The calculator first parses your expression into an abstract syntax tree using a safe parser (no eval). It then differentiates the tree recursively: constants become 0 and the variable becomes 1; sums and differences are handled term by term; products use the rule (uv)' = u'v + uv'; quotients use (u/v)' = (u'v - uv')/v^2; and powers use the chain rule. For functions, it applies the standard derivatives, such as sin' = cos, cos' = -sin, exp' = exp and ln(u)' = u'/u, multiplied by the derivative of the inside (the chain rule). After differentiating, the result is algebraically simplified - removing additions of zero, multiplications by one, and folding constants - so the output stays readable and can be plotted or evaluated directly. Higher-order derivatives are obtained by differentiating the result again.
Frequently asked questions
Which functions can this calculator differentiate?
It handles polynomials and powers, the trigonometric functions sin, cos and tan and their inverses asin, acos and atan, hyperbolic sin, cos and tan, the exponential exp and e^x, natural log (ln/log), log2 and log10, square root, cube root and absolute value, combined with +, -, *, / and ^. Non-smooth functions such as floor, ceil, round, sign, min and max are not supported and will show a message.
Can I differentiate with respect to a variable other than x?
Yes. Type the variable you want in the Variable box, such as t or n. Every other letter is then treated as a constant, so differentiating a*t^2 with respect to t gives 2*a*t.
How do I get the second or third derivative?
Use the order selector and choose 2nd or 3rd. The tool differentiates your function once for the first derivative, again for the second, and a third time for the third, simplifying after each step. You can expand the steps panel to see each order.
Why does the derivative of |x| use sign(x)?
The derivative of the absolute value |u| is sign(u) times u', which is +1 where u is positive and -1 where u is negative. The absolute value has a corner at u = 0, so it is not differentiable there - the derivative simply does not exist at that single point.
Is the answer exact, and is my data private?
The derivative is symbolic and exact, computed by applying the rules of calculus rather than numerical estimation. Everything runs locally in your browser, so your expressions are never uploaded and the tool keeps working offline once loaded.
Related tools and uses
Derivatives are central to calculus: they give slopes, rates of change, velocities and the locations of maxima and minima. Pair this with the graphing calculator to see how a function and its slope relate, the equation solver to find where the derivative is zero (critical points), and the scientific calculator for evaluating expressions when results get large or small.