Skip to main content
v2026.11,858 entries · CC-BY 4.0

Laplace Distribution: Formula, PDF, CDF and Worked Example

Laplace (double exponential) distribution: formulas, worked example, comparison with the normal distribution, and Excel, R and Python code.

Written and maintained by CASRAI Editorial Board

Last updated

The Laplace distribution (also called the double exponential distribution, and sometimes the Laplacian distribution) is a symmetric continuous distribution with a sharp peak at its centre and tails that are heavier than a normal distribution’s. Use this page to write down its density and cumulative distribution function, work one numeric example by hand, compare it with a normal distribution of the same variance, and compute it in Excel, R or Python.

Laplace (double exponential) distribution: definition

A random variable X follows a Laplace distribution when its density falls off exponentially in the absolute distance from a location parameter μ, at a rate set by a scale parameter β. The NIST/SEMATECH e-Handbook of Statistical Methods lists it as the “double exponential (Laplace)” distribution. It looks like a back-to-back pair of exponential curves placed around μ, which is why both names are in use. “Laplacian distribution” is a common variant of the same name; this page uses “Laplace distribution” throughout.

Laplace distribution formula (PDF and CDF)

The probability density function (PDF) is:

f(x) = exp(−|x − μ| / β) / (2β), for −∞ < x < ∞ and β > 0.

  • x: a value of the variable.
  • μ: the location parameter; it is the mean, the median and the mode.
  • β: the scale parameter; larger β spreads the distribution out and lowers the peak.
  • |x − μ|: the absolute distance from the centre, which is what separates this shape from the normal distribution’s squared distance.

The standard form (μ = 0, β = 1) is f(x) = exp(−|x|) / 2. Its cumulative distribution function (CDF) is F(x) = ex / 2 for x < 0 and F(x) = 1 − e−x / 2 for x ≥ 0. For general μ and β, apply the same formulas to z = (x − μ) / β.

Summary statistics

Quantity Value
Mean, median, mode μ
Variance 2β²
Standard deviation √2 · β
Skewness 0
Kurtosis (non-excess) 6 (excess kurtosis 3)

Mean, standard deviation, skewness and kurtosis follow the NIST/SEMATECH e-Handbook entry; the variance is the square of the standard deviation.

Worked example with the arithmetic shown

Take μ = 0 and β = 2.

  1. Density at the centre. f(0) = exp(0) / (2 × 2) = 1 / 4 = 0.25.
  2. Standard deviation. √2 × 2 = 2.828, so the variance is 2 × 2² = 8.
  3. P(X ≤ 3). z = (3 − 0) / 2 = 1.5, which is ≥ 0, so F = 1 − e−1.5 / 2. Since e−1.5 = 0.2231, F = 1 − 0.1116 = 0.8884.
  4. P(X ≤ −3). By symmetry this is e−1.5 / 2 = 0.1116.
  5. P(|X| > 3). 2 × 0.1116 = e−1.5 = 0.2231, so about 22.3% of the probability lies more than 3 units from the centre.
  6. 97.5th percentile. Setting 1 − e−q/β / 2 = 0.975 gives q = −β ln(0.05) = 2 × 2.9957 = 5.99.

Laplace vs normal distribution

The two are easiest to compare at the same variance. Below, the Laplace distribution has β = 2 (standard deviation 2.828) and the normal distribution has σ = 2.828. The figures were computed from the formulas above.

Feature Laplace (β = 2) Normal (σ = 2.828)
Density at the centre 0.250 0.141
Kurtosis (non-excess) 6 3
P(|X − μ| > 3) 0.223 0.289
P(|X − μ| > 2 standard deviations) 0.059 0.046
97.5th percentile above the centre 5.99 5.54

Reading the table: at equal variance the Laplace distribution puts more density at the very centre, less at moderate distances such as 3 units, and more far out in the tails. That is the meaning of kurtosis 6 versus 3: a sharper peak and heavier tails. For the normal side, see the normal distribution in MATLAB.

Interpretation

If you see It suggests
Data or residuals symmetric around a centre with a pointed peak A Laplace shape may fit better than a normal one; compare with a histogram or Q-Q plot.
A mean far from the median The data are skewed, so the symmetric Laplace distribution is not appropriate (see mean greater than median).
Larger β More spread: the standard deviation is √2 · β.
Excess kurtosis near 3 Consistent with the Laplace value; excess kurtosis near 0 is consistent with a normal distribution.

Where it is used: differential privacy and median regression

