Enter a function and get the derivative, the steps, the tangent and a sign chart at once
This derivative calculator reads the function you type, finds its first, second and third derivatives, and shows which differentiation rule it used at each step. The starting function x3−3x2−9x+5 has the derivative 3x2−6x−9. At x = 2 the function value is −17, the slope of the tangent is −9, and the tangent line is y = −9x+1.
The calculator also shows what the answer means. The upper graph draws the function with its tangent, and the lower graph draws the derivative and its sign on the same horizontal axis. Click or drag the graph to change the point, and on first load a secant line slides toward the tangent so you can see the definition of the derivative at work. The sign chart lists the local maxima, local minima and inflection points found in the visible interval.
Why take a derivative?
The derivative gives the instantaneous rate of change: how steeply the curve rises or falls at each point. Take the slope of the secant line, (f(a + h) − f(a))/h, and let h shrink toward 0. The limit is the slope f′(a) of the tangent at that point. That one number answers more questions than you might expect.
- How fast is it changing right now? The derivative of position s(t) is velocity, and the derivative of velocity is acceleration. In economics, the derivative of a cost function with respect to output is the marginal cost.
- Where is it largest or smallest? A local maximum or minimum can only occur where the derivative is 0 or does not exist. Problems such as finding the box of greatest volume or the shape that uses the least material all start from this fact.
- What does it look like near a point? The tangent line is the straight line that best imitates the curve near that point, and the sign of the second derivative tells you whether the curve is concave up or concave down.
That makes the calculator useful for checking homework and exam practice, for finding the step where a rule was chosen wrongly, and for seeing the shape of a function when the formula alone gives no feeling for it.
How to use the calculator
- Type the function in the f(x) box. You can type on the keyboard or use the buttons under the box (^, √, parentheses, sin, cos, tan, ln, eˣ, π, |x|). The six example buttons insert a typical function for each rule.
- Check “Parsed as” just below the box to see how the calculator read your input. If a parenthesis is not closed or a name is not recognized, the message points to the place to fix.
- If the expression has more than one letter, choose the variable to differentiate with respect to. The other letters are treated as constants. The order buttons choose whether the 1st, 2nd or 3rd derivative is shown large with its working, and you can also click the f′, f″ or f‴ line in the result.
- Enter a number as the value of x and the strip under the result shows the function value, the slope of the tangent, the second derivative and the tangent line at that point. Expressions such as π/2, 1/3 or -2 work too.
- Click or drag the graph to move the point there, or focus the graph and use ← →. The −, + and fit buttons change the visible interval, and the sign chart is rebuilt for it. The “Secant → tangent” button replays the secant line approaching the tangent.
- “Copy result” copies the function, its three derivatives, and the value and tangent at your point as text. Expressions are written like 2*x^2, so you can paste them straight back into this calculator or another math tool. “Copy link” copies an address that contains the current expression and point.
Entering expressions
Here is how textbook notation maps to the keyboard. The right-hand column shows what the calculator actually read.
| Notation | You type | Read as |
|---|---|---|
| The multiplication sign can be left out | 2x(x+1) | 2x(x+1) |
| Powers with ^ or a superscript | x^3, x³ | x3 |
| Square and cube roots | sqrt(x+1), √x, cbrt(x) | √x+1 |
| Without parentheses, a function takes the next chunk | sin 2x | sin(2x) |
| Powers of trigonometric functions | sin^2 x, sin²x | sin2x |
| Inverse trigonometric functions | arcsin(x), sin^-1 x | arcsinx |
| Exponential function | e^(2x), exp(2x) | e2x |
| Natural and common logarithm | ln x, log x | lnx, logx (base 10) |
| Absolute value | |x-1|, abs(x-1) | |x−1| |
| Division works from the left | 1/2x | 12x |
As the last row shows, 1/2x is read as (1/2)·x. If you meant 1/(2x), add the parentheses. Write the decimal point as a period, the constant pi as π or pi, and Euler's number as e. Letters are read one at a time, so xy means x·y.
Differentiation formulas at a glance
In the table below, each right-hand entry is this calculator's derivative of the function to its left. Compare it with the formula in your textbook.
| Function | Derivative | Function | Derivative |
|---|---|---|---|
| xn | nxn−1 | sinx | cosx |
| √x | 12√x | cosx | −sinx |
| 1x | −1x2 | tanx | sec2x |
| ex | ex | secx | secxtanx |
| ax | axlna | cscx | −cscxcotx |
| lnx | 1x | cotx | −csc2x |
| logx | 1xln10 | arcsinx | 1√1−x2 |
| |x| | x|x| | arctanx | 1x2+1 |
When functions are added, multiplied or nested, you need the rules below. The rule chip on each step of the working uses the same names as the left column of this table.
| Rule | Formula | Example | Result |
|---|---|---|---|
| Sum/difference rule | (u ± v)′ = u′ ± v′ | x3+sinx | 3x2+cosx |
| Constant multiple | (cu)′ = cu′ | 5lnx | 5x |
| Product rule | (uv)′ = u′v + uv′ | x2sinx | 2xsinx+x2cosx |
| Quotient rule | (u/v)′ = (u′v − uv′)/v² | sinxx | xcosx−sinxx2 |
| Chain rule | {f(g(x))}′ = f′(g(x))·g′(x) | (x2+1)5 | 10x(x2+1)4 |
| Logarithmic differentiation | (uᵛ)′ = uᵛ(v′ ln u + vu′/u) | xx | xx(lnx+1) |
Worked examples: the quotient rule and the chain rule
A fraction: x2+1x−1
Let u = x² + 1 and v = x − 1, so u′ = 2x and v′ = 1. The quotient rule (u′v − uv′)/v² gives a numerator of 2x(x − 1) − (x² + 1) = x² − 2x − 1, so the derivative is x2−2x−1(x−1)2. You need this rule only when the denominator contains the variable. For x²/5, where the denominator is a constant, the constant multiple rule is enough.
At x = 3 the function value is 5 and the slope is 12, so the tangent is y = x2+72. The second derivative is 4(x−1)3. The calculator expands the numerator and cancels it against the factor (x − 1) in the denominator to reach this form.
A root with an expression inside: √3x2+1
The outer function is √u and the inner function is u = 3x² + 1. Multiply (√u)′ = 1/(2√u) by the inner derivative 6x to get 3x√3x2+1. If you forget to multiply by the inner derivative you get the wrong answer 1/(2√(3x² + 1)). In the working, that factor appears separately as (3x² + 1)′.
At x = 1 the function value is 2, the slope is 32, and the tangent is y = 3x2+12. The second derivative is 3(3x2+1)32. After combining the two terms over a common denominator, the x² in the numerator cancels and only a constant is left.
How to read the sign chart
For the starting function x3−3x2−9x+5, the derivative 3x2−6x−9 = 3(x + 1)(x − 3) is 0 at x = −1 and x = 3. The sign of the second derivative 6x−6 changes at x = 1. Splitting the line at these points gives the following chart.
| x | x < −1 | −1 | −1 < x < 1 | 1 | 1 < x < 3 | 3 | x > 3 |
|---|---|---|---|---|---|---|---|
| f′(x) | + | 0 | − | − | − | 0 | + |
| f″(x) | − | − | − | 0 | + | + | + |
| f(x) | increasing, concave down | local max 10 | decreasing, concave down | inflection point −6 | decreasing, concave up | local min −22 | increasing, concave up |
- A point where f′ changes from + to − is a local maximum, and a point where it changes from − to + is a local minimum. If the sign does not change, the point is not an extremum even when f′ = 0. The point x = 0 of x³ is an example.
- Where f″ > 0 the curve is concave up, and where f″ < 0 it is concave down. A point where the concavity changes is an inflection point.
- In the calculator's chart, the f(x) row draws small curve shapes for increasing, decreasing and concavity. A point where the denominator is 0 is marked “Undefined”, and a corner such as the one at 0 for |x| is marked “DNE” in the f′ cell.
Finding the equation of a tangent line
The tangent at x = a passes through the point (a, f(a)) with slope f′(a), so its equation is y − f(a) = f′(a)(x − a). In the starting example f(2) = −17 and f′(2) = −9, so y + 17 = −9(x − 2), which simplifies to y = −9x+1. If the point and the result can both be written exactly as fractions, the calculator shows fractions. When an exact value such as π/2 cannot be written as a fraction, it shows an approximation to six significant digits marked with ≈. For example, the slope of x2sinx at x = π/2 is π, and it appears as ≈ 3.14159.
A slope of 0 means the tangent is a horizontal line, and the point may be a local maximum or minimum. If the derivative is not defined at your point, for example for |x| at x = 0, no tangent can be drawn and the calculator shows “Not differentiable”.
Common mistakes
- sin²x versus sin(x²): the derivative of sin2x is 2sinxcosx, and the derivative of sin(x2) is 2xcos(x2). A different bracket position makes a completely different function.
- Forgetting the inner derivative: the derivative of sin(3x+1) is not cos(3x + 1) but 3cos(3x+1). Whenever the bracket holds more than a lone x, the chain rule applies.
- Order in the quotient rule: the numerator is u′v − uv′. Swapping the order gives an answer with the opposite sign.
- eˣ versus xᵉ: the derivative of ex is ex, and the derivative of xe is exe−1. A variable in the exponent means an exponential function, and a variable in the base means the power rule.
- Using the power rule on xˣ: when both the base and the exponent contain the variable, x·xˣ⁻¹ is wrong. Use logarithmic differentiation, which gives xx(lnx+1).
- log versus ln: in this calculator, log without a base is the common logarithm (base 10). Write ln for the natural logarithm, so that the derivative is 1/x.
Limits and cautions
- When simplifying, the calculator collects like terms, combines terms over a common denominator, and cancels polynomials that divide exactly. It does not apply trigonometric identities such as sin²x + cos²x = 1, so an answer can look different from the textbook. In that case substitute any value into both expressions and compare.
- Cancelling assumes the cancelled factor is not 0. At a point where the original function is not defined, the derivative is not given either.
- The local maxima, minima and inflection points in the chart and the graph come from splitting the visible interval into 600 steps and looking for sign changes. Unless a value is an integer or a simple fraction, it is an approximation (≈) to four decimal places, and two points that lie very close together, or a point outside the interval, may not appear. Use the −, + and fit buttons to change the interval.
- The calculator only differentiates. It does not integrate, take limits, differentiate implicitly, or differentiate parametric curves. For an expression with several letters it differentiates with respect to the chosen variable and treats the rest as constants, which is a partial derivative.
- It works with real numbers only. ln x has a value only for x > 0 and √x only for x ≥ 0, and other points are left empty on the graph.
Sources
Basis date The differentiation formulas are mathematical definitions and do not change. The sources were checked on 2026-10-20, and every expression and value in the text was calculated with this calculator.
- 01OpenStax — Calculus Volume 1, 3.1 Defining the DerivativeThe limit of secant lines approaching the tangent; the slope of the tangent equals the rate of change at that point
- 02OpenStax — Calculus Volume 1, 3.3 Differentiation RulesPower, product and quotient rules
- 03OpenStax — Calculus Volume 1, 3.4 Derivatives as Rates of ChangeVelocity v(t) = s′(t), acceleration a(t) = s″(t), and marginal cost as the derivative of the cost function
- 04OpenStax — Calculus Volume 1, 3.5 Derivatives of Trigonometric FunctionsDerivatives of trigonometric functions, such as (tan x)′ = sec²x
- 05OpenStax — Calculus Volume 1, 3.6 The Chain RuleThe chain rule, h′(x) = f′(g(x))·g′(x)
- 06OpenStax — Calculus Volume 1, 3.7 Derivatives of Inverse FunctionsDerivatives of the inverse trigonometric functions
- 07OpenStax — Calculus Volume 1, 3.9 Derivatives of Exponential and Logarithmic Functions(ln x)′ = 1/x, (log_b x)′ = 1/(x ln b), and logarithmic differentiation
- 08OpenStax — Calculus Volume 1, 4.3 Maxima and MinimaCritical points: where f′(c) = 0 or f′(c) is not defined
- 09OpenStax — Calculus Volume 1, 4.5 Derivatives and the Shape of a GraphThe first derivative test, f″ > 0 means concave up, and inflection points
- 10NIST Digital Library of Mathematical Functions §4.20 Derivatives and Differential EquationsStandard formulas for the derivatives of trigonometric functions
Frequently asked questions
How do I enter an expression in the derivative calculator?
Type it as in a textbook, writing powers with ^. You can leave out the multiplication sign, as in 2x, 3sin x and (x+1)(x−1). Write square roots as sqrt(x) or √x, the natural logarithm as ln x, pi as π or pi, Euler's number as e, and absolute value as |x|. “Parsed as”, under the box, shows how the calculator read your input as a formula, so you can check at once that the parentheses went where you meant.
What is the difference between log x and ln x?
ln x is the natural logarithm with base e. In this calculator, log x without a base is the common logarithm with base 10. So the derivative of ln x is 1/x and the derivative of log x is 1/(x ln 10). Write a base-2 logarithm as log2(x). If your textbook problem means the natural logarithm, enter it as ln or the answer will not match.
How do I enter sin²x?
Any of sin^2 x, sin²x or sin(x)^2 is read as (sin x)². Note that sin(x^2) is the sine of x², a completely different function. The derivative of the first is 2 sin x cos x, and the derivative of the second is 2x cos(x²). Writing sin^-1 x is read as the inverse function arcsin x.
How do I read the step-by-step working?
Each step has a chip at the top naming the rule used in that step, with its formula beside it. In the expressions below, a part such as (u)′ with a prime after the bracket has not been differentiated yet, and the next step differentiates it separately. Short polynomials and basic functions such as sin x are differentiated on the spot. The last step, “Simplify”, collects like terms and combines and cancels fractions to give the final answer.
My answer in the book looks different from the calculator's. Is one of them wrong?
Usually only the form differs and the value is the same. The calculator collects like terms and combines and cancels fractions, but it does not apply trigonometric identities such as sin²x + cos²x = 1, and it does not factor. To check, enter any number as the value of x and compare the derivative value in the result with the book's answer at the same number. If the two values agree, they are the same function.
How do I find the equation of a tangent line?
The tangent at x = a is y − f(a) = f′(a)(x − a). Enter a as the value of x and the strip under the result shows the function value f(a), the slope f′(a) and the simplified tangent line together. For example, for x³ − 3x² − 9x + 5 at x = 2, f(2) = −17 and f′(2) = −9, so the tangent is y = −9x + 1. If a value is not an exact fraction, the calculator shows a decimal approximation marked with ≈.
How is the sign chart made?
The visible interval of the graph is split into 600 steps, and the calculator looks for places where the sign of f′ or f″ changes, where f′ does not exist, and where the function breaks. Each becomes a column. Between the columns it shows the signs of f′ and f″, whether the function increases or decreases, and the concavity, and it writes the function value at each local maximum, local minimum and inflection point. A value that is not an integer or a simple fraction is an approximation to four decimal places. When you zoom in or out, or press fit, the sign chart is rebuilt.
Can it differentiate an expression with several letters?
Yes. Each single letter in the expression goes into the list of variables to differentiate with respect to, and the calculator differentiates only with respect to the chosen letter and treats the others as constants. This is a partial derivative. For example, a x^2 differentiated with respect to x gives 2ax, and entering s(t) = t^3 − 6t^2 and choosing the variable t gives 3t² − 12t. Letters written together, such as xy, are read as x·y.