Advertisement
Advertisement
STATISTICS

Lognormal Distribution Calculator — PDF, CDF, moments and percentiles

Enter the mean and standard deviation of the underlying normal distribution and get the density, cumulative probability, interval probability, percentiles and every moment of the lognormal.

These are three ways of saying the same thing. The first is the convention this page uses everywhere else; the other two convert to it and show you the μ and σ they produced.
This is the mean of the logarithm, not the mean of X. It may be negative; the lognormal variable itself never is.
Also called the shape parameter. It must be strictly positive; larger values make the distribution more skewed.
Used for the density f(a), the cumulative probability P(X ≤ a) and the lower end of the interval.
Upper end of the interval for P(a ≤ X ≤ b). It should be larger than a.
0.5 returns the median. The quantile is e to the power μ plus σ times the standard normal quantile.
P(X ≤ a) — cumulative probability
 
Density f(a)
P(X > a) survival
P(a ≤ X ≤ b)
Requested percentile
Moments:
Working:
Tip: mean, median and mode are three different numbers here and they always sit in that order, mode below median below mean. Quoting "the average" without saying which one is the commonest way a lognormal result gets misread.
Advertisement

The lognormal distribution calculator above works with the distribution of a variable whose logarithm is normally distributed. It returns the density, the cumulative probability, an interval probability and any percentile, along with the mean, median, mode, variance and coefficient of variation. It states its parameterisation on every screen, because that is where nearly all lognormal errors come from.

Arb Digital publishes it alongside a full set of distribution tools. Our normal distribution calculator handles the symmetric parent distribution, and our inverse normal distribution calculator supplies the standard normal quantiles this page uses internally to build lognormal percentiles.

Which Parameters This Page Uses

The parameters μ and σ on this page are the mean and standard deviation of the underlying normal distribution, that is, of ln X. They are not the mean and standard deviation of X. This is the standard convention and it is also the single most common source of wrong answers, because a reader who enters the mean of their data as μ gets a distribution centred somewhere else entirely.

The NIST/SEMATECH e-Handbook's section 1.3.6.6.9 on the lognormal distribution discusses this directly, noting that the distribution is commonly parameterised either by the shape parameter with a scale parameter m, or by writing μ as the logarithm of m. Both descriptions refer to the same distribution; they simply name different quantities.

To remove the ambiguity in practice this tool offers three input modes. The first takes μ and σ directly. The second takes the median of X, since the median is exactly e to the power μ. The third takes the mean and standard deviation of X itself and inverts the moment formulas to recover μ and σ. Whichever you choose, the working panel shows the μ and σ actually used, so nothing is hidden.

How to Use It

  1. Choose an input mode that matches what you actually have. If your figures came from fitting logged data, use the first; if they came from summary statistics of raw data, use the third.
  2. Set a and b for the point and interval probabilities. Both must be positive, because a lognormal variable is supported only on positive values.
  3. Read the hero as P(X ≤ a) and the survival cell as its complement. They always sum to one.
  4. Set the percentile you need. Reliability and finance work usually wants an upper tail figure such as 0.95 or 0.99.
  5. Check the moments panel before drawing conclusions. Mean, median and mode differ substantially once σ passes about 0.5.

The Formulas and How They Are Calculated

The density is f(x) = 1 ÷ (xσ√(2π)) × exp(−(ln x − μ)² ÷ (2σ²)) for x greater than zero, and zero otherwise. The cumulative distribution is simply F(x) = Φ((ln x − μ) ÷ σ), where Φ is the standard normal CDF, which is the whole reason the distribution is tractable. Wolfram MathWorld's log normal distribution page gives both, writing the parameters as M and S.

The moments are mean = exp(μ + σ²/2), median = exp(μ), mode = exp(μ − σ²), and variance = (exp(σ²) − 1) × exp(2μ + σ²). The coefficient of variation is √(exp(σ²) − 1), which depends only on σ — a fact worth remembering, because it means the relative spread is set entirely by the shape parameter and not at all by the scale.

Work the default. With μ = 0 and σ = 1, the median is e⁰ = 1, the mean is e⁰‧⁵ = 1.6487213, the mode is e⁻¹ = 0.3678794, and the variance is (e − 1)e = 4.6707743, giving a standard deviation of 2.1611974. At a = 2 the CDF is Φ(ln 2) = Φ(0.6931472) = 0.7558914, and the density is 1 ÷ (2√(2π)) × e−0.2402265 = 0.1568740. The 95th percentile is exp(1.6448536) = 5.1802516.

Advertisement

Why Mean, Median and Mode All Differ

For a symmetric distribution the three coincide. A lognormal is right-skewed by construction, so they separate, and they always separate in the same order: mode below median below mean. The gap is controlled entirely by σ. At σ = 0.25 the mean exceeds the median by about three per cent; at σ = 1 it exceeds it by sixty-five per cent; at σ = 2 it exceeds it by a factor of more than seven.

This has a practical consequence that bites regularly. If you have a set of positive measurements — incomes, particle sizes, times to failure, file sizes — and you take the arithmetic mean, you are computing a quantity that sits well above the typical observation. The geometric mean of the same data estimates the median instead, which is usually the number people meant by "typical". Our geometric mean calculator computes it directly.