In differential privacy, noise drawn from a Laplace distribution is added to a query result so that no single record can be inferred; see differential privacy. In that setting the scale is set from the query’s sensitivity and the privacy budget ε (β = sensitivity / ε, per Dwork and Roth, 2014). Separately, minimising the sum of absolute errors is equivalent to maximum likelihood when errors are Laplace distributed, which is why least-absolute-deviation (median) regression is linked to this distribution.

Assumptions and common mistakes

  • Symmetry is built in. The standard Laplace distribution has skewness 0. Skewed data need an asymmetric variant or a different model.
  • β is not the standard deviation. The standard deviation is √2 · β (about 1.414 β). Reporting β as “the SD” understates spread.
  • Scale conventions differ. Some sources use b, λ = 1/β or “diversity”. Check which parameterisation your software uses before comparing outputs.
  • Do not default to normal tails. At the same variance, the probability beyond 2 standard deviations is about 5.9% under Laplace and 4.6% under the normal distribution.
  • Estimate from the median. The maximum likelihood estimate of μ is the sample median, not the mean (see median in NumPy).

How to report it (APA example)

Name the distribution and both parameters, with the estimation method. Example wording: “Residuals were modelled with a Laplace distribution; the maximum likelihood estimates were location μ = 2.80 and scale β = 1.23 (n = 7).” If you fix the distribution in advance, state the justification (for example, a heavy-tailed Q-Q plot) and cite the software and version you used.

How to calculate it in Excel, R or Python

Excel

Excel has no built-in Laplace function. With μ in B1, β in B2 and x in A1:

PDF: =EXP(-ABS(A1-$B$1)/$B$2)/(2*$B$2)
CDF: =IF(A1<$B$1, EXP((A1-$B$1)/$B$2)/2, 1-EXP(-(A1-$B$1)/$B$2)/2)

R

Base R has no Laplace functions, so define them directly:

dlap <- function(x, mu = 0, b = 1) exp(-abs(x - mu) / b) / (2 * b)
plap <- function(x, mu = 0, b = 1) ifelse(x < mu, exp((x - mu) / b) / 2, 1 - exp(-(x - mu) / b) / 2)
dlap(0, 0, 2)   # 0.25
plap(3, 0, 2)   # 0.8884349

Python

SciPy’s scipy.stats.laplace takes loc (μ) and scale (β) and provides pdf, cdf, ppf, rvs and fit:

import numpy as np
from scipy.stats import laplace
laplace.pdf(0, loc=0, scale=2)     # 0.25
laplace.cdf(3, loc=0, scale=2)     # 0.8884349
laplace.ppf(0.975, loc=0, scale=2) # 5.9914645
data = [1.2, 3.4, 2.2, 5.9, 2.8, 0.4, 3.1]
loc, scale = laplace.fit(data)     # (2.8, 1.2285714)
# equals np.median(data) and mean(abs(data - median))

The fitted location is the sample median and the fitted scale is the mean absolute deviation about the median, which is the maximum likelihood solution for this distribution.

Frequently asked questions

What is the Laplace distribution?

A symmetric continuous distribution with density exp(−|x − μ| / β) / (2β), a sharp peak at μ and exponentially decaying tails. It is also called the double exponential distribution.

What is the Laplace distribution formula?

PDF: f(x) = exp(−|x − μ| / β) / (2β). CDF: ez / 2 for z < 0 and 1 − e−z / 2 for z ≥ 0, where z = (x − μ) / β.

Is the Laplacian distribution the same as the Laplace distribution?

In statistics, yes: both names refer to this distribution. The word Laplacian also names an unrelated differential operator in mathematics, so keep the context clear.

What is the variance of the Laplace distribution?

2β², so the standard deviation is √2 · β.

How does the Laplace distribution differ from the normal distribution?

It has a pointier centre and heavier tails: kurtosis 6 versus 3 for the normal distribution. See the comparison table above.

Sources

  • NIST/SEMATECH e-Handbook of Statistical Methods, Double Exponential Distribution, itl.nist.gov/div898/handbook/eda/section3/eda366c.htm (read 2026-11-07).
  • SciPy documentation, scipy.stats.laplace, docs.scipy.org (read 2026-11-07).
  • Dwork, C., and Roth, A. (2014). The algorithmic foundations of differential privacy. Foundations and Trends in Theoretical Computer Science, 9(3-4), 211-407.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Laplace Distribution: Formula, PDF, CDF and Worked Example

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →