Written and maintained by CASRAI Editorial Board
Last updated
A lognormal distribution describes a positive variable whose logarithm follows a normal distribution. Its two parameters, usually written μ and σ, are the mean and standard deviation of ln(X), not of X itself. Confusing the two is the most common reason lognormal results come out wrong, so this guide keeps the log scale and the original scale apart at every step, with the arithmetic shown.
Lognormal distribution definition
A variable X is lognormally distributed if Y = ln(X) is normally distributed (NIST/SEMATECH e-Handbook of Statistical Methods). Because the logarithm is only defined for positive numbers, X must be greater than zero. The shape is right-skewed on the original scale: a long upper tail, a bulk of values below the mean, and no values below zero. Whether a particular dataset is lognormal is an empirical question, checked on the log scale (see the assumptions section below).
Lognormal distribution formula and symbols
With μ = meanlog and σ = sdlog, the probability density for x > 0 is:
f(x) = 1 / (x σ √(2π)) × exp( −(ln x − μ)² / (2σ²) )
- x: a value of the variable, x > 0.
- μ: the mean of ln(X). It can be any real number.
- σ: the standard deviation of ln(X), with σ > 0. NIST calls it the shape parameter.
- ln: the natural logarithm; e¹ = 2.71828… is its base.
NIST writes the standard form with μ = 0 (location 0, scale 1) and adds a scale parameter m for the general case; m is the median. In the two-parameter form used by R and SciPy, m = eμ.
Lognormal mean, median, mode and variance formulas
| Quantity | Formula (original scale) |
|---|---|
| Median | eμ |
| Mean | eμ + σ²/2 |
| Mode | eμ − σ² |
| Variance | e2μ + σ² (eσ² − 1) |
| Coefficient of variation | √(eσ² − 1), close to σ when σ is small |
| Skewness | (eσ² + 2) √(eσ² − 1) |
The mean, median, variance and coefficient of variation formulas are from the R documentation for the lognormal distribution; the mode and skewness match NIST’s standard form when μ = 0.
Worked example: from μ and σ to median, mean and spread
Suppose ln(X) has μ = 3.0 and σ = 0.5.
- Median = e3.0 = 20.09.
- Mean = e3.0 + 0.5²/2 = e3.125 = 22.76.
- Mode = e3.0 − 0.25 = e2.75 = 15.64.
- Variance = e2(3.0) + 0.25 (e0.25 − 1) = e6.25 × 0.2840 = 518.01 × 0.2840 = 147.13, so the standard deviation is 12.13.
- Coefficient of variation = √(e0.25 − 1) = √0.2840 = 0.533, near σ = 0.5.
- Probability below 30: z = (ln 30 − 3.0) / 0.5 = (3.4012 − 3.0) / 0.5 = 0.802, and the standard normal CDF at 0.802 is 0.789, so P(X < 30) ≈ 0.79.
- Central 95% range of the log scale: 3.0 ± 1.96 × 0.5 = 2.02 to 3.98, which on the original scale is e2.02 = 7.54 to e3.98 = 53.52.
The mean (22.76) exceeds the median (20.09), which exceeds the mode (15.64). That ordering is the signature of a right-skewed distribution.
Estimating the parameters from data
Take six measurements: 12, 18, 25, 31, 47 and 95. Take natural logs: 2.485, 2.890, 3.219, 3.434, 3.850, 4.554. The mean of the logs is 3.405 (this estimates μ) and their sample standard deviation is 0.730 (this estimates σ). Back-transforming gives e3.405 = 30.13, the geometric mean, and e0.730 = 2.08, the geometric standard deviation. For comparison, the raw arithmetic mean is 38.0 and the raw median is 28.0. See the geometric mean guide for why the geometric mean is the natural centre for data like these.
Interpretation: how to read lognormal results
| Feature | What it tells you |
|---|---|
| Median = eμ | Half of values fall below it; for a lognormal it equals the geometric mean. |
| Mean > median > mode | Right skew. The mean is pulled up by the upper tail, so it overstates a typical value. |
| Larger σ | More skew and a larger gap between mean and median; the mean is eσ²/2 times the median. |
| Coefficient of variation | Depends on σ only, not on μ; roughly equal to σ when σ is below about 0.5. |
| eσ (geometric SD) | A multiplicative spread: about two-thirds of values lie between median / eσ and median × eσ. |
Assumptions and common mistakes
- Treating μ and σ as the mean and SD of X. They describe ln(X). The mean of X is eμ + σ²/2, not μ.
- Applying the model to zero or negative values. The density is defined only for x > 0.
- Skipping the check on the log scale. Take logs of the data and examine them for normality; the normality of distribution guide explains Q-Q plots and why formal tests behave differently at small and large n.
- Summing lognormal variables and expecting a lognormal. Products and ratios of independent lognormal variables stay lognormal; sums generally do not.
- Averaging on the raw scale. For multiplicative data, summarise with the geometric mean and geometric SD, or with the median.
If the logs are not approximately normal, a different model may fit better. The guide to choosing a statistical test helps pick an alternative test, and accelerated failure time models show the lognormal used as a survival-time distribution.
How to report a lognormal analysis (APA-style example)
Name the transformation, say how normality was assessed on the log scale, and report summaries on the original scale. A template to adapt to your journal’s style:
Response times were right-skewed and were natural-log transformed before analysis. The logged values were approximately normal (M = 3.41, SD = 0.73, n = 6). Back-transformed, the geometric mean was 30.13 and the geometric standard deviation was 2.08.
Do not describe the log-scale mean as the mean of the original variable.
How to calculate a lognormal distribution in Excel, R or Python
Excel
With the data in A1:A6, estimate the parameters on the log scale and back-transform:
mu_hat =AVERAGE(LN(A1:A6)) sigma_hat =STDEV.S(LN(A1:A6)) median =EXP(mu_hat) mean =EXP(mu_hat + sigma_hat^2/2)
In older Excel versions, enter the LN(A1:A6) formulas as array formulas or add a helper column of =LN(A1) values. Results for the six values above: mu_hat 3.405, sigma_hat 0.730, median 30.13.
R
x <- c(12, 18, 25, 31, 47, 95) mu <- mean(log(x)); s <- sd(log(x)) # meanlog, sdlog exp(mu) # median, 30.13 plnorm(30, meanlog = 3, sdlog = 0.5) # P(X < 30) = 0.789 qlnorm(0.975, 3, 0.5) # 53.52
In R, dlnorm, plnorm, qlnorm and rlnorm take meanlog and sdlog, the mean and SD of the logarithm of the variable.
Python
import numpy as np from scipy.stats import lognorm x = np.array([12, 18, 25, 31, 47, 95]) mu, s = np.log(x).mean(), np.log(x).std(ddof=1) # 3.405, 0.730 d = lognorm(s=0.5, scale=np.exp(3.0)) # s = sigma, scale = exp(mu) d.median(), d.mean(), d.cdf(30) # 20.09, 22.76, 0.789
SciPy parameterises the distribution with the shape s equal to σ and scale equal to eμ; the location defaults to 0. Passing μ directly as scale is a frequent error.
Lognormal distribution FAQ
What is the difference between a lognormal and a normal distribution?
A normal variable can take any real value and is symmetric. A lognormal variable is positive and right-skewed, and becomes normal after taking its natural logarithm.
Is the mean of a lognormal distribution equal to eμ?
No. eμ is the median. The mean is eμ + σ²/2, which is always larger.
Is a lognormal distribution always right-skewed?
Yes, its skewness, (eσ² + 2) √(eσ² − 1), is positive for every σ > 0. It approaches symmetry as σ becomes small but never reaches it.
How do I test whether data are lognormal?
Take natural logs and assess those for normality, for example with a Q-Q plot. See the normality of distribution guide.
How do I convert between log-scale and original-scale parameters?
Median = eμ; mean = eμ + σ²/2; geometric SD = eσ. In SciPy, use s = σ and scale = eμ; in R, use meanlog = μ and sdlog = σ.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, Lognormal Distribution (read 2026-10-29).
- R Documentation, The Log Normal Distribution, stats package (read 2026-10-29).
- SciPy documentation, scipy.stats.lognorm (read 2026-10-29).








