Help

Re: Formulas using natural log

570 2
cancel
Showing results for 
Search instead for 
Did you mean: 
KingTutankhamun
5 - Automation Enthusiast
5 - Automation Enthusiast

I see there is a log formula but I have some formulas using the natural log and that doesn't appear to be an option ive got even though I do have it in excel. Maybe I'm not looking the in the right place. 

Im wondering if there is a way that I can express LN() in airtable.

 

Thanks for reading

4 Replies 4

You can add a second parameter to the LOG() function to specify the base, as documented in the Formula Field Reference. You cannot put "e" as the second parameter, but you can put in an approximation with lots of decimal places.

If you need something more precise, you can resort to an automation with a scripting action and use JavaScript.

Hi,
I'm sorry, but EXP(1) is exactly e and it can be used as second parameter.
Funny, I always though Airtable has only LOG with base 10, and I just knew it has a second parameter.
 


@Alexey_Gusev wrote:

Hi,
I'm sorry, but EXP(1) is exactly e and it can be used as second parameter.
Funny, I always though Airtable has only LOG with base 10, and I just knew it has a second parameter.
 


Oh, neat trick! I've never had a use case for EXP(), so I forgot that it existed. Thanks for the reminder. (Although I'm guessing that EXP(1) is not mathematically exactly e since e is irrational, but it is probably as close as we can realistically get and more than enough for real world calculations.)

LOG({Number}, EXP(1))

 

Alexey_Gusev
13 - Mars
13 - Mars

When I didn't know about second parameter, I used math formulas. Any logarithm can be expressed as
lgab = log(b)/log(a)   (for example,  LOG(65536)/LOG(2) = 16)
Now I know it could be done as LOG(65536,2)