CitectVBA Programming Reference > CitectVBA Function Reference > Math/Trigonometry Functions > Log


Calculates the natural logarithm of a number

Log expects the argument (Num) to be a valid numeric value. The argument value must be greater than zero.

The natural logarithm is the logarithm to the base e. You can calculate the base-n logarithms for any number X by dividing the natural logarithm of X by the natural logarithm of n as follows:

Logn (X ) = Log(X ) / Log(n )

Note: The value of the constant e is approximately 2.71828.




An Integer or expression representing a valid numeric value.

Return Value

Returns the natural log of the number (Num) provided in the argument.

Related Functions



Variable=Log(100); ! Sets Variable to 2 (i.e. 100=10 to the power 
of 2).