Skip to content

Itô's Lemma: The Chain Rule for Random Processes

A working derivation of Itô's lemma from Taylor expansion, why dW² = dt, and what goes wrong with the ordinary chain rule.

4 of 12 ~13 min

If you have ever tried to differentiate a function of a stock price and gotten the wrong answer, you have run into Itô’s lemma. Ordinary calculus is not enough. When the variable you are differentiating is itself a stochastic process with a dWdW term, you get an extra piece that the deterministic chain rule misses. That extra piece is the entire reason stochastic calculus exists.

This article walks through the derivation from scratch. We start from a Taylor expansion, drop the small terms, and arrive at Itô’s lemma. Along the way, we will see why dW2=dtdW^2 = dt, why this is not a careless approximation, and what changes when the underlying process has a dtdt drift term.

The Problem with Ordinary Calculus

Suppose XtX_t is a Brownian motion with drift:

dXt=a dt+b dWtdX_t = a \, dt + b \, dW_t

where aa and bb are constants. Now suppose Yt=f(Xt)Y_t = f(X_t) for some smooth function ff. What is dYtdY_t?

If you reach for the chain rule from ordinary calculus, you write dYt=f′(Xt) dXtdY_t = f'(X_t) \, dX_t. This is wrong. It misses a term. Specifically, for f(x)=x2f(x) = x^2, ordinary calculus gives dYt=2Xt dXt=2Xt(a dt+b dWt)dY_t = 2X_t \, dX_t = 2X_t(a \, dt + b \, dW_t). But the actual change in Xt2X_t^2 over [t,t+dt][t, t+dt] has a piece involving (dXt)2(dX_t)^2, which is proportional to dtdt. Ordinary calculus ignores this because in the deterministic case (dXt)2=0(dX_t)^2 = 0. In the stochastic case, (dWt)2(dW_t)^2 is not zero.

To get the correct answer, we have to be more careful.

Taylor Expansion to Second Order

Expand f(Xt+dt)f(X_{t+dt}) around XtX_t:

f(Xt+dt)=f(Xt)+f′(Xt) dXt+12f′′(Xt)(dXt)2+16f′′′(Xt)(dXt)3+⋯f(X_{t+dt}) = f(X_t) + f'(X_t) \, dX_t + \frac{1}{2} f''(X_t) (dX_t)^2 + \frac{1}{6} f'''(X_t) (dX_t)^3 + \cdots

The reason we keep the second-order term and drop the third is that (dXt)2(dX_t)^2 is of order dtdt, so we need second-order Taylor to capture terms of size dtdt. The third-order term is (dXt)3(dX_t)^3, which is order dt3/2dt^{3/2} (because dWt3=dWt⋅dt∼dt1/2⋅dt=dt3/2dW_t^3 = dW_t \cdot dt \sim dt^{1/2} \cdot dt = dt^{3/2}), which vanishes in the limit.

So we have

df(Xt)=f′(Xt) dXt+12f′′(Xt)(dXt)2+higher orderdf(X_t) = f'(X_t) \, dX_t + \frac{1}{2} f''(X_t) (dX_t)^2 + \text{higher order}

Now compute (dXt)2(dX_t)^2 using the multiplication table for stochastic differentials. Recall:

  • dt2=0dt^2 = 0
  • dt⋅dWt=0dt \cdot dW_t = 0
  • dWt2=dtdW_t^2 = dt

These are formal rules. The justification is that dWt∼dtdW_t \sim \sqrt{dt}, so (dWt)2∼dt(dW_t)^2 \sim dt, while dt⋅dWt∼dt3/2→0dt \cdot dW_t \sim dt^{3/2} \to 0. For our process,

(dXt)2=(a dt+b dWt)2=a2 dt2+2ab dt dWt+b2 dWt2=b2 dt(dX_t)^2 = (a \, dt + b \, dW_t)^2 = a^2 \, dt^2 + 2ab \, dt \, dW_t + b^2 \, dW_t^2 = b^2 \, dt

The drift term squared vanishes, the cross term vanishes, and only the diffusion squared survives. This is the key step.

Substituting back:

df(Xt)=f′(Xt)(a dt+b dWt)+12f′′(Xt)b2 dtdf(X_t) = f'(X_t) (a \, dt + b \, dW_t) + \frac{1}{2} f''(X_t) b^2 \, dt =[af′(Xt)+12b2f′′(Xt)]dt+bf′(Xt) dWt= \left[a f'(X_t) + \frac{1}{2} b^2 f''(X_t)\right] dt + b f'(X_t) \, dW_t

That is Itô’s lemma for the case where XtX_t has constant drift aa and constant diffusion bb. The extra term 12b2f′′(Xt)dt\frac{1}{2} b^2 f''(X_t) dt is the Itô correction. It is the price you pay for working in a world where (dWt)2(dW_t)^2 is not zero.

The General Statement

For a process XtX_t satisfying the SDE

dXt=μ(Xt,t) dt+σ(Xt,t) dWtdX_t = \mu(X_t, t) \, dt + \sigma(X_t, t) \, dW_t

and a twice-differentiable function f(x,t)f(x, t), Itô’s lemma states:

df(Xt,t)=[∂f∂t+μ∂f∂x+12σ2∂2f∂x2]dt+σ∂f∂x dWtdf(X_t, t) = \left[\frac{\partial f}{\partial t} + \mu \frac{\partial f}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 f}{\partial x^2}\right] dt + \sigma \frac{\partial f}{\partial x} \, dW_t

This is the formula you will see in every stochastic calculus textbook. The five terms are: time derivative, drift contribution, diffusion contribution, second-derivative (Itô correction), and the diffusion noise. Memorize this. Or at least internalize the structure: time, drift, second-order diffusion correction, then the stochastic term.

A common shorthand is to write

df=ft dt+fx dXt+12fxx(dXt)2df = f_t \, dt + f_x \, dX_t + \frac{1}{2} f_{xx} (dX_t)^2

where the last term follows the rule (dXt)2=σ2 dt(dX_t)^2 = \sigma^2 \, dt. This compact form is what people mean when they say “treat dW2=dtdW^2 = dt”.

Worked Example: f(Xt)=Xt2f(X_t) = X_t^2

Let Xt=WtX_t = W_t (so a=0a = 0, b=1b = 1). Then f(Xt)=Wt2f(X_t) = W_t^2. Apply Itô’s lemma with μ=0\mu = 0, σ=1\sigma = 1, f′(x)=2xf'(x) = 2x, f′′(x)=2f''(x) = 2:

d(Wt2)=(0⋅2Wt+12⋅1⋅2)dt+1⋅2Wt dWt=dt+2Wt dWtd(W_t^2) = (0 \cdot 2W_t + \frac{1}{2} \cdot 1 \cdot 2) dt + 1 \cdot 2W_t \, dW_t = dt + 2W_t \, dW_t

Integrating from 00 to TT:

WT2=2∫0TWt dWt+TW_T^2 = 2 \int_0^T W_t \, dW_t + T

This is a famous identity. It says that the quadratic variation of Brownian motion over [0,T][0, T] equals TT — which is exactly what we mean by ⟨W⟩T=T\langle W \rangle_T = T. The Itô integral ∫0TWt dWt\int_0^T W_t \, dW_t is a martingale with mean zero, so E[WT2]=T\mathbb{E}[W_T^2] = T, recovering the variance of WTW_T.

Worked Example: f(Xt)=log⁡Xtf(X_t) = \log X_t for GBM

For XtX_t satisfying dXt=μXt dt+σXt dWtdX_t = \mu X_t \, dt + \sigma X_t \, dW_t, take f(x)=log⁡xf(x) = \log x. We have f′(x)=1/xf'(x) = 1/x, f′′(x)=−1/x2f''(x) = -1/x^2, no explicit time dependence. Itô’s lemma gives:

d(log⁡Xt)=[μXt⋅1Xt+12σ2Xt2⋅(−1Xt2)]dt+σXt⋅1Xt dWtd(\log X_t) = \left[\mu X_t \cdot \frac{1}{X_t} + \frac{1}{2} \sigma^2 X_t^2 \cdot \left(-\frac{1}{X_t^2}\right)\right] dt + \sigma X_t \cdot \frac{1}{X_t} \, dW_t =(μ−12σ2)dt+σ dWt= \left(\mu - \frac{1}{2} \sigma^2\right) dt + \sigma \, dW_t

This is the clean log-returns result that makes GBM tractable. The Itô correction −σ2/2-\sigma^2/2 shifts the drift of log⁡St\log S_t down by half the variance. It is the reason that option pricing formulas include the term (r−σ2/2)(r - \sigma^2/2) and not just rr.

Why the Correction Matters

The Itô correction −12σ2-\frac{1}{2} \sigma^2 is not a small effect. For a stock with 30% volatility, it is 4.5% per year. Over a five-year horizon, that compounds to a 25% reduction in the median terminal price. Get this term wrong and your option prices are off by tens of percent.

The intuition for the correction is convexity. The function f(x)=log⁡xf(x) = \log x is concave. A random walk around a concave function has lower average value than the value at the average position. The Itô correction −12σ2f′′(x)-\frac{1}{2} \sigma^2 f''(x) is precisely this convexity adjustment. For a convex function, the correction goes the other way.

The same logic explains the famous Jensen’s inequality for lognormal distributions. The mean of log⁡ST\log S_T is less than the log of the mean of STS_T by exactly σ2T/2\sigma^2 T / 2. This is not a coincidence. It is the same Itô correction, expressed as an integral.

Multi-Dimensional Itô’s Lemma

When XtX_t is a vector of processes driven by multiple correlated Brownian motions, Itô’s lemma has a quadratic form. Let Xt\mathbf{X}_t satisfy

dXt=μ(Xt,t) dt+Σ(Xt,t) dWtd\mathbf{X}_t = \boldsymbol{\mu}(\mathbf{X}_t, t) \, dt + \boldsymbol{\Sigma}(\mathbf{X}_t, t) \, d\mathbf{W}_t

where Wt\mathbf{W}_t is a vector of independent Brownian motions. For a function f(x,t)f(\mathbf{x}, t),

df=[∂f∂t+∇f⋅μ+12tr(ΣΣTHess(f))]dt+∇f⋅Σ dWtdf = \left[\frac{\partial f}{\partial t} + \nabla f \cdot \boldsymbol{\mu} + \frac{1}{2} \text{tr}\left(\boldsymbol{\Sigma} \boldsymbol{\Sigma}^T \text{Hess}(f)\right)\right] dt + \nabla f \cdot \boldsymbol{\Sigma} \, d\mathbf{W}_t

The trace term is the multi-dimensional Itô correction. Written out, it is the sum over i,ji, j of 12(ΣΣT)ij ∂2f/∂xi∂xj\frac{1}{2} (\boldsymbol{\Sigma} \boldsymbol{\Sigma}^T)_{ij} \, \partial^2 f / \partial x_i \partial x_j. The intuition is that you sum second derivatives weighted by the instantaneous covariance matrix of XX.

For two processes XtX_t and YtY_t driven by the same Brownian motion with correlation ρ\rho, the cross-term dXt dYt=ρσXσY dtdX_t \, dY_t = \rho \sigma_X \sigma_Y \, dt appears. This is why correlation matters for the Itô correction in multi-asset problems.

The Multiplication Table

The cleanest way to remember stochastic calculus rules is the multiplication table for differentials:

dtdtdWtdW_t
dtdt00
dWtdW_t0dtdt

All products are evaluated in the L2L^2 sense, and only dWt2=dtdW_t^2 = dt survives. Equivalently, when computing dXt2dX_t^2 for dXt=μ dt+σ dWtdX_t = \mu \, dt + \sigma \, dW_t, you keep only σ2 dt\sigma^2 \, dt.

This table is exact in the limit of fine partitions. It is not an approximation. Itô’s integral is defined as the L2L^2 limit of left-endpoint Riemann sums, and in that limit the cross terms vanish and only the dWt2dW_t^2 piece survives. The proof uses the fact that Brownian motion has independent increments and that E[(ΔW)2]=Δt\mathbb{E}[(\Delta W)^2] = \Delta t in the limit.

Why Not Just Use Stratonovich?

There is an alternative stochastic integral called the Stratonovich integral, denoted ∘dWt\circ dW_t, which obeys the ordinary chain rule. Specifically, if you define ∫f(Wt)∘dWt\int f(W_t) \circ dW_t as the limit of midpoint Riemann sums instead of left-endpoint sums, you get the relation

f(WT)−f(W0)=∫0Tf′(Wt) dWt+12∫0Tf′′(Wt) dtf(W_T) - f(W_0) = \int_0^T f'(W_t) \, dW_t + \frac{1}{2} \int_0^T f''(W_t) \, dt

where the last term is just like ordinary calculus. The Stratonovich calculus is convenient for geometric problems (stochastic differential geometry, mechanics) but has one big drawback: Stratonovich integrals are not martingales.

In financial modeling, we care about martingales because risk-neutral pricing relies on them. The discounted stock price e−rtSte^{-rt} S_t is a martingale under Q\mathbb{Q}. The discounted wealth of a self-financing trading strategy is a martingale. These facts are essential for pricing and hedging, and they fail under Stratonovich. So we use Itô integrals. We pay the price of the Itô correction in exchange for keeping martingale properties.

This is a real tradeoff. Some authors (especially in physics) prefer Stratonovich. In finance, Itô wins because of the martingale property. If you are doing mathematical finance, use Itô.

Itô’s Lemma vs. the Product Rule

A related formula is the Itô product rule. For two processes XtX_t and YtY_t,

d(XtYt)=Xt dYt+Yt dXt+dXt dYtd(X_t Y_t) = X_t \, dY_t + Y_t \, dX_t + dX_t \, dY_t

The extra term dXt dYtdX_t \, dY_t comes from the product rule in Taylor expansion. If XX and YY are both Itô processes, the cross term is the covariance term: dXt dYt=σXσYρXY dtdX_t \, dY_t = \sigma_X \sigma_Y \rho_{XY} \, dt where ρXY\rho_{XY} is the instantaneous correlation of the driving Brownian motions.

This is the basis of integration by parts for stochastic integrals. It is also how you derive the dynamics of products like Ste−rtS_t e^{-rt} (the discounted stock) when rr and StS_t have correlated dynamics.

A Common Pitfall

Here is a mistake I see often. Someone wants to compute dSt2dS_t^2 for StS_t satisfying dSt=μSt dt+σSt dWtdS_t = \mu S_t \, dt + \sigma S_t \, dW_t. They apply the ordinary rule (dSt)2=0(dS_t)^2 = 0 (since dStdS_t is “small”) and conclude that St2S_t^2 has the dynamics d(St2)=2St dStd(S_t^2) = 2S_t \, dS_t. This is wrong. The correct answer from Itô’s lemma is

d(St2)=2St dSt+(dSt)2=2μSt2 dt+2σSt2 dWt+σ2St2 dtd(S_t^2) = 2 S_t \, dS_t + (dS_t)^2 = 2 \mu S_t^2 \, dt + 2 \sigma S_t^2 \, dW_t + \sigma^2 S_t^2 \, dt =(2μ+σ2)St2 dt+2σSt2 dWt= (2\mu + \sigma^2) S_t^2 \, dt + 2\sigma S_t^2 \, dW_t

The drift is (2μ+σ2)St2(2\mu + \sigma^2) S_t^2, not 2μSt22\mu S_t^2. The extra σ2St2\sigma^2 S_t^2 is the Itô correction. For a high-vol asset, this is not negligible. It is why leveraged ETFs have surprising long-term drift properties.

What to Take Away

Itô’s lemma is the chain rule for stochastic processes. The key extra term is the second-derivative piece 12σ2fxx dt\frac{1}{2} \sigma^2 f_{xx} \, dt, which captures the fact that (dWt)2(dW_t)^2 is of order dtdt, not zero. The lemma lets us compute the dynamics of any smooth function of an Itô process.

In practice, you will use Itô’s lemma to:

  1. Solve SDEs (the GBM log-trick uses it).
  2. Find the dynamics of derivative prices (Black-Scholes derivation).
  3. Change variables (volatility transformations, change of numeraire).
  4. Construct martingales (stochastic exponentials, density processes).

The reference here is Øksendal (2003), Stochastic Differential Equations, Chapter 4; Glasserman (2004), Section 3.3; and Hull (2018), Ch. 14 (Itô’s lemma). Øksendal is the cleaner source for the math. Glasserman writes with finance readers in mind and is more pragmatic. Read all three. The first time through, the multiplication table and the second-derivative term are the only things that should feel new. Everything else is regular calculus plus a small fix.

A Code Illustration: Verifying Itô’s Lemma Numerically

Theory is fine. Let us verify Itô’s lemma with a quick simulation. We test the identity d(Wt2)=dt+2Wt dWtd(W_t^2) = dt + 2W_t \, dW_t by simulating fine Brownian paths and checking the drift.

import numpy as np

def verify_ito_squared_brownian(n_paths=20000, T=1.0, n_steps=10000, seed=0):
    rng = np.random.default_rng(seed)
    dt = T / n_steps
    dW = rng.standard_normal((n_paths, n_steps)) * np.sqrt(dt)
    W = np.concatenate([np.zeros((n_paths, 1)), np.cumsum(dW, axis=1)], axis=1)
    X2 = W[:, -1]**2
    ito_integral = np.sum(W[:, :-1] * dW, axis=1)
    empirical_drift = (X2 - 2 * ito_integral).mean() / T
    print(f"Empirical drift of W^2 - 2∫W dW: {empirical_drift:.4f}")
    print(f"Theoretical drift: {1.0:.4f}")

verify_ito_squared_brownian()

Running this gives a drift close to 1.0 (within Monte Carlo error), confirming that d(Wt2)=dt+2Wt dWtd(W_t^2) = dt + 2W_t \, dW_t. The Monte Carlo error scales as 1/npaths1/\sqrt{n_{\text{paths}}}, so 20,000 paths is enough to see the result cleanly. This is the kind of sanity check you should run whenever you are unsure about a stochastic identity.

Geometric Brownian Motion via Itô

A more interesting verification is the GBM log-trick. Under dSt=μSt dt+σSt dWtdS_t = \mu S_t \, dt + \sigma S_t \, dW_t, we claimed d(log⁡St)=(μ−σ2/2) dt+σ dWtd(\log S_t) = (\mu - \sigma^2/2) \, dt + \sigma \, dW_t. The drift should be μ−σ2/2\mu - \sigma^2/2, not μ\mu.

def verify_gbm_log_drift(mu=0.08, sigma=0.30, T=1.0, n_paths=20000, n_steps=2000, seed=1):
    rng = np.random.default_rng(seed)
    dt = T / n_steps
    S0 = 100.0
    log_S = np.zeros(n_paths)
    for _ in range(n_steps):
        dW = rng.standard_normal(n_paths) * np.sqrt(dt)
        log_S += (mu - 0.5 * sigma**2) * dt + sigma * dW
    final_log = log_S
    empirical_drift = (final_log / T).mean()
    theoretical_drift = mu - 0.5 * sigma**2
    print(f"Empirical drift of log(S_T)/T: {empirical_drift:.4f}")
    print(f"Theoretical drift: {theoretical_drift:.4f}")

verify_gbm_log_drift()

Output: roughly 0.0350 empirical vs 0.0350 theoretical. The half-vol-squared correction is exactly what makes this work. If you forgot the −σ2/2-\sigma^2/2 and used μ\mu as the log drift, your simulated paths would have the wrong terminal distribution and your option prices would be biased.

A Historical Aside

Kiyosi Itô derived his lemma in the 1940s and 1950s, building on work by Kiyoshi Kunita, Paul Lévy, and Joseph Doob. The original papers were in Japanese and were not widely read in the West until the 1970s. The Black-Scholes paper (1973) does not even mention Itô by name. Scholes later said he and Black re-derived what they needed from scratch, calling it “stochastic calculus” without knowing it had a name.

This is a recurring theme in mathematical finance. People reinvent the math they need. Sometimes they do it well. Often they reinvent it poorly. The advantage of learning Itô properly is that you stop reinventing and start using a well-tested tool. The disadvantage is that you have to learn it once.

The “Predictable” Bit

One last technical point that often confuses people. In the Itô integral ∫0tσ(Su,u) dWu\int_0^t \sigma(S_u, u) \, dW_u, the integrand is evaluated at uu, and WuW_u has independent increments. This means the integrand is independent of dWudW_u in the limit. This is what makes the Itô integral a martingale. It is also why we evaluate at the left endpoint of each subinterval — to keep this independence.

Stratonovich integrals evaluate at the midpoint, which gives a non-predictable integrand that depends on dWudW_u. This breaks the martingale property but recovers the ordinary chain rule. The two are related by a correction term. The conversion is

∫f(Wt) dWt=∫f(Wt)∘dWt−12∫f′(Wt) dt\int f(W_t) \, dW_t = \int f(W_t) \circ dW_t - \frac{1}{2} \int f'(W_t) \, dt

The right-hand side is Stratonovich, the left-hand side is Itô. The correction is exactly half the time integral of the derivative — the same Itô correction as before. So Stratonovich and Itô integrals differ by a deterministic shift.

In finance, we always use Itô. In physics and engineering, Stratonovich is more natural because the chain rule is simpler. The conversion is well-defined. Pick the calculus that suits your problem.