How this derivative calculator works
You type a function, and we differentiate it the way a tutor would at a whiteboard: one rule at a time, in order, with your actual expression in every line. Not a canned example that looks vaguely like your problem. Your function, your steps.
Under the hood, the calculator parses your expression into a tree, then walks that tree applying the standard differentiation rules recursively: the outermost structure first (a product, a quotient, a composition), then each piece inside it. Every rule it applies gets recorded as a step at the moment it is applied, by the same code that produces the answer. That matters more than it sounds: the steps can never disagree with the result, because they are the result. Afterward a conservative simplifier cleans up the algebra (folding constants, dropping multiplications by 1, collecting coefficients) without mangling the expression into something you no longer recognize.
The input syntax is deliberately relaxed. Write 2x instead of 2*x, sin x instead of sin(x), (x+1)(x-2) with no multiplication sign. If something does not parse, the error tells you which character caused the problem and what to try instead. You can also ask for the second or third derivative, and optionally evaluate everything at a specific x value, including pi shorthands like pi/2.
The differentiation rules
Every derivative in single-variable calculus comes from a short list of rules applied in combination. These are the same formulas the calculator cites in its steps, so the table below doubles as a legend for the output. Throughout, u and v are expressions containing x, and u' means the derivative of u.
| Rule | Formula | When it applies |
|---|---|---|
| Power rule | d/dx[xn] = n·xn-1 | x raised to any constant, including fractions and negatives |
| Constant multiple | d/dx[c·u] = c·u' | a constant factor rides along untouched |
| Sum and difference | d/dx[u + v] = u' + v' | differentiate term by term |
| Product rule | d/dx[u·v] = u'·v + u·v' | two x-containing factors multiplied |
| Quotient rule | d/dx[u/v] = (u'·v - u·v') / v2 | one x-containing expression divided by another |
| Chain rule | d/dx[f(g(x))] = f'(g(x))·g'(x) | any function inside another function |
| Exponential | d/dx[eu] = eu·u' | e raised to an x-containing exponent |
| General base | d/dx[au] = au·ln(a)·u' | any constant base, like 2x |
| Natural log | d/dx[ln(u)] = u'/u | logarithm base e |
| Log base 10 | d/dx[log(u)] = u' / (u·ln(10)) | common logarithm |
| Square root | d/dx[√u] = u' / (2√u) | same as the power rule with n = 1/2 |
| Sine | d/dx[sin(u)] = cos(u)·u' | all six trig functions are supported; the minus signs belong to the co-functions |
| Cosine | d/dx[cos(u)] = -sin(u)·u' | |
| Tangent | d/dx[tan(u)] = sec2(u)·u' | |
| Secant | d/dx[sec(u)] = sec(u)·tan(u)·u' | |
| Cosecant | d/dx[csc(u)] = -csc(u)·cot(u)·u' | |
| Cotangent | d/dx[cot(u)] = -csc2(u)·u' | |
| Arcsine | d/dx[asin(u)] = u' / √(1 - u2) | inverse trig; arccosine's derivative is the negative of arcsine's |
| Arccosine | d/dx[acos(u)] = -u' / √(1 - u2) | |
| Arctangent | d/dx[atan(u)] = u' / (1 + u2) | |
| Hyperbolic sine | d/dx[sinh(u)] = cosh(u)·u' | like trig, but cosh keeps its plus sign |
| Hyperbolic cosine | d/dx[cosh(u)] = sinh(u)·u' | |
| Hyperbolic tangent | d/dx[tanh(u)] = u' / cosh2(u) |
Two functions deserve a special mention. When x appears in both the base and the exponent, as in xx, no single rule above applies; the calculator uses logarithmic differentiation, rewriting uv as ev·ln(u), differentiating that, and rewriting back. And abs(u) gets differentiated as u·u' / |u|, with an honest caveat in the result: the absolute value has a sharp corner wherever u = 0, and no derivative exists there.
Worked example: the product rule
Take f(x) = x2·sin(x). Two factors, each containing x, so the product rule leads. Here is the calculator's actual output for this input, step for step:
f'(x) = 2x·sin(x)+x2·cos(x)
- Product rule. d/dx[u·v] = u'·v + u·v' Here u = x2 and v = sin(x). Each factor takes a turn being differentiated.
d/dx[ x2·sin(x) ] = 2x·sin(x)+x2·cos(x) - Power rule. d/dx[xn] = n·xn-1 Bring the exponent down in front, then lower the exponent by one.
d/dx[ x2 ] = 2x - Derivative of sine. d/dx[sin(u)] = cos(u)·u'
d/dx[ sin(x) ] = cos(x)
Now evaluate at x = pi/2, where sin is exactly 1 and cos is exactly 0. The second term vanishes and the first becomes 2·(pi/2)·1, so f'(pi/2) = pi. The calculator reports f'(x) = 3.141593 at x = pi/2 (with f(x) = 2.467401 there). When a derivative lands exactly on pi, it is a good day.
Worked example: the chain rule
Now take f(x) = ln(x2+1), a function inside a function. The chain rule handles the nesting: differentiate the outer ln first, then multiply by the derivative of the inside. Again, this is the calculator's real output:
f'(x) = 2x/(x2+1)
- Chain rule (derivative of the natural log). d/dx[ln(u)] = u'/u with u = x2+1 Differentiate the outside function first, then multiply by the derivative of the inside, u'.
d/dx[ ln(x2+1) ] = 2x/(x2+1) - Sum rule. d/dx[u + v] = u' + v' Differentiate each part on its own, then recombine.
d/dx[ x2+1 ] = 2x - Power rule. d/dx[xn] = n·xn-1 Bring the exponent down in front, then lower the exponent by one.
d/dx[ x2 ] = 2x - Constant rule. d/dx[c] = 0 This piece has no x in it, so it does not change as x changes.
d/dx[ 1 ] = 0
At x = 2 the derivative is 2·2/(4+1) = 4/5, and the calculator reports f'(x) = 0.8 (with f(x) = 1.609438). Notice what the steps reveal: the +1 inside the log contributed a step (the constant rule) and then contributed nothing. That is the chain rule working correctly, not a wasted line.
Why the steps are free
Many step-by-step solvers put the working behind a signup, or show you the first step and blur the rest until you subscribe. We think that gets the product exactly backwards. If you wanted only the answer, the back of your textbook already has it; the steps are the entire reason you came. Charging for them is charging for the part that teaches. So here the steps are the product: every rule, every substitution, every order you ask for, with no account and no meter running. If that earns us a bookmark before your next exam, that trade works fine for us.
Common derivatives at a glance
Ten derivatives that cover most homework. Every row below was computed by this calculator, so what you see here is exactly what it will show you:
| f(x) | f'(x) |
|---|---|
| x3 | 3x2 |
| √(x) | 1/(2√(x)) |
| 1/x | -1/x2 |
| ln(x) | 1/x |
| ex | ex |
| 2x | 2x·ln(2) |
| sin(x) | cos(x) |
| cos(x) | -sin(x) |
| tan(x) | sec(x)2 |
| atan(x) | 1/(x2+1) |
What this calculator does not do
An honest boundary line, so you do not waste time typing something it cannot handle. This tool differentiates explicit single-variable functions of x. It does not do implicit differentiation, so it cannot find dy/dx from an equation like x2 + y2 = 25; only x can appear in the function. It does not do partial derivatives, since there is no second variable to hold constant. And it does not integrate; for antiderivatives and definite integrals, our integral calculator runs the machinery in the other direction, steps included.
Within its lane it is thorough: first through third derivatives, all seventeen supported functions, chain rule nesting as deep as you like, and logarithmic differentiation when both the base and exponent contain x. If an expression generates more than 60 steps in one order, the list is trimmed with a note saying exactly how many small steps were folded in; the answer always includes all of them.
Where to go from here
A derivative is a slope, so if you are still building that intuition, the slope calculator shows the same idea for straight lines, where the slope never changes. The mean value theorem calculator connects the two: somewhere on any smooth curve, the instantaneous slope equals the average slope. Setting a derivative to zero to find maxima and minima often leaves you solving a quadratic, which is what the quadratic formula calculator is for. And when you are ready to go backwards from rates to totals, the integral calculator is the other half of calculus.