What Is a Derivative?
A derivative calculator answers the question: how fast is this changing, right here? A function like x^3 grows slowly near zero and quickly further out; its derivative, 3x^2, is the machine that reports that speed at any point you choose. At x = 1 the speed is 3, at x = 2 it is 12, at x = 0 the graph is momentarily flat and the derivative is 0. Geometrically the derivative is the slope of the tangent line — the line that just touches the curve at that point — which is why derivative problems and slope problems are the same problem wearing different clothes, a connection the Slope Calculator explores from the other side.
Formally, the derivative is defined as a limit of average rates of change over shrinking intervals. That definition is how the rules are proved, but almost nobody differentiates from the definition day to day. Instead, calculus supplies a small set of rules — the power rule, the product rule, the quotient rule and the chain rule, plus a short list of standard derivatives — and every elementary derivative is assembled from them. That is exactly how this calculator works: a small expression parser in JavaScript reads your function, builds its structure, and applies those same rules mechanically, showing you which rules it used. There is no approximation and no lookup table of answers; the working is the real working, done symbolically.
How This Calculator Works: Parser and Rules
When you type an expression, three things happen. First, a tokeniser splits your text into numbers, the variable x, operators, brackets and function names. Second, a recursive-descent parser builds a tree that respects the order of operations — powers bind tightest, then multiplication and division, then addition and subtraction — including implicit multiplication, so 2x and 3sin(x) parse the way a student means them. Third, the differentiator walks the tree applying the rules, and a simplifier tidies the result: constants are folded, terms multiplied by 0 or 1 disappear, and common factors are pulled out of sums, which is how 2x·e^x + x^2·e^x becomes the textbook form e^x(x^2 + 2x).
| Supported | How to type it | Example |
|---|---|---|
| Polynomials and powers | x^3, 2x^2 - 5x + 7 | d/dx = 6x − 5 for 3x^2 − 5x + 7 |
| Products | x^2*e^x, x*sin(x) | Product rule applied |
| Quotients | x/(x+1), sin(x)/x | Quotient rule applied |
| Trigonometric | sin(x), cos(x), tan(x) | Radians, as in all calculus |
| Exponential and logs | e^x, exp(x), ln(x), log(x) | log is base 10; ln is natural |
| Roots | sqrt(x), x^(1/2) | Both forms supported |
| Chains (composition) | sin(3x), ln(x^2), e^(2x) | Chain rule applied |
| Evaluate at a point | Set the x₀ box | Shows f′(x₀) and f(x₀) numerically |
One variable only — x — and one derivative at a time. The limits section near the end of this guide lists everything deliberately not supported, and unsupported input produces a plain error message naming the problem, never a fabricated answer.
The Differentiation Rules This Calculator Uses
Every result on this page is built from the rules in this table and nothing else. Learning to recognise which rule a problem needs is most of learning differentiation. Sums and differences are differentiated term by term. Products and quotients have their own rules because the derivative of a product is not the product of the derivatives — the single most important warning in this topic. Composition — a function of a function — is handled by the chain rule, which multiplies by the derivative of the inside. Powers, exponentials, logarithms and the three trigonometric functions each contribute one standard result.
| Rule | Statement | Used for |
|---|---|---|
| Power rule | d/dx x^n = n·x^(n−1) | x^3 → 3x^2; sqrt(x) → 1/(2sqrt(x)) |
| Sum / difference | (u ± v)′ = u′ ± v′ | Term-by-term work in polynomials |
| Product rule | (uv)′ = u′v + uv′ | x^2·e^x → e^x(x^2 + 2x) |
| Quotient rule | (u/v)′ = (u′v − uv′) / v^2 | x/(x+1) → 1/(x+1)^2 |
| Chain rule | d/dx f(g(x)) = f′(g(x)) · g′(x) | sin(3x) → 3cos(3x) |
| Exponential | d/dx e^x = e^x; d/dx ln x = 1/x | Growth and decay functions |
| Trigonometric | sin′ = cos; cos′ = −sin; tan′ = 1/cos^2 | Waves and oscillation |
The calculator lists the rules it applied, in the order it applied them, under every result. If your hand working used a different rule from the one shown, that difference is the first place to look for the mistake — in yours or, occasionally, in how the expression was typed.
Worked Examples: x^3, sin(x) and x^2·e^x
Example one: x^3. The power rule says bring the exponent down and subtract one from it: 3 · x^(3−1) = 3x^2. Nothing else is involved, which is why powers are always the first thing to look for in a new problem. Example two: sin(x). This is a standard derivative, memorised rather than derived in daily work: sin differentiates to cos. Its partner is just as important — cos differentiates to −sin, and the minus sign is the most dropped symbol in elementary calculus. Example three: x^2·e^x. This is a product of two functions of x, so the product rule applies: the derivative of x^2 is 2x, the derivative of e^x is e^x, giving 2x·e^x + x^2·e^x. Both terms contain e^x, so it factorises to the cleaner e^x(x^2 + 2x).
Each example is also a check on the evaluate-at-a-point mode. The derivative of x^3 at x = 2 is 3 · 4 = 12. The derivative of sin(x) at x = 0 is cos(0) = 1 — at the origin the sine curve climbs at 45 degrees, its steepest. The derivative of x^2·e^x at x = 1 is e^1 · (1 + 2) = 3e ≈ 8.1548, while the function itself there is e ≈ 2.7183. Type any of the three into the workbench and set the point; the figures should match to four decimal places. If they do not, the guide's mistakes section covers the usual causes, starting with degrees-versus-radians.
Reading the Step-by-Step Working
The steps panel names each rule as it fires. For x^2·e^x it reports the product rule first, then the power rule for x^2 and the exponential rule for e^x. For sin(3x) it reports the chain rule with the derivative of sin, and the power rule for the inner 3x. Reading the list top to bottom reconstructs the solution the way a teacher would narrate it: identify the outermost structure, apply its rule, then recurse into the pieces. That narration is the real study value of the tool — a bare answer tells you whether you were right, but the rule list tells you where your method diverged when you were not.
Two honest qualifications. First, the list shows rules, not every micro-simplification: when the parser folds 3 − 1 into 2 or cancels a term multiplied by zero, it does so silently, because narrating arithmetic would bury the calculus. Second, the simplifier aims for the conventional textbook form — factorised where a clean common factor exists, constants gathered at the front — but mathematically equivalent forms are still equivalent. If your answer is 2x·e^x + x^2·e^x and the page shows e^x(x^2 + 2x), neither is wrong; factorising is presentation, not mathematics. The evaluate-at-a-point figure is the fastest arbiter: two correct forms give the same number at every point.
Evaluating a Derivative at a Point
A derivative is itself a function, and often the number at one point is what a problem actually wants. The slope of the tangent to y = x^3 at x = 2 is 12. The instantaneous speed of a falling object, the marginal cost of the next unit, the sensitivity of a measurement to a small error — all are derivatives evaluated at a point. The workbench therefore carries an x₀ box: set it and the page evaluates both the original function and its derivative there, by substituting into the parsed trees, so the numbers always belong to the expression you actually typed rather than to a re-typed copy.
Evaluation is also the calculator's built-in lie detector, and it is worth using on your own hand work too. Pick any point, compute your derivative there by hand, and compare. A symbolic slip — a dropped minus sign, a forgotten chain-rule factor — survives a visual check surprisingly often, but it almost never survives a numeric check at a well-chosen point. Choose points that are easy in your head (0, 1, 2) and avoid points where the function is undefined: ln(x) and 1/x misbehave at and below zero, and tan(x) at odd multiples of π/2, and the page will report those honestly as undefined rather than dress up an infinity as a number. For general arithmetic checks beyond calculus, the Scientific Calculator is the companion tool.
Notation: f′, dy/dx and What the Symbols Mean
Three notations dominate, and this page uses the first two interchangeably. Lagrange's notation writes f′(x), read f prime of x — compact, and the natural choice when the function has a name. Leibniz's notation writes dy/dx, read dee y by dee x — longer, but it remembers which variable is which, and it makes the chain rule look like cancelling fractions, dy/dx = dy/du · du/dx, which is a memory aid generations of students have leaned on. Newton's dot notation survives mainly in physics for time derivatives. All three denote the same limit of the same difference quotient; a result in one notation is a result in all of them.
Two notation traps deserve naming. The prime in f′ is not an exponent, and f′(x) is not f(x) to any power — the calculator's input box follows the other convention, where ^ always means a power, so type x^3 for the cube and read the output's derivative as a new function rather than a power of the old one. And in the input, juxtaposition means multiplication: 2x, 3sin(x) and x·e^x typed as x*e^x are all products, and the product rule — not the power rule — governs every one of them. Much apparent disagreement between a student's answer and a calculator's is really a notation disagreement of exactly this kind.
Where Derivatives Are Used
Physics is the ancestral home: position differentiates to velocity, velocity to acceleration, and every equation of motion is a statement about derivatives. Economics runs on marginal quantities — marginal cost, marginal revenue, elasticity — which are derivatives wearing business clothes, asking what one more unit does rather than what the average unit did. Engineering uses derivatives for rates and sensitivities: how fast a tank drains, how much a beam's deflection changes with load, how a control system responds. Optimisation, the largest application of all, rests on one fact: at a smooth maximum or minimum the derivative is zero, so finding where f′(x) = 0 finds the best design, the cheapest mix, the fastest route.
In daily study the derivative is also a graph-reading tool. Where the derivative is positive the function climbs; where negative, it falls; where zero, the tangent is level and the graph has a peak, a trough or a pause. The evaluate-at-a-point mode turns that reading into numbers for any expression in the supported set. And the concept reaches back into the rest of this site: a slope is a derivative of a straight line, a percentage change is an average rate of change over an interval, and the derivative is what that average becomes as the interval shrinks to nothing — the thread connecting this page to the Percentage Change Calculator and the slope tools.
Common Differentiation Mistakes
Mistake one: differentiating a product as if it were a sum. The derivative of x·sin(x) is not 1·cos(x); the product rule gives sin(x) + x·cos(x). Whenever two factors both contain x, the product rule is mandatory. Mistake two: forgetting the chain rule's second half. The derivative of sin(3x) is 3cos(3x), not cos(3x) — the inner derivative, 3, must multiply through. Any bracket with more than a bare x inside it should trigger the question: did I multiply by the derivative of the inside? Mistake three: the power rule applied to exponentials. x^3 differentiates by the power rule, but 3^x and e^x do not: their derivatives keep the original function and multiply by a logarithm factor — e^x alone is unchanged.
Mistake four: degrees. Every derivative formula for trigonometric functions assumes radians. In degrees, the derivative of sin(x) acquires an ugly π/180 factor, which is why calculus banishes degrees entirely; this calculator works in radians throughout. Mistake five: sign slips on cos. The derivative of cos(x) is −sin(x), and the minus sign is lost in a remarkable share of student work — check it first when an answer disagrees by a sign. The steps panel exists for all five mistakes: compare its rule list with the rules you used, and the first divergence is almost always the error.
Supported Forms and Honest Limits
Supported, completely: addition, subtraction, multiplication, division and powers; brackets to any reasonable depth; implicit multiplication such as 2x or x(x+1); the functions sin, cos, tan, exp, ln, log (base 10) and sqrt; the constants e and pi; compositions of any of these, such as ln(sin(x)) or e^(x^2); and evaluation of the function and its derivative at a chosen point. The parser, differentiator and simplifier are deterministic — the same input always produces the same output, with no randomness and no approximation in the symbolic result.
Not supported, deliberately: any variable other than x; the remaining trigonometric functions (sec, csc, cot) and all inverse and hyperbolic functions; factorials, absolute values and piecewise definitions; sums and series; and anything involving a second variable, which rules out partial derivatives. These are exclusions of scope, not oversights: each would need machinery this page does not carry, and the parser rejects them with a named error rather than silently treating, say, a t as if it were a constant or an x. If your course problem needs those forms, a full computer-algebra system is the right tool, and this page's guide has taught you the rules such a system will apply.
What This Calculator Cannot Do
This calculator differentiates one function of one variable, once, within the supported set described above. It does not do implicit differentiation — equations like x^2 + y^2 = 25, where y is never isolated, need a different method that treats y as a function of x throughout. It does not do partial derivatives, related-rates setups, or differential equations, and it does not integrate: there is no antiderivative mode, and many innocent-looking functions have no elementary integral in any case. It does not plot graphs or find maxima and minima for you, though evaluating the derivative at candidate points is the standard first step of that work.
It also cannot judge whether differentiation is the right move for your problem, and its simplifier, while careful, may present a correct result in a different arrangement from your textbook's — factorised where the book expands, or the reverse. Use the numeric evaluation to confirm equivalence before assuming a mismatch is an error. Finally, the steps shown are the rules applied, not a formal proof: the limit definition that justifies each rule lives in the linked sources. A homework answer copied without the method is exactly as useful as it sounds; the rule list is there so the method travels with the answer.
Sources & References
- Wolfram MathWorld — Derivative (the formal definition and standard rules)
- Khan Academy — Differential Calculus: Derivative Introduction (limits, notation and intuition)
- Paul's Online Math Notes, Lamar University — The Definition of the Derivative
- Wikipedia — Derivative (rules, notation and applications)
- MIT OpenCourseWare — 18.01 Single Variable Calculus (the full university course this material comes from)
- Wolfram MathWorld — Chain Rule (statement and examples)
- Paul's Online Math Notes, Lamar University — Differentiation Formulas (the rule list this calculator implements)
Every derivative in this guide was produced by this page's own parser and rule engine, so you can reproduce each one exactly above.