 # SQL Server LOGNORM.INV function

LOGNORM_INV

Updated: 31 July 2015

Use LOGNORM_INV to calculate the inverse of the lognormal distribution function of x, when ln(x) is normally distributed with parameters µ and d.
Syntax
SELECT [wct].[LOGNORM_INV](
<@P, float,>
,<@Mean, float,>
,<@Standard_dev, float,>)
Arguments
@P
the probability associated with the lognormal distribution. @X must be of a type float or of type that intrinsically converts to float.
@Mean
the average of ln(x). @Mean must be of a type float or of type that intrinsically converts to float.
@Standard_dev
the standard deviation of ln(x). @Standard_dev must be of a type float or of type that intrinsically converts to float.
Return Type
float
Remarks
·         0 = @P < 1
·         If @P = 0 then 0 is returned
·         0 < @Standard_dev
Examples
Calculate ln(x) with probability = 0.95 with mean of ln(x) = 3.5 and standard deviation of ln(x) = 1.2
SELECT
wct.LOGNORM_INV(
0.95  --@P
,3.5   --@Mean
,1.2   --@Standard_dev
) as LOGNORM_INV

This produces the following result

The lognormal distribution is related to the normal distribution.
SELECT
wct.LOGNORM_INV(p,mu,sigma) as lognorminv
,EXP(wct.NORMINV(p,mu,sigma)) as expnorminv
FROM (VALUES(0.95,5,0.75))n(p,mu,sigma)

This produces the following result.

### Support  Copyright 2008-2023 Westclintech LLC         Privacy Policy        Terms of Service