Derivative Calculator

Type any function of x, such as x^2 sin(x), e^(2x) or ln(x^2+1), to get its derivative with each rule shown step by step, plus higher derivatives, the slope at a point and the tangent line.

The derivative f′(x) is the slope of f(x) at each point: differentiate each term with the power rule d/dx[xⁿ] = n·xⁿ⁻¹, use the product rule (uv)′ = u′v + uv′ for products, the quotient rule (u/v)′ = (u′v − uv′)/v² for fractions, and the chain rule f(g(x))′ = f′(g(x))·g′(x) for a function inside another.

Use the Derivative Calculator

Enter a function

Use ^ for powers and parentheses for functions, e.g. x^2 sin(x), e^(2x), sqrt(x+1).

Examples

Functions: sin cos tan sec csc cot, arcsin arccos arctan, sinh cosh tanh, exp, ln, log (base 10), sqrt, cbrt, abs or |x|. Constants: pi (π), e. Other letters are treated as constants.

Derivative f′(x)

Enter a function to see its derivative.

Step-by-step working

Steps will appear here after you differentiate.

Derivative rules used by the calculator

u and v are functions of x and c is a constant. With the chain rule, multiply each result by the derivative of the inside function.

Rulef(x)f′(x)
Constantc0
Powerxⁿn·xⁿ⁻¹
Constant multiplec·uc·u′
Sum / differenceu ± vu′ ± v′
Productu·vu′v + uv′
Quotientu / v(u′v − uv′) / v²
Chainf(g(x))f′(g(x))·g′(x)
Exponentialeˣ · aˣeˣ · aˣ·ln a
Logarithmln x · log₁₀ x1/x · 1/(x ln 10)
Sine / cosinesin x · cos xcos x · −sin x
Tangent / cotangenttan x · cot xsec² x · −csc² x
Secant / cosecantsec x · csc xsec x tan x · −csc x cot x
Inverse trigarcsin x · arccos x · arctan x1/√(1 − x²) · −1/√(1 − x²) · 1/(1 + x²)
Hyperbolicsinh x · cosh x · tanh xcosh x · sinh x · sech² x
Root√x1/(2√x)
Variable poweru^vu^v·(v′ ln u + v·u′/u)

Quick answer

The derivative f′(x) is the slope of f(x) at each point: differentiate each term with the power rule d/dx[xⁿ] = n·xⁿ⁻¹, use the product rule (uv)′ = u′v + uv′ for products, the quotient rule (u/v)′ = (u′v − uv′)/v² for fractions, and the chain rule f(g(x))′ = f′(g(x))·g′(x) for a function inside another. Common derivatives: sin x → cos x, cos x → −sin x, eˣ → eˣ, ln x → 1/x.

Examples

f(x)f′(x)Rule
3x⁴ + 2x² − 5x + 712x³ + 4x − 5Power and sum rules
x²·sin(x)2x·sin(x) + x²·cos(x)Product rule
(x² + 1)/(x − 1)(x² − 2x − 1)/(x − 1)²Quotient rule
sin(x²)2x·cos(x²)Chain rule
e^(2x)2e^(2x)Exponential + chain rule
ln(x² + 1)2x/(x² + 1)Logarithm + chain rule
√x1/(2√x)Power rule (x^½)

Type your function above, choose the order, and enter a point to get f′(a) and the tangent line.

Summary

This derivative calculator finds the exact symbolic derivative of almost any function you can type: polynomials, fractions, roots and powers, sin, cos, tan, sec, csc, cot, their inverses, sinh, cosh, tanh, eˣ, aˣ, ln, log and absolute value, in any combination. Each step names the rule it uses (sum, constant multiple, power, product, quotient, chain, exponential or logarithmic differentiation) and shows the intermediate derivative, and the answer is simplified and given in plain text you can copy. Choose an order up to 5 for higher derivatives, or enter a point to get f(a), f′(a), f″(a) and the equations of the tangent and normal lines. Everything runs in your browser.

How it works

  1. Type f(x) using ^ for powers and * or a space for multiplication: 3x^4 - 2x, x^2 sin(x), e^(2x), sqrt(x+1), ln(x^2+1), (x+1)/(x-1). Superscripts, π and √ also work.
  2. The calculator parses the expression into a tree, reading 2x as 2·x and sin x as sin(x). Letters other than the chosen variable are treated as constants.
  3. It differentiates the tree recursively, choosing the rule for each part: sum, constant multiple, power, product, quotient, chain, exponential, logarithmic and the trig, inverse-trig and hyperbolic derivatives.
  4. Each rule application is listed as a step, then the result is simplified: like terms and powers are combined, polynomial numerators are expanded and cos/sin becomes cot.
  5. For higher orders it differentiates the simplified result again. With a point x = a it evaluates f(a) and f′(a) and builds the tangent line y = f′(a)(x − a) + f(a).

Use cases

  • Checking calculus homework that uses the product, quotient or chain rule.
  • Seeing each differentiation step to learn which rule applies where.
  • Finding second and third derivatives for concavity, acceleration or Taylor series.
  • Getting the slope f′(a) and the tangent line equation at a point.
  • Differentiating trig, exponential and logarithmic models in physics, economics and engineering.
  • Copying a derivative in plain text into code, a spreadsheet or another calculator.

Frequently Asked Questions

Last updated: 2026-10-10 · Reviewed by Nham Vu