A derivative calculator that shows its working: type an expression and get the derivative built rule by rule (power, product, quotient, chain), in exact symbolic form, with the value at your point and a graph of the function and its derivative together. It also handles higher derivatives, partial derivatives, directional derivatives from the gradient, and implicit differentiation for curves given as F(x, y) = 0.
Syntax: variables x and y; + − * / and ^ for powers; parentheses; functions sin cos tan asin acos atan exp ln log sqrt; constants pi and e. Multiplication may be implicit: 2x, 3(x+1), x sin(x) all work. log is base 10; ln is natural.
How to use this calculator
- Derivative of f(x): enter the expression, choose the order (first, second or third derivative), and optionally a point. You get the derivative with the rule-by-rule steps, its value at the point, and a plot of f and f′ together.
- Partial derivative: enter f(x, y) and pick the variable. The other variable is treated as a constant throughout, which the steps respect.
- Directional derivative: enter f(x, y), a point, and a direction vector. The tool builds the gradient at the point, normalises your direction, and takes the dot product, showing each piece.
- Implicit: enter F(x, y) for a curve F = 0. The tool returns dy/dx = −Fx / Fy in simplified form, and its value at your point if you give one.
The method
The rules, applied symbolically
The expression is parsed into a tree and differentiated structurally, one rule at a time, with exact fraction arithmetic on the coefficients, so 1/2 stays 1/2 rather than decaying into decimals. Constants fold, zero and one terms drop out, and like coefficients combine as the result is built. The steps listed with each answer name the rule used at each node of the tree, which is the part most calculators hide and most students actually need.
Functions and the general power
The built-in derivatives are sin → cos, cos → −sin, tan → 1/cos², exp → exp, ln u → u′/u, log u → u′/(u ln 10), asin → u′/√(1 − u²), acos → its negative, atan → u′/(1 + u²), each chained with u′. A power with a constant exponent uses the power rule; a power where the exponent also varies, like xx, uses the general form uv · (v′ ln u + v u′/u), which is logarithmic differentiation carried out symbolically.
Partials, gradients, implicit
A partial derivative is an ordinary derivative with the other variables frozen. The directional derivative is the gradient (the vector of both partials, evaluated at the point) dotted with the unit vector in your direction, so its size is at most the gradient’s length, attained only when the direction is the gradient’s own. Implicit differentiation differentiates F(x, y) = 0 with y riding along as a function of x, then solves for dy/dx, which collapses to the ratio above.
Numerical verification
Every derivative can be spot-checked against the symmetric difference quotient (f(x + h) − f(x − h)) / 2h for small h: the tool’s evaluated values use direct substitution into the symbolic derivative, and the worked examples below were all verified both ways. Near a singularity (a vertical tangent, a kink, a domain edge) the symbolic value at the exact point may be undefined while nearby quotients explode or disagree, which the results flag rather than paper over.
Worked examples
Example 1: a polynomial, with slope
f(x) = x³ − 3x² + 2x gives f′(x) = 3x² − 6x + 2, and f′(1) = −1: at x = 1 the curve is falling with slope 1 in 1. The second derivative is 6x − 6, which is 0 at x = 1, the inflection point. The preloaded example, at all three orders.
Example 2: product and chain together
f(x) = x² sin(x): the product rule gives f′ = 2x sin(x) + x² cos(x), in some order depending on how the terms collect. At x = π the sine terms vanish and f′(π) = −π² ≈ −9.869604.
Example 3: a quotient that vanishes
f(x) = ex/x: the quotient rule gives (exp(x)·x − exp(x)) / x², and at x = 1 that is (e − e)/1 = 0, the minimum of the curve, visible on the plot.
Example 4: square root as a power
f(x) = √x = x1/2 gives f′ = (1/2) x−1/2, and f′(4) = 0.25: the root curve climbs ever more gently, quarter-slope by x = 4.
Example 5: partial derivatives
f(x, y) = x²y + sin(y): ∂f/∂x = 2xy (y rides as a constant coefficient), and ∂f/∂y = x² + cos(y). At (1, 2) those are 4 and 1 + cos(2) ≈ 0.583853. The preloaded partial example.
Example 6: directional derivative
f(x, y) = x² + y² at (1, 2): the gradient is (2x, 2y) = (2, 4). In the direction (3, 4), whose length is 5, the unit vector is (0.6, 0.8) and the directional derivative is 2(0.6) + 4(0.8) = 4.4, less than the gradient’s own length √20 ≈ 4.47214, as it must be. The preloaded directional example.
Example 7: implicit, the circle
x² + y² − 25 = 0: Fx = 2x, Fy = 2y, so dy/dx = −x/y. At (3, 4), which lies on the circle, dy/dx = −0.75: the radius to that point has slope 4/3, and the tangent, perpendicular to it, has slope −3/4, a satisfying cross-check. The preloaded implicit example.
Reading your results
The steps are the audit trail. Each line names a rule and where it fired. If a result surprises you, the steps show whether the surprise is a rule applied correctly to something you typed differently than you meant (the usual case: 2x^2 parsed as 2(x²) versus (2x)² is the classic), or a genuine subtlety like a chain factor.
The plot shows f in navy and the requested derivative in green on the same axes, windowed around your evaluation point. Where the green curve crosses zero, the navy curve has a horizontal tangent; where green is positive, navy climbs. That single picture is most of first-semester calculus, and it is also a strong check: a computed derivative that does not match the visible slope pattern is wrong, whatever produced it.
Exact first, decimal at the point. The derivative itself is symbolic and exact (fractions stay fractions). Values at a point are decimals, because points are where numbers live; transcendental values like cos(2) are evaluated there, not in the symbolic result.
Common mistakes
- Forgetting the chain factor. The derivative of sin(2x) is 2cos(2x), not cos(2x): the inner derivative multiplies. Every function step here appends the u′ factor explicitly so it can be seen.
- Differentiating a product term by term. (uv)′ is not u′v′. The product rule keeps both cross terms; the steps name it when it fires.
- Quotient-rule order. It is u′v − uv′ in the numerator; swapping gives the negative of the answer. The mnemonic “low d-high minus high d-low” encodes exactly that order.
- Treating y as constant in an implicit problem (or as a variable in a partial one). The modes keep these apart deliberately: in a partial, the other variable is a constant; in implicit work, y is a function of x, which is the entire point.
- Directional derivative with an unnormalised vector. Dotting the gradient with the raw direction scales the answer by the vector’s length. The tool normalises first and shows the unit vector, so the number is the rate per unit distance.
- Expecting a derivative where none exists. Corners (|x| at 0), cusps and vertical tangents have no derivative. This tool differentiates expressions, and an expression like sqrt(x) at 0 yields an undefined point value, flagged as such; it will not invent a slope.
Limitations
- The grammar covers polynomials, rational expressions, powers (including variable exponents), the standard trigonometric, inverse trigonometric, exponential and logarithmic functions, and compositions of them. Piecewise functions, absolute values, sums and series, and special functions are outside it, and unparseable input is refused with the position of the problem rather than silently misread.
- Simplification is structural (constants, zeros, ones, coefficient gathering), not a full algebra system: an answer may appear in a correct but unsimplified dress, for instance 2x / x² where 2/x exists. The values at a point are unaffected.
- L’Hôpital’s rule is a technique for limits of indeterminate forms, applied by differentiating numerator and denominator separately; it belongs to a limits workflow. The derivatives it needs are exactly what this tool produces, one part at a time.
- Logarithmic differentiation as a named technique (for products of many factors, or y given implicitly as a function equation) is represented here by the general power rule and the implicit mode; a general equation solver for y in terms of x is the Equation Solver’s job, linked below.
- Directional and partial work covers two variables, x and y, which is where the brief for this page sits; three-variable gradients are the same idea with a third partial.
Frequently asked questions
What is a derivative, in plain terms?
The rate at which the output changes as the input changes, at a specific point: the slope of the curve there. f′(1) = −1 in Example 1 says that at x = 1 the function is falling exactly as fast as the line y = −x does. Everything here, partials and gradients included, is that one idea wearing different numbers of variables.
How do I type expressions?
Use + − * / ^, parentheses, the functions sin cos tan asin acos atan exp ln log sqrt, and the constants pi and e. Multiplication can be implicit (2x, 3(x+1)). Powers bind tighter than multiplication, so 2x^2 means 2(x²); write (2x)^2 if you mean the other. Variables are single letters: x, and y in the two-variable modes.
What is the difference between a partial and an ordinary derivative?
An ordinary derivative assumes one input. A partial derivative differentiates a multi-variable function with respect to one variable while freezing the others as constants: ∂/∂x of x²y is 2xy because the y simply behaves like the number 2 does in 2x². The gradient then collects all the partials into the vector that points uphill.
Why does the directional derivative need a unit vector?
Because “rate of change in a direction” only makes sense per unit of distance travelled. Dotting the gradient with an unnormalised (3, 4) instead of (0.6, 0.8) would inflate the answer fivefold, by exactly the vector’s length. The tool normalises and shows the unit vector so the step is visible.
Can this do L’Hôpital’s rule?
Indirectly: L’Hôpital replaces a 0/0 or ∞/∞ limit with the limit of the ratio of the derivatives. This tool produces those derivatives (differentiate the numerator and denominator separately, in single mode), but evaluating the limit itself is a limits workflow, not a differentiation one, and belongs to a limits tool.
Why is my derivative “undefined” at the point I chose?
Because at that point it is: division by zero (1/x at 0), a logarithm of a non-positive number, a square root of a negative, or a vertical tangent all leave the derivative without a finite value there. The symbolic derivative is still shown; the point value is flagged instead of filled with a plausible-looking wrong number.
Related calculators
- Math calculators
- Integral Calculator: the reverse operation, antiderivatives and definite integrals.
- Function Calculator: evaluate and analyse functions without differentiating them.
- Graphing Calculator: fuller plotting, multiple functions and tracing.
- Maximum and Minimum Calculator: where derivatives vanish, extrema classified.
Method: the expression is parsed into a tree and differentiated symbolically with exact fraction coefficients (power, product, quotient, chain and general power rules; partials by freezing the other variable; directional derivative as the gradient dotted with the normalised direction; implicit dy/dx as -Fx/Fy). Point values come from substituting into the symbolic result, and examples were verified against symmetric difference quotients away from singularities. Last reviewed: 21 October 2026.
Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice.
