Returns the natural logarithm of a number.
ฟังก์ชันนี้ทำงานใน Google Sheets เหมือนกับใน Excel — ไวยากรณ์และอาร์กิวเมนต์เดียวกัน
LN(number)The LN function calculates the logarithm of a number to the base e (the constant 2.71828182845904). It is the inverse function of the EXP function.
=LN(1)ผลลัพธ์: 0
The natural logarithm of 1 is 0.
=LN(EXP(3))ผลลัพธ์: 3
Since LN is the inverse of EXP, the result is the original exponent.
The function will return a #NUM! error because the natural logarithm is undefined for non-positive numbers.