Advanced maths

Brownian first passage time calculator with drift and an upper barrier

Evaluate the distribution of the first time a drifted Brownian path reaches a fixed upper barrier.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Evaluate the distribution of the first time a drifted Brownian path reaches a fixed upper barrier. The inputs are the positive distance from the starting point to the barrier, constant drift, positive diffusion and an observation time. The output includes hitting density, probability of hitting by that time, eventual hitting probability and any probability mass at infinity.

THE FORMULAτ=inf{t≥0:μt+σW_t=a}; fτ(t)=a exp[−(a−μt)²/(2σ²t)]/(σ√(2πt³)); Fτ(t)=Φ((μt−a)/(σ√t))+exp(2μa/σ²)Φ(−(μt+a)/(σ√t)). P(τ<∞)=1 if μ≥0, otherwise exp(2μa/σ²).

A worked example

For barrier distance1, drift .5, diffusion1 and time2, the hit probability by time two is about .71379179 and density there is .14104740. Eventual hitting probability is one and mean first-hit time is two. With drift changed to−.5, eventual hitting probability becomes e⁻¹≈.367879, leaving mass .632121 at infinity.

Good to know

Finite distance0<a≤100, diffusion0<σ≤100, time0<t≤1,000 and drift |μ|≤100. Constant scalar Brownian model and a single fixed upper barrier. Normal-CDF approximation with logarithmic tail handling; no moving/lower/double barriers, jumps, discrete monitoring correction or simulated paths. Conditional mean is a/|μ| for nonzero drift and infinite at zero drift; for negative drift the unconditional mean is infinite because non-hitting has positive probability.

A first hit is a path event

The event τ≤t means that the path reached the barrier at some time up to t. It does not require the path to remain above the barrier at the final time.

A Brownian path can hit early and return below the barrier before observation. Consequently a terminal exceedance probability P(X_t≥a) is generally smaller than the first-passage probability and cannot replace it in a barrier analysis.

Brownian first passage time calculator with drift and an upper barrier worked exampleNegative drift can leave paths that never hitP(hit by t)μ = +.5μ = 0μ = −.5Negative drift limit e⁻¹a = σ = 1; F(2) ≈ .713792 for μ = +.5Negative drift leaves .632121 probability of never hitting
Scroll across to see the full diagram.
For barrier distance1, drift .5, diffusion1 and time2, the hit probability by time two is about .71379179 and density there is .14104740. Eventual hitting probability is one and mean first-hit time is two. With drift changed to−.5, eventual hitting probability becomes e⁻¹≈.367879, leaving mass .632121 at infinity.

Compare this with the Ito stochastic differential equation simulation calculator. A generic sampled SDE path does not give analytic first-passage probabilities or the atom at infinity.

Distance and diffusion define the units

Only the barrier’s distance above the starting point enters the formula. If the process starts at x₀ and the barrier is b>x₀, enter a=b−x₀. Drift has units of position per time and diffusion has units of position per square root of time.

A consistent change from hours to days changes both drift and diffusion numerically. Rescaling only drift would describe a different stochastic process. Zero diffusion is excluded because its deterministic hitting behavior requires a separate limiting treatment.

Reflection contributes a second probability term

The first normal-CDF term corresponds to a terminal Gaussian comparison. The exponential-weighted second term accounts for paths that have crossed the barrier and returned, through the reflection argument adapted to drift.

The second term can combine a very large exponential factor with a very small Gaussian tail. Computing the tail in logarithmic form reduces overflow and cancellation; it does not change the distinction between terminal and first-hit events.

Reading the positive-drift default

At distance one, drift .5 and time two, the mean deterministic displacement reaches the barrier. Random diffusion still leaves a spread of crossing times, so the cumulative probability by that time is about .713792 rather than exactly one.

The density .141047 is probability per unit time near t=2, not the chance of hitting at precisely that instant. Multiplying density by a short time interval gives a local approximation, whereas cumulative probability must be obtained from the CDF.

Negative drift creates an atom at infinity

When drift points away from an upper barrier, some paths never reach it. Their probability is one minus exp(2μa/σ²), a positive mass at an infinite first-hit time.

For μ=−.5 with a=σ=1, only e⁻¹ of paths eventually hit. A finite-horizon survival probability includes both paths that will hit later and paths that never hit. Reporting only the continuous density would omit this essential probability mass.

Conditional and unconditional means differ

For nonzero drift, the mean time conditional on eventual hitting is a/|μ|. With positive drift all paths eventually hit, so this is also the ordinary mean.

With negative drift, non-hitting has positive probability and the unconditional extended mean is infinite. At zero drift hitting still occurs almost surely, but the mean first-hit time is infinite because its tail decays too slowly. Probability one does not imply a finite expected waiting time.

Analytic monitoring differs from sampled paths

The formula concerns continuous monitoring of an ideal Brownian path. Inspecting a simulated path only at a finite grid can miss crossings that occur between grid points and therefore bias measured hitting probabilities downward.

This page requires constant drift, diffusion and barrier. Moving boundaries, jump processes and two-barrier exit questions have different laws. A numerically precise result here does not validate those substitutions or predict a real measured process without model checks.

A few questions, answered

Is this probability of ending above the barrier?

No. It is probability of having touched it at any earlier time as well.

Why is there mass at infinity?

For drift away from the upper barrier, some paths never hit.

Can hitting occur almost surely with infinite mean time?

Yes. Zero-drift Brownian motion hits the barrier almost surely but has infinite expected first-hit time.

Does the density give a point probability?

No. It is a probability density per unit time; a single finite time has zero continuous mass.

Find your calculator

Start typing to explore the library.