Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Math
  3. /Derivatives
  4. /Chain Rule Calculator

Chain Rule Calculator

Last updated: March 15, 2026

Calculator

Results

u = ax + b

5

y = f(u)

-0.958924

du/dx

2

dy/du

0.283662

dy/dx

0.567324

Domain Check

1

Results

u = ax + b

5

y = f(u)

-0.958924

du/dx

2

dy/du

0.283662

dy/dx

0.567324

Domain Check

1

The Chain Rule Calculator computes the derivative of a composite function using the chain rule of calculus. Choose an outer function (sin, cos, exp, ln, sqrt, or square) applied to a linear inner function $$u = ax + b$$, and this tool evaluates the composite function, the inner derivative, the outer derivative, and combines them via the chain rule $$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$$ at any x-value. It is the definitive tool for understanding and verifying chain rule computations.

The chain rule is arguably the most important and most frequently used differentiation rule. It tells you how to differentiate a function of a function — a composite function. If $$y = f(g(x))$$, where $$f$$ is the "outer" function and $$g$$ is the "inner" function, then:

$$\frac{dy}{dx} = f'(g(x)) \cdot g'(x)$$

In Leibniz notation, writing $$u = g(x)$$ so that $$y = f(u)$$, the chain rule takes the elegant form $$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$$. This notation suggests that the derivatives "cancel" like fractions, though this is merely a convenient mnemonic — the rigorous proof involves limits and the careful handling of the case where $$\Delta u = 0$$.

The chain rule was developed in the late 17th century as part of the broader development of calculus by Leibniz and Newton. Its power lies in its ability to decompose complex derivatives into simpler pieces. Without the chain rule, differentiating expressions like $$\sin(3x + 1)$$, $$e^{x^2}$$, or $$\sqrt{2x + 5}$$ would require returning to the limit definition each time. With the chain rule, you simply identify the outer and inner functions, differentiate each separately, and multiply.

This calculator supports six common outer functions, each with a well-known derivative:

  • sin(u): derivative is $$\cos(u)$$
  • cos(u): derivative is $$-\sin(u)$$
  • eᵘ: derivative is $$e^u$$ (the exponential is its own derivative)
  • ln(u): derivative is $$1/u$$ (requires $$u > 0$$)
  • √u: derivative is $$1/(2\sqrt{u})$$ (requires $$u > 0$$)
  • u²: derivative is $$2u$$

The inner function is always $$u = ax + b$$, whose derivative is simply $$a$$. Therefore, the chain rule gives $$\frac{dy}{dx} = f'(ax + b) \cdot a$$, where $$f'$$ is the derivative of whichever outer function you selected.

The chain rule has vast applications. In physics, when a quantity depends on time through an intermediate variable (e.g., temperature depends on position which depends on time), the chain rule gives the total rate of change. In machine learning, backpropagation — the algorithm that trains neural networks — is essentially the chain rule applied repeatedly through layers of composed functions. In engineering, sensitivity analysis uses the chain rule to determine how output tolerances depend on input tolerances through a chain of functional relationships.

Select your outer function, enter the coefficients of the inner linear function, and choose an evaluation point to see the chain rule applied step by step with all intermediate values displayed.

Visual Analysis

How It Works

The Chain Rule Calculator decomposes a composite function and applies the chain rule.

Step 1: Define the composite function. Let $$u = ax + b$$ be the inner function and $$y = f(u)$$ be the outer function, so $$y = f(ax + b)$$.

Step 2: Evaluate the inner function.

$$u_0 = a x_0 + b$$

Step 3: Evaluate the composite function.

$$y_0 = f(u_0)$$

Step 4: Inner derivative. Since $$u = ax + b$$ is linear:

$$\frac{du}{dx} = a$$

Step 5: Outer derivative at u₀. Depending on the chosen function:

$$\frac{dy}{du}\bigg|_{u=u_0} = \begin{cases} \cos(u_0) & \text{if } f = \sin \\ -\sin(u_0) & \text{if } f = \cos \\ e^{u_0} & \text{if } f = \exp \\ 1/u_0 & \text{if } f = \ln \\ 1/(2\sqrt{u_0}) & \text{if } f = \sqrt{\phantom{x}} \\ 2u_0 & \text{if } f = (\cdot)^2 \end{cases}$$

Step 6: Apply the chain rule.

$$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$$

This multiplication gives the derivative of the composite function at the specified point.

Understanding Your Results

The Inner u = ax + b value shows the input to the outer function. This intermediate value is crucial — the outer function's derivative is evaluated here, not at x₀.

The y = outer(u) value is the composite function evaluated at x₀. This is the function whose derivative you are computing.

The du/dx = a is the derivative of the inner function. For a linear inner function, this is simply the coefficient a, constant everywhere.

The dy/du value is the derivative of the outer function evaluated at u₀. This measures how sensitive the outer function is to changes in its input at the current value.

The dy/dx is the chain rule result — the product of dy/du and du/dx. It represents the total derivative of the composite function with respect to x, accounting for how x affects u and how u affects y.

Worked Examples

y = sin(2x + 3) at x = 1

Inputs

outersin
a2
b3
x01

Results

innerVal5
outerVal-0.958924
innerDeriv2
outerDeriv0.283662
chainResult0.567324

u = 2(1) + 3 = 5. y = sin(5) ≈ −0.9589. dy/du = cos(5) ≈ 0.2837. du/dx = 2. Chain rule: dy/dx = 0.2837 × 2 ≈ 0.5673. The derivative of sin(2x+3) is 2cos(2x+3), evaluated at x=1.

y = e^(3x − 1) at x = 0

Inputs

outerexp
a3
b-1
x00

Results

innerVal-1
outerVal0.367879
innerDeriv3
outerDeriv0.367879
chainResult1.103638

u = 3(0) − 1 = −1. y = e^(−1) ≈ 0.3679. dy/du = e^(−1) ≈ 0.3679 (exponential is its own derivative). du/dx = 3. Chain rule: dy/dx = 0.3679 × 3 ≈ 1.1036. The derivative of e^(3x−1) is 3e^(3x−1).

Frequently Asked Questions

The chain rule states that the derivative of a composite function $$f(g(x))$$ equals the derivative of the outer function evaluated at the inner function, multiplied by the derivative of the inner function: $$\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)$$. It allows you to differentiate complex composed expressions by breaking them into simpler parts.

Nearly every function encountered in practice is a composition. Expressions like $$\sin(3x)$$, $$e^{-x^2}$$, $$\ln(x^2+1)$$, and $$\sqrt{4x+1}$$ all require the chain rule. Without it, you would need to use the limit definition of the derivative for each new combination. The chain rule also underlies backpropagation in neural networks and implicit differentiation.

Yes. For a triple composition $$f(g(h(x)))$$, the chain rule gives $$f'(g(h(x))) \cdot g'(h(x)) \cdot h'(x)$$. Each layer of composition adds one more factor. In deep neural networks, backpropagation applies the chain rule through dozens or hundreds of composed layers.

The natural logarithm $$\ln(u)$$ requires $$u > 0$$, so you need $$ax + b > 0$$ at your evaluation point. Similarly, $$\sqrt{u}$$ requires $$u > 0$$ (strictly positive for the derivative, since $$1/(2\sqrt{u})$$ is undefined at $$u = 0$$). The calculator will return NaN or Infinity for invalid inputs.

Backpropagation computes the gradient of a neural network's loss function by applying the chain rule layer by layer, from output back to input. Each layer applies a function to its input, and the chain rule propagates the derivative (gradient) through the composition. This efficient algorithm makes training deep networks feasible.

In Leibniz notation, if $$y = f(u)$$ and $$u = g(x)$$, the chain rule is $$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$$. This notation is elegant because it looks like the du terms "cancel," though this is a mnemonic rather than a rigorous cancellation. The notation extends naturally: for $$y = f(u)$$, $$u = g(v)$$, $$v = h(x)$$, we get $$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dv} \cdot \frac{dv}{dx}$$.

Sources & Methodology

Stewart, James. Calculus: Early Transcendentals, 8th ed., Cengage Learning, 2015. Thomas, George B. et al. Thomas' Calculus, 14th ed., Pearson, 2017. Rudin, Walter. Principles of Mathematical Analysis, 3rd ed., McGraw-Hill, 1976. Weisstein, Eric W. "Chain Rule." MathWorld — A Wolfram Web Resource.
R

Roboculator Team

The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.

How helpful was this calculator?

Be the first to rate!

Related Calculators

Derivative Calculator

Derivatives

First Derivative Calculator

Derivatives

Second Derivative Calculator

Derivatives

Partial Derivative Calculator

Derivatives

Implicit Derivative Calculator

Derivatives

Gradient Calculator

Derivatives