calculus calculators

Chain Rule Calculator

Computes the derivative of a composite function by multiplying the outer function's derivative by the inner function's derivative. Ideal for calculus students who have already evaluated each sub-derivative and need the final combined result.

About this calculator

The chain rule is the differentiation rule for composite functions. If y = f(g(x)), then dy/dx = f′(g(x)) · g′(x). In words: the derivative of the outer function (evaluated at the inner function) times the derivative of the inner function. This calculator takes the pre-computed values of f′(g(x)) (the outer derivative) and g′(x) (the inner derivative), then multiplies them: chain rule result = outerDerivative × innerDerivative. The x value field provides context for the evaluation point. For example, differentiating sin(x²) gives cos(x²) · 2x. The chain rule is essential whenever functions are nested and underlies backpropagation in machine learning, implicit differentiation, and parametric derivatives.

How to use

Suppose you want to differentiate h(x) = (3x + 1)⁴ at x = 2. The outer function is u⁴ with derivative 4u³, and the inner function is g(x) = 3x + 1 with derivative g′(x) = 3. At x = 2, the inner value is g(2) = 7, so the outer derivative evaluated there is 4·7³ = 4·343 = 1372. Enter outer derivative = 1372, inner derivative = 3, x value = 2. The calculator computes: 1372 × 3 = 4116. That is h′(2) = 4116.

Frequently asked questions

How do I apply the chain rule step by step for a composite function?

First, identify the outer function f and the inner function g so that h(x) = f(g(x)). Second, differentiate the outer function with respect to its argument to get f′, then evaluate it at g(x). Third, differentiate the inner function to get g′(x). Finally, multiply: h′(x) = f′(g(x)) · g′(x). Keeping track of which function is 'outer' and which is 'inner' is the most common source of mistakes, so labeling them explicitly before differentiating helps avoid errors.

When do you need to apply the chain rule multiple times in one derivative?

You need to apply the chain rule multiple times when a function has more than two layers of composition, such as h(x) = sin(e^(x²)). In this case you differentiate sin(u) to get cos(u), then differentiate e^v to get e^v, then differentiate x² to get 2x, and multiply all three together: cos(e^(x²)) · e^(x²) · 2x. Each additional layer of nesting adds another factor to the product. This extended chain rule is sometimes called the generalized chain rule and appears frequently in physics and neural network training.

What is the difference between the chain rule and the product rule in calculus?

The chain rule applies when one function is composed inside another, i.e., h(x) = f(g(x)), yielding h′(x) = f′(g(x)) · g′(x). The product rule applies when two functions are multiplied together, i.e., h(x) = f(x) · g(x), yielding h′(x) = f′(x)g(x) + f(x)g′(x). A common mistake is applying the product rule to a composite function or vice versa. The key distinction is whether the functions are nested (chain rule) or side-by-side factors (product rule). Some expressions require both rules simultaneously.