Skip to content
    Calculus

    Chain Rule Explained Simply (With Examples)

    Why is the derivative of (3x)² equal to 18x and not just 6x? The missing 3 is the chain rule at work, and it is the rule students forget most often. This guide shows you how to spot a function inside a function and differentiate it correctly every time.

    Math Solver Academic Editorial Board5 min read

    Key takeaways

    • Chain rule: derivative of the outside (inside left alone) × derivative of the inside.
    • In symbols: d/dx f(g(x)) = f′(g(x)) × g′(x).
    • The #1 mistake is forgetting to multiply by the derivative of the inside.
    • Use it whenever something more than plain x sits inside brackets, a sine, a root or an exponent.
    In this guide
    1. 01What is the chain rule?
    2. 02Why does the chain rule matter?
    3. 03The formula
    4. 04How to use the chain rule step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you'll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is the chain rule?

    A derivative measures how fast something changes. Sometimes one change causes another. Turn a bicycle pedal and the chain turns the back wheel. To know how fast the wheel spins, you multiply the two rates together. That is the chain rule.

    In math, a function inside another function is called a composite function. In (x² + 1)³, the inside is x² + 1 and the outside is “something cubed”.

    Why does the chain rule matter?

    Almost every interesting function has something inside something else: sin(5x), e^(3x), √(x² + 9). Without the chain rule you could only differentiate the simplest formulas.

    Rates multiply. If a gear turns 3 times for every pedal turn, and you pedal 2 turns per second, the gear turns 3 × 2 = 6 times per second.

    The formula

    d/dx [ f(g(x)) ] = f′(g(x)) × g′(x)
    SymbolWhat it meansExample with (x² + 1)³
    g(x)The inside functionx² + 1
    fThe outside functionu³
    f′(g(x))Derivative of the outside, inside left untouched3(x² + 1)²
    g′(x)Derivative of the inside2x

    Multiply the last two rows: 3(x² + 1)² × 2x = 6x(x² + 1)².

    This calculator handles functions of the form (a·xⁿ)ᵐ at a chosen x. The inside is a·xⁿ, the outside is “to the power m”, so the derivative is m(a·xⁿ)ᵐ⁻¹ × a·n·xⁿ⁻¹.

    How to use the chain rule step by step

    1. 1Spot the inside and the outside. The inside is usually in brackets.
    2. 2Differentiate the outside. Treat the inside as a single letter u. For u³ that gives 3u².
    3. 3Put the inside back. 3u² becomes 3(x² + 1)². Don’t change the inside.
    4. 4Multiply by the inside’s derivative. 3(x² + 1)² × 2x = 6x(x² + 1)².
    5. 5Put in x if you need a number. At x = 1: 6 × 1 × 2² = 24.

    Now try it yourself. Enter a, n, m and x in the calculator below and it will show the outside and inside parts separately.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Calculus
    University

    Chain Rule (Derivative)

    Find the derivative of a composite function. Example: d/dx[(axⁿ)ᵐ] evaluated at x.

    d/dx[f(g(x))] = f'(g(x)) · g'(x)

    f'(x) slope
    Tangent Line dy/dx
    120
    120
    120
    0.120

    💡 Example

    Reference
    Inputs:a=2, n=3, x=1, m=4
    Result:192
    Open the full Chain Rule (Derivative) calculator

    Common mistakes to avoid

    • Changing the inside while differentiating the outside. In step 2, the inside stays exactly as it was.
    • Using the chain rule on a product. x² × sin x is two functions multiplied, not one inside another. Use the product rule for that.
    • Stopping too early. Some functions have layers: sin((2x + 1)³) needs the chain rule twice.

    Tips and tricks

    • Common patterns: d/dx sin(5x) = 5cos(5x) and d/dx e^(3x) = 3e^(3x). See the derivative of sin(ax) and the derivative of eᵃˣ.
    • Linear insides are easy. If the inside is ax + b, the chain rule just multiplies by a.
    • Backwards: run the chain rule in reverse and you get u-substitution for integrals.

    Where you'll use it in real life

    • Waves: sound and light are written as sin(ωt), so their rates need the chain rule.
    • Growth and decay: population or medicine levels like e^(kt).
    • Related rates: how fast a balloon’s radius grows as air is pumped in.
    • Machine learning: training a neural network (“backpropagation”) is the chain rule applied layer by layer.

    Quick summary

    The chain rule differentiates a function inside a function: take the derivative of the outside, keep the inside the same, then multiply by the derivative of the inside. Use the calculator above to check any (a·xⁿ)ᵐ at a point, with both parts shown.

    Worked example

    The side of a square grows by 3 cm every second, so after x seconds the side is 3x cm and the area is (3x)². How fast is the area growing (in cm² per second) at x = 2 seconds? Here the inside is 3x¹ (a = 3, n = 1) and the outside is a square (m = 2).

    1. 01Let f(u) = u^2 and g(x) = 3x^1
    2. 02f'(u) = 2u^1
    3. 03g'(x) = 3x^0
    4. 04Chain Rule: d/dx = f'(g(x)) · g'(x)
    5. 05= 2(3x^1)^1 · 3x^0
    6. 06At x = 2: inner = 3 × 2^1 = 6
    7. 07outer deriv = 2 × 6^1 = 12
    8. 08inner deriv = 3 × 2^0 = 3
    9. 09Result = 12 × 3 = 36

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    How do I know when to use the chain rule?

    Use it whenever something more than plain x sits inside another function, such as inside brackets with a power, inside sin or cos, or in an exponent like e^(2x).

    What is the derivative of (2x + 1)⁴?

    Outside: 4(2x + 1)³. Inside derivative: 2. Multiply them to get 8(2x + 1)³.

    What’s the difference between the chain rule and the product rule?

    The chain rule is for a function inside another, like sin(x²). The product rule is for two functions multiplied, like x² × sin x.

    What is the derivative of √(x² + 9)?

    Write it as (x² + 9)^(1/2). Outside: (1/2)(x² + 9)^(−1/2). Inside derivative: 2x. Multiply to get x ÷ √(x² + 9).

    #Calculus#University#Chain Rule (Derivative)
    Updated

    Keep reading

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX