Derivative Calculator

Differentiate a function of x and see each rule as it is used: power, product, quotient and chain rules, and the derivatives of trig, exponential and log functions. Get higher derivatives up to the 10th, the slope at a point, the tangent line and a graph of f and f′.

Calculator Numbers & Math Updated Oct 3, 2026
How to Use
  1. Type f(x), for example x^3 - 4x + 1, sin(3x) or (x^2+1)/(x-1). Use ^ for powers, * or nothing between factors (2x), and brackets round function arguments: sin(x), ln(x), sqrt(x), e^x.
  2. Choose the order: 1 for f′(x), 2 for f″(x), and so on up to the 10th derivative.
  3. To get a slope, type a point a such as 2, -1.5 or pi/2. The calculator gives the derivative there, f(a) and the tangent line.
  4. Show Work names each rule as it is used (power, product, quotient, chain) with the pieces u, v, u′ and v′, then every derivative up to the order you chose.
  5. The graph draws f in the accent colour, f′ in blue and the tangent line dashed. Where the blue curve crosses zero, f has a flat point.
d/dx f(x)
function
1st to 10th
optional
Presets
f, f′ and the tangent line
Derivative
—
Value at the point
—
Tangent line
—
Function value
—

Worked Example

Product rule: f(x) = x²·eˣ. Take u = x² and v = eˣ, so u′ = 2x and v′ = eˣ. Then f′(x) = u′v + uv′ = 2x·eˣ + x²·eˣ, which factors as x·eˣ(x + 2). At x = 1 the slope is 2e + e = 3e ≈ 8.155, f(1) = e ≈ 2.718, and the tangent line is y = e + 3e(x − 1) ≈ 8.155x − 5.437.

Quotient rule: f(x) = (x² + 1)/(x − 1). With u = x² + 1 and v = x − 1, f′(x) = (2x(x − 1) − (x² + 1) · 1)/(x − 1)² = (x² − 2x − 1)/(x − 1)². At x = 2: f′(2) = (4 − 4 − 1)/1 = −1 and f(2) = 5/1 = 5, so the tangent line is y = 5 − (x − 2) = −x + 7. Differentiating again gives f″(x) = 4/(x − 1)³.

The common mistake: forgetting the chain rule. d/dx sin(3x) is not cos(3x) but 3cos(3x): the inner function 3x has derivative 3. At x = 0 the slope is 3, not 1, because sin(3x) climbs three times as steeply as sin(x) through the origin. In the same way d/dx (x² + 1)⁵ is 10x(x² + 1)⁴, not 5(x² + 1)⁴.

Show Work

Enter a function to see the rules used, step by step.

Formulas

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(g(x)) = f′(g(x)) · g′(x)
Exponentials and logs
(eˣ)′ = eˣ, (aˣ)′ = aˣ ln a, (ln x)′ = 1/x
Trig
(sin x)′ = cos x, (cos x)′ = −sin x, (tan x)′ = sec² x
Tangent line at x = a
y = f(a) + f′(a)(x − a)
Definition
f′(x) = lim h→0 (f(x + h) − f(x)) / h

Newton, Leibniz and the Derivative

Isaac Newton worked out his “method of fluxions” in 1665–1666, treating a curve as traced by a moving point and its slope as a rate of change; the book itself was published only in 1736, after his death. Gottfried Wilhelm Leibniz reached the same ideas independently and published first, in his 1684 paper Nova Methodus pro Maximis et Minimis, which introduced the dx and dy notation and the product and quotient rules. The two men’s supporters then argued for decades over who had priority.

The prime notation f′(x) comes from Joseph-Louis Lagrange’s Théorie des fonctions analytiques of 1797. Neither Newton nor Leibniz had a precise meaning for an “infinitely small” change; Augustin-Louis Cauchy’s lectures of the 1820s put the derivative on the limit definition still taught today.

About This Tool

This calculator differentiates symbolically with the same engine as the Calculus Workbench, then tidies the answer: it collects like terms, merges powers, cancels common factors and keeps a fraction over one denominator, so the 2nd derivative of (x² + 1)/(x − 1) comes out as 4/(x − 1)³ rather than a page of brackets. It handles polynomials, powers and roots, products and quotients, sin, cos, tan, sec, csc and cot, their inverses, sinh, cosh and tanh, eˣ, aˣ, ln, log10 and |x|, up to the 10th derivative. Values at a point are exact when they can be, such as f′(2) = 8 for x³ − 4x + 1 or f(1) = ln(2) for ln(x² + 1), with a decimal alongside.

Use it to check homework, to find a slope or tangent line, or to see which rule applies where. For limits, Taylor series, critical points or related rates, use the Calculus Workbench.

Everything runs in your browser; nothing is sent anywhere.

Related tools: Calculus Workbench, Integral Calculator, and Graphing Calculator.

Frequently Asked Questions

How do I use the chain rule?

Differentiate the outer function, leave the inner one as it is, then multiply by the derivative of the inner one. For sin(3x) the outer function is sin, with derivative cos, and the inner 3x has derivative 3, so d/dx sin(3x) = 3cos(3x). For (x² + 1)⁵ it is 5(x² + 1)⁴ · 2x = 10x(x² + 1)⁴.

When do I use the product rule or the quotient rule?

The product rule is for f·g: (fg)′ = f′g + fg′. For x²·eˣ that gives 2x·eˣ + x²·eˣ, which is 3e ≈ 8.155 at x = 1. The quotient rule is for f/g: (f/g)′ = (f′g − fg′)/g². For (x² + 1)/(x − 1) it gives (2x(x − 1) − (x² + 1))/(x − 1)² = (x² − 2x − 1)/(x − 1)², which is −1 at x = 2.

How do I find the equation of a tangent line?

Work out f(a) and f′(a), then use y = f(a) + f′(a)(x − a). For f(x) = x³ − 4x + 1 at a = 2: f(2) = 8 − 8 + 1 = 1 and f′(2) = 3 · 4 − 4 = 8, so y = 1 + 8(x − 2), which is y = 8x − 15.

What does the second derivative tell me?

How the slope itself is changing. Where f″ > 0 the graph curves upward, and where f″ < 0 it curves downward. For x³ − 4x + 1, f″(x) = 6x, so the curve bends down for x < 0 and up for x > 0, with an inflection point at x = 0. It also sorts flat points: f′(x) = 3x² − 4 is zero at x = ±1.155, and f″(1.155) = 6.93 > 0, so x = 1.155 is a local minimum.

What are the derivatives of eˣ, ln(x) and the trig functions?

d/dx eˣ = eˣ, d/dx ln(x) = 1/x, d/dx sin(x) = cos(x), d/dx cos(x) = −sin(x) and d/dx tan(x) = sec²(x). For other bases, d/dx aˣ = aˣ·ln(a), so the slope of 2ˣ at x = 0 is ln 2 ≈ 0.693. Here log(x) means the natural log; type log10(x) for base 10, whose derivative is 1/(x·ln 10).

How do I use the Derivative Calculator?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Homework check

d/dx (x² + 1)/(x − 1) = (x² − 2x − 1)/(x − 1)², with the quotient rule laid out.

Velocity from position

s(t) = 4.9t² has v(t) = 9.8t, so 29.4 m/s at t = 3 s.

Marginal cost

C(q) = 0.02q² + 5q + 300 has C′(q) = 0.04q + 5: the 100th unit costs about 9.

Tangent lines

√x at x = 4 has slope 1/4 and tangent line y = x/4 + 1.

Concavity

x³ − 4x + 1 has f″(x) = 6x, which changes sign at the inflection point x = 0.

Last updated: