Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Probability density f(x) — 101 points
0
value at the first x
x Probability density f(x)
0 0
0.1 0.28159019
0.2 0.54626787
0.3 0.64420326
0.4 0.65544417
0.5 0.62749608
0.6 0.58357382
0.7 0.53479483
0.8 0.48641578
0.9 0.44081569
1 0.39894228
1.1 0.36103126
1.2 0.32697202
1.3 0.29649637
1.4 0.26927623
1.5 0.24497365
1.6 0.22326545
1.7 0.20385426
1.8 0.18647245
1.9 0.17088224
2 0.15687402
2.1 0.14426385
2.2 0.13289069
2.3 0.12261371
2.4 0.11330975
2.5 0.10487107
2.6 0.09720326
2.7 0.09022355
2.8 0.0838592
2.9 0.07804624
3 0.07272826
3.1 0.06785542
3.2 0.06338366
3.3 0.05927389
3.4 0.05549141
3.5 0.05200533
3.6 0.04878813
3.7 0.04581523
3.8 0.04306462
3.9 0.04051659
4 0.03815346
4.1 0.0359593
4.2 0.03391978
4.3 0.03202199
4.4 0.03025424
4.5 0.02860596
4.6 0.02706758
4.7 0.02563041
4.8 0.02428655
4.9 0.02302884
5 0.02185071
5.1 0.02074622
5.2 0.01970989
5.3 0.01873675
5.4 0.01782224
5.5 0.01696217
5.6 0.01615271
5.7 0.01539033
5.8 0.01467179
5.9 0.01399411
6 0.01335454
6.1 0.01275054
6.2 0.01217978
6.3 0.0116401
6.4 0.01112948
6.5 0.01064609
6.6 0.01018821
6.7 0.00975425
6.8 0.00934273
6.9 0.00895228
7 0.00858163
7.1 0.00822959
7.2 0.00789506
7.3 0.00757702
7.4 0.0072745
7.5 0.00698662
7.6 0.00671253
7.7 0.00645146
7.8 0.00620268
7.9 0.0059655
8 0.0057393
8.1 0.00552346
8.2 0.00531744
8.3 0.00512071
8.4 0.00493277
8.5 0.00475316
8.6 0.00458144
8.7 0.00441722
8.8 0.0042601
8.9 0.00410972
9 0.00396575
9.1 0.00382785
9.2 0.00369574
9.3 0.00356912
9.4 0.00344773
9.5 0.00333132
9.6 0.00321963
9.7 0.00311246
9.8 0.00300958
9.9 0.00291079
10 0.0028159

What this calculator does

The lognormal distribution describes a positive random variable whose natural logarithm is normally distributed. If ln(x) follows a normal distribution with mean μ and standard deviation σ, then x is lognormally distributed. This calculator evaluates one of three functions over a chosen range of x values and returns a table you can read or plot: the probability density f(x), the lower cumulative probability P(x) (the cumulative distribution function), or the upper cumulative probability Q(x) = 1 − P(x).

How to use it

Pick the function to plot, then enter the mean μ and standard deviation σ of ln(x). Set the starting x (Initial value of x), the Step between successive x values, and the Number of points. The calculator evaluates the function at \(x_i = \text{initialX} + i \times \text{step}\) for \(i = 0, 1, \ldots, \text{count}-1\) and tabulates each (x, value) pair. Sigma must be positive and x must be non-negative; at x = 0 the density and lower cumulative are 0 while the upper cumulative is 1.

The formula explained

The density is $$f(x) = \frac{1}{x\,\sigma\sqrt{2\pi}}\exp\!\left(-\frac{\left(\ln x - \mu\right)^{2}}{2\,\sigma^{2}}\right),\quad x>0$$ The cumulative probability is $$P(x) = \Phi\!\left(\frac{\ln x - \mu}{\sigma}\right) = \frac{1}{2}\left[1+\operatorname{erf}\!\left(\frac{\ln x - \mu}{\sigma\sqrt{2}}\right)\right]$$ where \(\Phi\) is the standard normal CDF, \(\Phi(z) = \tfrac{1}{2}(1 + \operatorname{erf}(z/\sqrt{2}))\). The upper cumulative (survival) is $$Q(x) = 1 - \Phi\!\left(\frac{\ln x - \mu}{\sigma}\right) = \frac{1}{2}\left[1-\operatorname{erf}\!\left(\frac{\ln x - \mu}{\sigma\sqrt{2}}\right)\right]$$ We use a high-accuracy rational approximation of erf (maximum error around \(1.5\times10^{-7}\)).

Advertisement
Diagram linking skewed lognormal curve to a symmetric normal bell curve via the logarithm
Taking ln(x) transforms the skewed lognormal distribution into a normal distribution with mean mu and SD sigma.
Lognormal PDF curve with shaded lower and upper cumulative areas split at point x
The lognormal density f(x) with the lower cumulative P(x) and upper cumulative Q(x) areas split at a chosen x.

Worked example

With μ = 0, σ = 1 at x = 1: $$z = \frac{\ln 1 - 0}{1} = 0$$ Density \(= \frac{1}{\sqrt{2\pi}} \approx 0.39894228\). Lower cumulative \(P = \Phi(0) = 0.5\). Upper cumulative \(Q = 1 - 0.5 = 0.5\). At x = 2: \(z = \ln 2 \approx 0.6931\), giving \(f \approx 0.156874\), \(P \approx 0.75568\) and \(Q \approx 0.24432\).

FAQ

Are μ and σ the mean and SD of x? No — they are the mean and standard deviation of ln(x), the underlying normal variable, not of x itself.

What happens at x = 0? The lognormal is defined only for x > 0, so we set f(0) = 0, P(0) = 0 and Q(0) = 1 to avoid ln(0).

Why must σ be positive? A standard deviation of zero or below has no meaningful distribution and would divide by zero, so the calculator rejects \(\sigma \le 0\).

Last updated: