Lognormal Distribution Calculator

Evaluate the lognormal density, mean and median from log scale parameters.

Math and PercentUpdated 2026-11-202 min read
Lognormal Distribution Calculator
Probability density
...
Mean...
Median...

What it does

A variable is lognormally distributed when its natural logarithm follows a normal distribution. That construction makes the variable strictly positive and gives it a long right tail, which is why the distribution appears in income data, failure times, particle sizes and many biological measurements.

The two parameters are easy to misread. Mu and sigma are the mean and standard deviation of the logarithm of the value. They are not the mean and standard deviation of the value itself. The tool uses the natural logarithm throughout and asks for positive x only.

The density at x uses the normal density of the log value divided by x. The factor one over x comes from changing variables between the normal and lognormal forms. The result is zero for non positive x, which the tool handles by rejecting such input.

The mean of the lognormal distribution is the exponential of mu plus half sigma squared. The median is simply the exponential of mu. Because sigma is positive, the mean is always larger than the median, which is a quantitative statement about the skew.

This page evaluates the density at one point and reports the mean and median. It does not compute cumulative probabilities or quantiles, and it assumes the unshifted two parameter form rather than a three parameter distribution with a location offset.

How to use

  1. Enter a positive value x.
  2. Enter the mean of the logarithm, mu.
  3. Enter the standard deviation of the logarithm, sigma.
  4. Read the density at x.
  5. Read the mean and median of the distribution.
  6. Remember that mu and sigma describe log values, not raw values.

Formula

f(x) = exp(-(ln(x) - mu)² / (2 sigma²)) / (x sigma sqrt(2 pi)), for x > 0.
x
Positive value where the density is evaluated.
mu
Mean of the natural logarithm of the variable.
sigma
Standard deviation of the logarithm of the variable.
f(x)
Probability density at x.

The mean is exp(mu + sigma²/2) and the median is exp(mu). The variance, not shown here, is exp(2 mu + sigma²) times (exp(sigma²) - 1). If your data are shifted away from zero, a three parameter form is needed instead of this one.

Worked example

Example: x = 10 with mu 0 and sigma 1

Defaults: x 10, mu 0 and sigma 1.

  1. Natural log of 10 is about 2.3026.
  2. Standardised log value: (2.3026 - 0) / 1 = 2.3026.
  3. Exponential term: exp(-0.5 x 2.3026 squared) = exp(-2.651) = 0.0706.
  4. Denominator: 10 x 1 x sqrt(2 pi) = 25.066.
  5. Density: 0.0706 / 25.066 = 0.002816.
  6. Mean is exp(0.5) = 1.649 and median is exp(0) = 1.000.

Reference table

Lognormal density for mu 0 and sigma 1
xDensityComment
10.398942At the median
50.014131Upper side
100.002816Default example
200.000420Tail

Limits

  • Uses the unshifted two parameter form only.
  • Reports density, not cumulative probability.
  • Requires positive x and positive sigma.
  • Parameters must be interpreted on the log scale.

Common mistakes

  • Treating mu as the mean of the raw variable.
  • Entering a negative or zero x.
  • Using log base ten instead of the natural logarithm.
  • Reading density as probability.
  • Comparing this form with a shifted lognormal model.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is the density at x = 1 with the default parameters?

The log of 1 is zero, so the density is 1 divided by sqrt(2 pi), about 0.398942.

Why is the mean larger than the median?

The exponential of mu plus half sigma squared exceeds the exponential of mu, reflecting the long right tail.

What if sigma is entered as zero?

The tool returns the error Enter a scale above 0 and up to 10, because the density is undefined in this parameterisation.

Questions

What is a lognormal distribution?

The distribution of a variable whose natural logarithm is normally distributed.

Where is it used?

For positive skewed data such as incomes, failure times, concentrations and particle sizes.

Are mu and sigma the raw mean and standard deviation?

No. They describe the logarithm of the variable.

Why must x be positive?

Because the variable is defined as the exponential of a normal value, which is always positive.

How do I get the median?

Take the exponential of mu.

Does this tool give probabilities?

No. It gives a density value. Probabilities require integrating the density over an interval.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.