Derivative Calculator d/dx
Differentiate any function and (optionally) evaluate the derivative at a point.
Show working (LaTeX)
Use * for multiply and ^ for powers, e.g. 3*x^2, sin(x), e^x, ln(x).
This free derivative calculator differentiates any function with respect to x, simplifies the result, and can evaluate the derivative at a point — showing the formula in clean LaTeX.
How to use the derivative calculator
Type your function into the derivative calculator above (use * for multiply and ^ for powers), press Differentiate, and you get the simplified derivative instantly. To find a slope at a specific point, enter a value in “Evaluate at x” and the derivative calculator returns f′(x) there too. It is a free differentiation calculator and derivative solver that works right in your browser.

What is a derivative?
A derivative measures the instantaneous rate of change of a function — the slope of its graph at each point. See the derivative reference for the formal limit definition.
f′(x) is the limit of the average rate of change as the interval shrinks to zero: $f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}$.Derivative rules & formula
Most derivatives come from a handful of rules. The power rule is the workhorse:
$$\frac{d}{dx}x^n = n\,x^{n-1}$$| Function | Derivative |
|---|---|
| $x^n$ | $n x^{n-1}$ |
| $\sin x$ | $\cos x$ |
| $\cos x$ | $-\sin x$ |
| $e^x$ | $e^x$ |
| $\ln x$ | $1/x$ |
How to differentiate step by step
- Write the function and identify the rule (power, product, quotient or chain).
- Apply the rule term by term.
- Simplify — or let the derivative calculator above do it for you.
Worked example
Differentiate $f(x)=x^3+2x$:
$$f'(x)=\frac{d}{dx}(x^3+2x)=3x^2+2$$Why derivatives matter in machine learning
Derivatives are the engine of model training. If you’re into machine learning for beginners, every gradient-descent step uses a derivative to know which way to adjust the weights. Pair this with the integral calculator and see derivatives in action in PCA.
🤖 ML insight
Backpropagation is just the chain rule applied across a network: each layer’s derivative is multiplied together to get the gradient of the loss with respect to every weight.
$$\frac{\partial L}{\partial w}=\frac{\partial L}{\partial y}\cdot\frac{\partial y}{\partial w}$$Frequently asked questions
What does this derivative calculator support?
Can it evaluate the derivative at a point?
How do I type powers and multiplication?
What is a second derivative?
Is this differentiation calculator free?
More derivative examples
Checking the tool against a few standards builds confidence. The product rule says the derivative of $u\,v$ is $u’v+uv’$; the quotient rule gives $\dfrac{u’v-uv’}{v^2}$; and the chain rule differentiates the outer function, then multiplies by the derivative of the inner function.
| f(x) | f′(x) |
|---|---|
| $5x^4$ | $20x^3$ |
| $\sqrt{x}$ | $\dfrac{1}{2\sqrt{x}}$ |
| $\tan x$ | $\sec^2 x$ |
| $xe^x$ | $e^x(x+1)$ |
| $\ln(3x)$ | $1/x$ |
For a second derivative, differentiate the output again — it describes concavity and acceleration. For functions of several variables, a partial derivative differentiates with respect to one variable while holding the others constant, which is the building block of the gradient used to train models.
Derivative calculator: summary
From homework to backprop, this derivative calculator gives you the differentiated function with the working shown. Try the integral calculator next, or keep learning with machine learning for beginners.