The reverse trap also exists. Fitting a lognormal to logged data gives you μ and σ, and exponentiating μ gives the median, not the mean. To get the mean back you must add σ²/2 before exponentiating. Forgetting that half-sigma-squared correction understates the mean, and the size of the understatement grows with the variability of the data.

Where the Lognormal Actually Fits

The distribution arises whenever a quantity is the product of many independent positive factors, because taking logarithms turns that product into a sum and the central limit theorem then applies to the sum. That multiplicative origin is the honest test of whether a lognormal is appropriate: not that the data look right-skewed, but that the generating process compounds rather than adds.

Cases that genuinely fit include particle size distributions after repeated fragmentation, the latency period of infectious diseases, some measures of income and city size, and asset prices under the standard geometric Brownian motion assumption used in options pricing. Cases that often do not include queue waiting times, which are frequently better modelled by an exponential or a gamma — our exponential distribution calculator covers that alternative.

A right-skewed histogram is weak evidence on its own, because several distributions produce that shape. The stronger check is to take logarithms of the data and test whether the result is normal. If the logged data are approximately symmetric and bell-shaped, a lognormal is defensible; if they are still skewed, it is not. Our frequency distribution calculator is useful for building the histogram of the logged values.

The Awkward Properties

The lognormal is not closed under addition. The sum of two independent lognormal variables is not lognormal, and it has no closed form at all — which is inconvenient, because portfolios and totals are sums. It is closed under multiplication, so a product of independent lognormals is lognormal with the parameters simply added, which is the mirror image of the normal distribution's behaviour.

Its moment generating function does not exist for any positive argument, because the moments grow fast enough that the defining integral diverges. Every moment is finite, but the function that packages them all is not, which blocks several standard techniques and is one reason lognormal problems tend to be handled numerically rather than analytically.

Finally, the distribution assigns zero probability to zero and to any negative value. That is a feature when modelling something intrinsically positive, and a defect when your data legitimately contain zeros. Adding a small constant before taking logarithms is a common workaround, but the answer then depends on the constant you chose, which is worth stating openly wherever the result is reported. Our beta distribution calculator covers the different case of a variable bounded on both sides.

Need a statistics tool that names its conventions?

Arb Digital builds free calculators that state which parameterisation they use instead of leaving you to guess.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Entering the mean of X as μ — μ is the mean of ln X. Use the third input mode if all you have is the mean and standard deviation of the raw data.
  • Exponentiating μ to get the mean — that gives the median. The mean needs σ²/2 added before exponentiating.
  • Assuming skewed data must be lognormal — take logarithms and check for normality. Gamma, Weibull and Pareto all produce right-skewed histograms too.
  • Adding lognormal variables and expecting a lognormal — the family is closed under multiplication, not addition, and the sum has no closed form.
  • Quoting the arithmetic mean as typical — for a skewed distribution it sits well above the bulk of the data, and the median or geometric mean is usually what was meant.

Related Free Tools From Arb Digital

Work with the parent distribution using the normal distribution calculator, get standard normal quantiles from the inverse normal distribution calculator, estimate the median of multiplicative data with the geometric mean calculator, compare against a memoryless model with the exponential distribution calculator, or handle a doubly bounded variable with the beta distribution calculator. The full free online tools hub lists every statistics tool we publish.

Frequently Asked Questions

Are μ and σ the mean and standard deviation of X?

No. They are the mean and standard deviation of ln X, the underlying normal distribution. This is the standard convention and mistaking it for the moments of X is the commonest error with this distribution.

How do I get μ from summary statistics of my data?

Invert the moment formulas, or use this tool's third input mode, which takes the mean and standard deviation of X and reports the μ and σ it derived from them.

Why is the mean larger than the median?

Because the distribution is right-skewed. The mean is the median multiplied by e to the power sigma squared over two, so the gap grows with the shape parameter and is negligible only when sigma is small.

What is the mode of a lognormal?

e to the power mu minus sigma squared. It always sits below the median, which sits below the mean, and the three coincide only in the limit as sigma approaches zero.

When is a lognormal the right model?

When the quantity is the product of many independent positive factors, because logarithms turn that product into a sum. A right-skewed histogram alone is not sufficient evidence; test the logged data for normality.

Is the sum of two lognormals lognormal?

No. The family is closed under multiplication but not addition, and the distribution of a sum has no closed form, which is why totals of lognormal quantities are usually handled by simulation.

Can a lognormal variable be zero or negative?

No. Its support is strictly positive values, because it is defined as the exponential of a normal variable. Data containing genuine zeros need a different model or an explicit adjustment.

What does the coefficient of variation depend on?

Only on sigma. It is the square root of e to the sigma squared minus one, so the relative spread is fixed entirely by the shape parameter and is unaffected by mu.

This page explains a probability distribution for educational purposes. Choosing a distribution is a modelling decision about how data were generated, and a calculator can evaluate a chosen model but cannot tell you whether it is the right one.

Advertisement
Advertisement

Take it further