Skip to main content
math

Chain Rule Calculator

Apply the chain rule of differentiation to composite functions of the form (ax + b)^n. Enter the inner function coefficients and the outer exponent to compute the derivative of nested functions used in physics, engineering, and advanced mathematics.

Reviewed by Christopher FloiedUpdated

This free online chain rule calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

Coefficient of x in the inner function ax + b

Constant term in the inner function ax + b

The exponent applied to the inner function

Results

Leading Coefficient (n*a)

12

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Chain Rule Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Chain Rule Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Chain Rule Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Chain Rule Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The Chain Rule Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Apply the chain rule of differentiation to composite functions of the form (ax + b)^n. Enter the inner function coefficients and the outer exponent to compute the derivative of nested functions used in physics, engineering, and advanced mathematics. The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About Chain Rule Calculator

The Chain Rule Calculator computes the derivative of composite functions of the form (ax + b)^n. The chain rule is one of the most important differentiation rules, enabling you to differentiate functions nested inside other functions. Whenever you have an outer function applied to an inner function, the chain rule states that you multiply the derivative of the outer function (evaluated at the inner function) by the derivative of the inner function. This calculator focuses on the common case of a power function applied to a linear expression, which appears frequently in physics, engineering, and economics. Understanding the chain rule is essential for differentiating trigonometric compositions, exponential chains, and implicit equations.

The Math Behind It

The chain rule states that if y = f(g(x)), then dy/dx = f'(g(x)) * g'(x). In Leibniz notation, if y = f(u) and u = g(x), then dy/dx = (dy/du)(du/dx). This elegant formulation treats derivatives almost like fractions, though the notation is not literally a fraction. The proof of the chain rule uses the definition of the derivative and a careful argument about the limit of a quotient. The key idea is that [f(g(x+h)) - f(g(x))]/h can be rewritten as [f(g(x+h)) - f(g(x))]/[g(x+h) - g(x)] * [g(x+h) - g(x)]/h, and as h approaches 0, the first factor approaches f'(g(x)) and the second approaches g'(x). For the specific case (ax + b)^n, the outer function is u^n with derivative nu^(n-1), and the inner function is ax + b with derivative a. Multiplying: d/dx[(ax+b)^n] = n(ax+b)^(n-1) * a = na(ax+b)^(n-1). The chain rule extends to compositions of three or more functions: d/dx[f(g(h(x)))] = f'(g(h(x))) * g'(h(x)) * h'(x). This nested application appears in neural networks where activation functions compose with linear transformations through many layers. The chain rule is also the foundation of backpropagation, the algorithm that trains deep learning models. In multivariable calculus, the chain rule generalizes to the multivariate chain rule involving partial derivatives and the Jacobian matrix.

Formula Reference

Chain Rule for Power of Linear Function

d/dx [(ax+b)^n] = n*a*(ax+b)^(n-1)

Variables: a = inner coefficient, b = inner constant, n = outer exponent

Worked Examples

Example 1: Derivative of (3x + 1)^4

Find d/dx [(3x + 1)^4] using the chain rule.

Step 1:Identify: outer function u^4, inner function u = 3x + 1
Step 2:Derivative of outer: 4u^3 = 4(3x+1)^3
Step 3:Derivative of inner: d/dx[3x + 1] = 3
Step 4:Multiply: 4 * 3 * (3x+1)^3 = 12(3x+1)^3

The derivative is 12(3x+1)^3 (leading coefficient = 12, new exponent = 3).

Example 2: Derivative of (2x - 5)^3

Find d/dx [(2x - 5)^3].

Step 1:Outer exponent n = 3, inner: 2x - 5 with a = 2
Step 2:Leading coefficient: n * a = 3 * 2 = 6
Step 3:New exponent: 3 - 1 = 2
Step 4:Result: 6(2x - 5)^2

The derivative is 6(2x - 5)^2.

Common Mistakes & Tips

  • !Forgetting to multiply by the derivative of the inner function. This is the most common chain rule error: d/dx[(3x+1)^4] is NOT 4(3x+1)^3 but 12(3x+1)^3.
  • !Applying the power rule without the chain rule when the base is not simply x. Any time the base of a power is a function of x (not just x itself), you need the chain rule.
  • !Confusing the chain rule with the product rule. The chain rule applies to compositions f(g(x)), while the product rule applies to products f(x)*g(x).

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

When do I need the chain rule?

You need the chain rule whenever you are differentiating a composite function, meaning a function inside another function. If you can describe the function as 'f of g of x' then the chain rule applies. Common examples include (expression)^n, sin(expression), e^(expression), and ln(expression).

How does the chain rule relate to backpropagation in machine learning?

Backpropagation is a direct application of the chain rule. In a neural network, the output is a composition of many functions (layers). To compute how changing a weight affects the loss, you apply the chain rule through each layer, multiplying the local derivatives together. This is exactly the multivariable chain rule applied systematically.

Can I apply the chain rule multiple times?

Yes. For nested compositions like f(g(h(x))), you multiply the derivatives of each function evaluated at the appropriate argument: f'(g(h(x))) * g'(h(x)) * h'(x). Each nesting adds one more factor in the product.