SOLVETUTORMATH SOLVER

Instrument MI-07-093 · Statistics

Lognormal Distribution Calculator

Some data — particle sizes, time-to-failure, grain sizes — clusters on a log scale rather than a linear one. This instrument computes the lognormal density and its mean, variance, median, and mode.

Instrument MI-07-093
Sheet 1 OF 1
Rev A
Verified
Type 07 — Probability Distributions SER. 2026-07093

Probability density f(x)

0.39894228

f(x) = 1/(x·sigma·sqrt(2·pi)) x e^(-(ln(x)-mu)^2 / (2·sigma^2))

1.648721 Mean, E[X]
4.670774 Variance, Var(X)
1.000000 Median
0.367879 Mode
The working Every figure verified twice
  1. pdf = 1 ⁄ (1·1·√(2·π))·exp(0 − pow(ln(1) − 0, 2) ⁄ (2·pow(1, 2))) = 0.39894228
  2. meanV = exp(0 + pow(1, 2) ⁄ 2) = 1.648721
  3. varV = (exp(pow(1, 2)) − 1)·exp(2·0 + pow(1, 2)) = 4.670774
  4. medianV = exp(0) = 1.000000
  5. modeV = exp(0 − pow(1, 2)) = 0.367879
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

A random variable X is lognormally distributed when its natural logarithm, ln(X), follows an ordinary normal distribution. Practically, that means the lognormal describes positive-only data that's skewed to the right — a long tail of unusually large values alongside a cluster of typical ones — which shows up naturally in processes driven by multiplying many small random factors together rather than adding them, such as particle sizes in a manufacturing process, time until a component fails, or the size distribution of grains after repeated crushing.

The distribution is defined by two parameters carried over directly from the underlying normal distribution of ln(X): mu, the mean of ln(X), and sigma, the standard deviation of ln(X) — not the mean and standard deviation of X itself, which is a common point of confusion. Because of the log transform, the lognormal's mean, median, and mode are all different values (unlike the normal distribution, where all three coincide): mean = e^(mu + sigma²/2), median = e^mu, and mode = e^(mu − sigma²). The mean always sits above the median, which sits above the mode — the signature right-skew of this distribution.

This calculator computes the probability density function and these four moments, but not the cumulative distribution function (CDF) — finding the probability that X falls below some value requires the error function (erf), a special function this calculator's underlying engine does not currently implement, the same scope boundary this site draws around its other distribution calculators that would otherwise require erf. If you need a lognormal probability over a range rather than a density at a single point or the distribution's basic shape statistics, that calculation is out of scope here.

f(x)=1xσ2πe(lnxμ)22σ2f(x) = \frac{1}{x\sigma\sqrt{2\pi}} e^{-\frac{(\ln x - \mu)^2}{2\sigma^2}}
x — the value the density is evaluated at, x > 0 · mu — the mean of ln(X), not of X itself · sigma — the standard deviation of ln(X), must be greater than zero · f(x) — the probability density at x · mean, median, and mode are three distinct values here, unlike in a normal distribution, reflecting the lognormal's right-skewed shape.
  • Enter the log-scale mean into Location parameter (mu = mean of ln X).
  • Enter the log-scale spread into Scale parameter (sigma = stdev of ln X) — must be greater than zero.
  • Enter the specific value you want the density at into x (value, x > 0).
  • Read Probability density f(x) for the density at that exact x.
  • Read Mean, E[X], Variance, Var(X), Median, and Mode beneath for the distribution's overall shape statistics.

Worked example — the standard lognormal at its peak

A manufacturing process produces particles whose size follows a lognormal distribution with mu = 0 and sigma = 1 (the 'standard' lognormal, the simplest case for checking the formula by hand). Enter 0 into Location parameter (mu), 1 into Scale parameter (sigma), and 1 into x. Since ln(1) = 0 = mu, this x sits exactly at the density's structural center on the log scale.

Probability density f(x) reads 1/√(2π) ≈ 0.398942 — the same well-known constant that marks the peak of the standard normal curve, appearing here because ln(1) = mu makes the exponential term equal exactly 1. Mean, E[X] reads e^0.5 ≈ 1.6487, Median reads e^0 = 1.0 exactly, and Mode reads e^(-1) ≈ 0.3679 — three distinct values, with mean above median above mode, the textbook right-skew signature of a lognormal distribution.

Questions

Why are mu and sigma not just the mean and standard deviation of my data?

Because they describe the underlying normal distribution of ln(X), not of X itself. If your raw data is X, you'd take the natural log of every value first, then compute the ordinary mean and standard deviation of those log values to get mu and sigma — plugging the mean and standard deviation of the raw, untransformed data directly into this calculator will give an incorrect result.

Why are the mean, median, and mode all different values here?

Because the lognormal distribution is right-skewed by construction: the log transform that makes ln(X) symmetric (normal) leaves X itself with a long tail toward large values. That asymmetry pulls the mean above the median (a few very large values drag the average up more than they shift the middle), and pulls the mode — the single most likely value — below both. In a symmetric distribution like the normal, all three would coincide; in the lognormal, they never do unless sigma = 0.

Can this calculator find the probability that X falls between two values?

No — that requires the cumulative distribution function (CDF), which for the lognormal (as for the normal distribution it's built from) needs the error function, erf. This calculator's underlying engine doesn't currently implement erf, so only the probability density at a single point and the distribution's basic mean/variance/median/mode statistics are available here, not cumulative or range probabilities.

What kinds of real data actually follow a lognormal distribution?

Data generated by multiplying together many small independent random factors, rather than adding them, tends toward a lognormal shape — classic examples include particle and grain sizes after repeated crushing or grinding, time until mechanical failure in some reliability contexts, and various biological measurements. The common thread is a positive-only quantity with a long right tail: mostly typical values with an occasional much larger one, never a negative one.

What happens if I enter a negative or zero value for x?

The calculator requires x > 0, since the lognormal distribution is defined only for positive values — its density is exactly zero for x ≤ 0 by construction, and the formula itself involves ln(x), which is undefined at zero and for negative numbers. Entering a non-positive x triggers a validation message asking for a positive value instead.

References