All formulas

Probability distributions

Normal cumulative distribution function

prob.normal-cdfAlso called normal cdf, gaussian cdf, phi, norm cdf

Φ(x)=12(1+erf⁡(x−μσ2))\Phi(x) = \frac{1}{2}\left(1 + \operatorname{erf}\left(\frac{x - \mu}{\sigma\sqrt{2}}\right)\right)

Probability that a normal variable with mean μ and standard deviation σ is at most x, written with the error function.

Notation

xx

the point at which the density is evaluated

x ∈ ℝ

μ\mu

mean (location)

μ ∈ ℝ

σ\sigma

standard deviation (scale)

σ > 0

Φ(x)\Phi(x)

Result: the probability, in [0, 1]

scalar

Worked examples

Each result is solved exactly and confirmed by two independent computations.

  1. Given

    x=0,μ=0,σ=1x = 0, \mu = 0, \sigma = 1

    Result

    Φ(x)=12\displaystyle \Phi(x) = \frac{1}{2}

    ≈ 0.5

  2. Given

    x=1,μ=0,σ=1x = 1, \mu = 0, \sigma = 1

    Result

    Φ(x)=erf⁡(22)2+12\displaystyle \Phi(x) = \frac{\operatorname{erf}{\left(\frac{\sqrt{2}}{2} \right)}}{2} + \frac{1}{2}

    ≈ 0.841344746069

  3. Given

    x=0,μ=1,σ=2x = 0, \mu = 1, \sigma = 2

    Result

    Φ(x)=12−erf⁡(24)2\displaystyle \Phi(x) = \frac{1}{2} - \frac{\operatorname{erf}{\left(\frac{\sqrt{2}}{4} \right)}}{2}

    ≈ 0.308537538726

Common mistakes

  • Omits the √2 in the error function's argument

    erf is the CDF of a normal with variance ½, so the standardized value must be divided by √2.

    Fix: Use erf((x − μ)/(σ√2)).

  • Treats σ as the variance

    The code uses its σ argument where σ2 belongs.

    Fix: Pass the standard deviation.

Sources

  • NIST/SEMATECH e-Handbook, §1.3.6.6.1

    NIST/SEMATECH e-Handbook of Statistical Methods. https://www.itl.nist.gov/div898/handbook/ Last updated 2022-04-27. doi:10.18434/M32189

    doi.org
  • DLMF, eq. 7.2.1

    NIST Digital Library of Mathematical Functions. https://dlmf.nist.gov/ Release 1.2.8 of 2026-09-15. F. W. J. Olver, A. B. Olde Daalhuis, D. W. Lozier, B. I. Schneider, R. F. Boisvert, C. W. Clark, B. R. Miller, B. V. Saunders, H. S. Cohl, and M. A. McClain, eds.

    dlmf.nist.gov