Skip to content
CornerTools

Derivative Calculator

Differentiate any function step by step, with every rule named, higher derivatives, the slope and tangent at a point, and a graph.

Powers ^, sqrt( ), ln, log, log_2( ), e^x, |x|. Trig in radians.

Type a function and the calculator differentiates it the way it is done by hand, naming each rule as it applies it: the power, product, quotient and chain rules, the derivatives of eˣ, ln and the trig functions, and logarithmic differentiation for xˣ. It works out second and higher derivatives, partial derivatives when the function has more than one letter, and dy/dx of an equation in x and y by implicit differentiation.

Each answer is checked against the slope of the function measured numerically at three points before it is shown, and withheld if it disagrees. Give a point and it also finds the value there, the slope, and the tangent line, drawn on a graph of the function beside its derivative of the order asked for. All of it is worked out in your browser.

How to use it

Function is typed as you would write it, with multiplication by juxtaposition: 2x is 2 × x, and x sin x is x × sin(x). A leading f(x) = or y = only names the function. Trig functions work in radians.

Powers and roots
x^3, x³, x^(1/3), sqrt(x), √x, cbrt(x)
Exponentials
e^x, exp(x), 2^x
Logarithms
ln(x), log(x), log_2(x)
Trig
sin x, sin^2 x, sin^-1 x, asin x, sec x
Hyperbolic
sinh x, cosh^-1 x, atanh x
Other
|x|, floor(x), ceil(x), round(x), sign(x), π, e
Equation
x^2 + y^2 = 25

sin^2 x is (sin x)², and sin^-1 x is the inverse, asin x. A bare log is ln unless you set log means to log₁₀; the choice appears once the function has a bare log, and the Read as line under the field shows how the text was read. e is always the constant 2.718…; every other letter is a variable.

With respect to appears when the function has two or more letters: the others are held constant, which is a partial derivative, written ∂/∂x. Order goes from 1 to 10, each order working from the one before, with its steps under its own heading. An equation with = gives dy/dx, first order only.

At x = takes a number, π/6 or √2 as well (1e-3 alone is 0.001), and gives f, f′ and the tangent line there, exactly where the values come out exactly and as decimals otherwise. For an equation it is At (x, y), such as 3, 4.

How it works

The rules are applied from the outside in. A step shows the part a rule applies to and the formula it gives; a part that needs a rule of its own is left as d/dx[…] and worked out in a later step, while a part such as 3x has its derivative written straight in. The last step puts the pieces together and simplifies.

The simplified answer combines like terms and powers of the same base, and keeps every coefficient exact: 0.5x² gives x, not 1.0x. A quotient keeps its fraction: the numerator is multiplied out over the denominator squared, and a factor the two share is cancelled, so the second derivative of (x² + 1)/(x − 1) comes to 4/(x − 1)³. A function that simplifies before it is differentiated, such as x²/x, says where that holds: for x ≠ 0. A point is checked against the function as typed, so at x = 0 it says f(0) is undefined rather than giving the values of x.

Each answer is then checked numerically. The slope of the function is measured at −1.21, 0.37, 2.6 (moving on to other points where the function has no value there) by central differences, refined until two estimates agree, and compared with the answer's value. An answer that disagrees is not shown; one for a function with fewer than three such points is shown with a note that it was not checked. Higher orders are checked one order at a time, and dy/dx against −F_x/F_y at points found on the curve.

Power rule: d/dx xⁿ = n·xⁿ⁻¹
Product rule: (uv)′ = u′v + uv′
Quotient rule: (u/v)′ = (u′v − uv′)/v²
Chain rule: d/dx f(u) = f′(u)·u′
Logarithmic differentiation: (uᵛ)′ = uᵛ·(v′·ln u + v·u′/u)
Implicit: dy/dx = −F_x/F_y for F(x, y) = 0

Examples

A product with the chain rule

Function
x^2 sin(3x)

The product rule splits it into x² and sin(3x), and the chain rule differentiates sin(3x): 3x² cos(3x) + 2x sin(3x).

  1. Product rule: (uv)′ = u′v + uv′, with u = x² and v = sin(3x): d/dx[x² sin(3x)] = d/dx[x²]·sin(3x) + x²·d/dx[sin(3x)]​ ​ ​
  2. Power rule: d/dx[xⁿ] = nxⁿ⁻¹, with n = 2: d/dx[x²] = 2x
  3. Chain rule: sin(u) with u = 3x gives cos(u) · u′: d/dx[sin(3x)] = cos(3x)·3 ​
  4. Simplify: d/dx[x² sin(3x)] = 2x sin(3x) + x² cos(3x)·3 = 3x² cos(3x) + 2x sin(3x)​ ​ ​​ ​ ​

A quotient

Function
(x^2 + 1)/(x - 1)

The quotient rule gives (x² − 2x − 1)/(x − 1)², with the numerator multiplied out and the denominator kept as (x − 1)².

  1. Quotient rule: (u/v)′ = (u′v − uv′)/v², with u = x² + 1 and v = x − 1: d/dx[(x² + 1)/(x − 1)] = (d/dx[x² + 1]·(x − 1) − (x² + 1))/(x − 1)²
  2. Sum rule: differentiate term by term; a constant term gives 0: d/dx[x² + 1] = d/dx[x²]
  3. Power rule: d/dx[xⁿ] = nxⁿ⁻¹, with n = 2: d/dx[x²] = 2x
  4. Simplify: d/dx[(x² + 1)/(x − 1)] = (2x(x − 1) − (x² + 1))/(x − 1)² = (x² − 2x − 1)/(x − 1)²

The circle x² + y² = 25, implicitly

Function
x^2 + y^2 = 25
At (x, y)
3, 4

Differentiating both sides with y as a function of x gives 2x + 2y·y′ = 0, so dy/dx = −x/y. At (3, 4) the slope is −3/4 ≈ −0.75, and the tangent line is y = −3x/4 + 25/4.

The tangent to x³ at x = 2

Function
x^3
At x =
2

The power rule gives 3x². At x = 2 the curve is at f(2) = 8 with slope f′(2) = 12, so the tangent line is y = 12x − 16.

Derivatives of common functions

Each derivative as the calculator gives it, with a constant a
FunctionDerivative
x^nnx^(n − 1)
e^xe^x
a^xa^x ln(a)
ln(x)1/x
log_a(x)1/(x ln(a))
√x1/(2√x)
sin(x)cos(x)
cos(x)−sin(x)
tan(x)sec²(x)
sec(x)tan(x) sec(x)
csc(x)−csc(x) cot(x)
cot(x)−csc²(x)
asin(x)1/√(−x² + 1)
acos(x)−1/√(−x² + 1)
atan(x)1/(x² + 1)
sinh(x)cosh(x)
cosh(x)sinh(x)
tanh(x)1/cosh²(x)
|x|x/|x|

Frequently asked questions

Yes: they are two notations for the same derivative. f′(x), Lagrange's, names the function; dy/dx, Leibniz's, names the variables, and reads as the change in y for a small change in x. The calculator writes d/dx[f] for the operation and dy/dx for an equation in x and y.
The graph of |x| has a corner at 0: its slope is −1 just to the left and 1 just to the right, so no single slope fits. The calculator gives x/|x| for the derivative, which has no value at 0, and says so for a point there. √x at 0 has no derivative for another reason: the tangent there is vertical.
How the slope itself changes. Where it is positive the curve bends upward, and where it is negative it bends downward; a point where it changes sign is a point of inflection. Set Order to 2 for the second derivative, with its own steps from the first.
In calculus it usually is: NCERT's Class 12 text writes log x for logₑ x, so a bare log is read as ln here by default. On calculators and in school algebra log usually means log₁₀, which the log means toggle switches to. Then d/dx log₁₀ x is 1/(x ln 10) rather than 1/x.

See also