The formula

If , then

In words: take the derivative of the outside function at the unchanged inside, then multiply by the derivative of the inside.

Leibniz notation makes the multiplication especially visible. If and , then

This notation suggests cancellation, but the rule is justified by the derivative limit rather than by treating differentials as ordinary fractions.

Before you start: You should know the power rule and derivatives of basic trigonometric, exponential, and logarithmic functions. This guide shows how to recognize a composite, handle several layers, and check the result.

Watch a value and its rate pass through two functions

A composite function is a two-stage machine. The inner function changes the input first. The outer function acts on that result. The chain rule says the total rate is the product of the rate at each stage.

x = 1.00
Outside ratecosine of one equals zero point five four zero
Inside ratetwo times one equals two
Total derivativeone point zero eight one
Function and tangent The tangent follows the multiplied rate above.
FunctionTangent at x

For y = sin(x²), the derivative is 2x cos(x²). At x = 1, the two rate factors multiply to about 1.081.

How to apply the chain rule in four steps

  1. 1

    Find the composition

    Look for an expression substituted into another function, such as the inside a fifth power.

  2. 2

    Name the layers

    Temporarily write the inside as . Then rewrite the whole function as .

  3. 3

    Differentiate outside, then inside

    Find and separately. Substitute the original inside back for .

  4. 4

    Multiply and simplify

    Form . Keep factors visible when that makes the chain of derivatives easier to inspect.

Recognition shortcut

If replacing a nontrivial inner expression with one letter makes the derivative rule obvious, you probably need the chain rule.

Chain rule examples, from one layer to several

Example 1

Differentiate a power of a polynomial

Find the derivative of .

  1. Let , so .
  2. The outside derivative is . The inside derivative is .
  3. Multiply the factors and substitute for .

Check: at , the formula gives , matching a central-difference estimate of the original function.

Example 2

Differentiate a trigonometric composite

For , the outside function is sine and the inside is .

The cosine keeps the complete inside expression. Omitting the factor would ignore how quickly the sine input changes.

Example 3

Pass through three nested layers

Differentiate . The outer exponential reproduces itself, then the derivative of tangent supplies the second factor.

The same outside-in process scales to more layers. Each differentiable layer contributes one factor.

Example 4

Simplify after differentiating

Assume and differentiate .

Because , the logarithm and square root are defined for every real x. Stating the domain avoids hiding a possible restriction.

Check your own composite function

Paste an expression into the browser-based calculator and inspect the exact derivative and numerical slope check.

Open the derivative calculator

Common chain rule mistakes

Forgetting the inner derivative

For , writing only misses the factor .

Changing the inside too early

When differentiating the outer function, keep the entire inner expression unchanged. Differentiate the inside as a separate factor.

Using addition instead of multiplication

The local rates multiply: . They do not add.

Stopping after one layer

For deeply nested functions, continue until every layer that depends on x has contributed a derivative factor.

Test your chain rule recognition

1. Differentiate

. The inner derivative is 5.

2. Differentiate

. Differentiate cosine, then multiply by the derivative of .

3. Differentiate

. The logarithm contributes the reciprocal, and the inner exponential contributes .

4. Differentiate

, at points where the original function is differentiable.

Where the chain rule fits

The College Board places the chain rule in AP Calculus AB and BC Unit 3, where it is used with composite, implicit, and inverse functions. A first university calculus course normally introduces it after the basic derivative rules and before broader applications of differentiation.

Next, learn how the product rule can be rearranged into integration by parts, or return to the main calculus solver for another operation.

Sources and further study