Skip to main content
Online
Calculus · step-by-step

Derivative Calculator with Steps

Type a function and get its derivative with every rule named — power, constant multiple, sum, product, quotient, chain, trig, exponential and logarithm — then a simplified answer, higher derivatives and the slope at a point.

Use ^ for powers, sqrt(), ln(), log(), e^x, sin cos tan sec csc cot, asin acos atan, sinh cosh tanh. Multiplication can be implied: 3x^2 sin x. Other letters (a, b, k…) are treated as constants.

Complete guide

Derivatives step by step: the power, product, quotient and chain rules with worked examples

5 min read Reviewed By the GetCalcMaster team · Editorial policy

A derivative measures how fast a function changes. Geometrically it is the slope of the tangent line; physically it is a rate such as velocity (the derivative of position) or marginal cost (the derivative of total cost). You rarely need the limit definition in practice: a handful of rules covers almost every function you will meet in a first calculus course.

The calculator above applies those rules the way you would on paper. It names the rule used at each step, shows the intermediate expression, and then simplifies the result. It can also give second and third derivatives and the slope and tangent line at a point. Everything runs in your browser.

How to use this tool

  1. Type the function using ^ for powers, for example x^3 - 4x + 1, x^2 sin(x) or (3x+1)/(x^2+1). You may leave out multiplication signs: 3x^2 e^x.
  2. Choose the order (first, second or third derivative). Optionally enter a value to get the slope f′ there and the tangent line.
  3. Read the steps from the top: the outermost rule comes first, followed by the derivatives of the pieces it needs.

Key formulas

Power rule
d/dx[xⁿ] = n·xⁿ⁻¹
Works for any real exponent n, including fractions (roots) and negatives (reciprocals).
Constant multiple and sum rules
(c·f)′ = c·f′, (f ± g)′ = f′ ± g′
Constants stay in front; differentiate a sum term by term.
Product rule
(f·g)′ = f′·g + f·g′
Derivative of the first times the second, plus the first times the derivative of the second.
Quotient rule
(f/g)′ = (f′·g − f·g′) / g²
Order matters in the numerator: “low d-high minus high d-low, over low squared”.
Chain rule
d/dx[f(u)] = f′(u)·u′
Differentiate the outer function, keep the inside unchanged, then multiply by the derivative of the inside.
Exponential and logarithm
(eᵘ)′ = eᵘ·u′, (aᵘ)′ = aᵘ·ln a·u′, (ln u)′ = u′/u
ex is its own derivative; ln turns a product into a sum, which is why it simplifies many derivatives.
Trigonometric functions
(sin u)′ = cos u·u′, (cos u)′ = −sin u·u′, (tan u)′ = sec²u·u′
Angles are in radians. The derivatives of sec, csc and cot follow from the quotient rule.
Inverse trigonometric functions
(arcsin u)′ = u′/√(1 − u²), (arctan u)′ = u′/(1 + u²)
arccos has the same derivative as arcsin with a minus sign.

Worked examples

Example 1: Product rule

Differentiate f(x) = x² sin x.

  1. Let f = x² and g = sin x, so f′ = 2x and g′ = cos x.
  2. Product rule: f′g + fg′ = 2x·sin x + x²·cos x.
Answer: f′(x) = x² cos x + 2x sin x
Try it: derivative of x^2 sin x
Example 2: Quotient rule with simplification

Differentiate f(x) = (3x + 1)/(x² + 1).

  1. f = 3x + 1 gives f′ = 3; g = x² + 1 gives g′ = 2x.
  2. Quotient rule: (3(x² + 1) − (3x + 1)·2x)/(x² + 1)².
  3. Expand the numerator: 3x² + 3 − 6x² − 2x = −3x² − 2x + 3.
Answer: f′(x) = (−3x² − 2x + 3)/(x² + 1)². At x = 1 the slope is −0.5 and the tangent line is y = 2 − 0.5(x − 1).
Try it: derivative of (3x+1)/(x^2+1)
Example 3: Chain rule

Differentiate f(x) = sin(x²).

  1. Outer function sin u, inner function u = x².
  2. Derivative of the outer, evaluated at the inner: cos(x²). Derivative of the inner: 2x.
Answer: f′(x) = 2x·cos(x²)
Example 4: Product of an exponential and a trig function

Differentiate f(x) = e^(2x)·cos(3x).

  1. (e^(2x))′ = 2e^(2x) by the chain rule; (cos 3x)′ = −3 sin 3x.
  2. Product rule: 2e^(2x)·cos 3x + e^(2x)·(−3 sin 3x).
Answer: f′(x) = 2e^(2x)·cos(3x) − 3e^(2x)·sin(3x) = e^(2x)(2 cos 3x − 3 sin 3x)
Example 5: Logarithm of a polynomial

Differentiate f(x) = ln(x² + 1).

  1. (ln u)′ = u′/u with u = x² + 1 and u′ = 2x.
Answer: f′(x) = 2x/(x² + 1)

How to choose the rule

Look at the last operation you would carry out if you evaluated the function for a number. That operation decides the outermost rule:

  • Last step is adding or subtracting → sum rule.
  • Last step is multiplying two expressions that both contain x → product rule. If one factor is a constant, use the constant multiple rule instead.
  • Last step is dividing by an expression with x → quotient rule. Dividing by a plain number is just a constant multiple.
  • Last step is applying a function (sin, ln, a power…) to something more complicated than x → chain rule.
  • x appears in both the base and the exponent, as in xˣ → logarithmic differentiation: take ln of both sides first.

Derivative table

Function Derivative Notes
c (constant) 0 Constant rule
xⁿ n·xⁿ⁻¹ Any real n
√x 1/(2√x) Power rule with n = 1/2
eˣ eˣ
aˣ aˣ·ln a a > 0
ln x 1/x x > 0
log₁₀ x 1/(x·ln 10)
sin x cos x Radians
cos x −sin x
tan x sec² x
arctan x 1/(1 + x²)

Why the answer may look different from your textbook

Equivalent expressions can be written in many ways. 2x·sin x + x²·cos x, x(2 sin x + x cos x) and x² cos x + 2x sin x are the same function. The calculator expands numerators and combines like terms, but it does not apply trigonometric identities such as sin²x + cos²x = 1. If your answer differs, enter a value for x in both versions: equal derivatives give equal numbers.

Common mistakes to avoid

  • Differentiating a product factor by factor: (fg)′ is not f′g′. For example (x·x)′ = 2x, but f′g′ = 1.
  • Swapping the order in the quotient rule numerator, which flips the sign of the answer.
  • Forgetting the inner derivative in the chain rule: (sin 3x)′ = 3 cos 3x, not cos 3x.
  • Using the power rule on an exponential: (2ˣ)′ is 2ˣ·ln 2, not x·2ˣ⁻¹.
  • Working in degrees. The trig derivative formulas assume radians.

Frequently asked questions

What does a derivative tell you?
The instantaneous rate of change of a function: the slope of its tangent line at each point. A positive derivative means the function is increasing there, a negative one that it is decreasing, and zero marks a possible maximum or minimum.
How do I find the second derivative?
Differentiate the first derivative again. Choose “Second f″” in the calculator. The second derivative describes concavity and, in physics, acceleration.
Can I use other letters as constants?
Yes. Any letter other than the chosen variable (and e) is treated as a constant, so the derivative of a x² + b x + c is 2a·x + b.
When should I use logarithmic differentiation?
When the variable appears in both the base and the exponent, such as xˣ or (sin x)ˣ, or to simplify long products and quotients. Take ln of both sides, differentiate, then multiply by the original function.
Does the calculator use the limit definition?
No. It applies the standard differentiation rules, which are all proved from the limit definition. The result is exact and symbolic, not a numerical approximation.

Related tools and guides

References

Educational content. Results are computed in your browser with standard double-precision arithmetic; double-check anything with legal, financial, medical, or safety consequences. Spotted an error? Tell us and we will correct it.