Skip to main content
Question

Logarithm formula in QB

  • September 7, 2021
  • 0 replies
  • 71 views

GeorgeBramhall2
Forum|alt.badge.img+11
who remembers 6th grade math that can help me write this formula that works in an Excel spreadsheet but using a Numeric formula field in Quick Base:
=LOG(x,y)

------------------------------
George Bramhall
------------------------------
This topic has been closed for replies.

BrianCafferelli
Forum|alt.badge.img+17
Hi George, you can use the change of base formula to do this, which says dividing the natural log of a number by the natural log of the base you want to use, will give you the logarithm in the given number base. Quickbase's formula language is optimized for simple business math, but you can use our Ln() formula function to accomplish this.

For example, assume you want to calculate the logarithm of a number M in base b, and you have numeric fields set up for both M and b. You can set up a numeric formula like this:

Ln() / Ln()

Likely you are working with base 10 (decimal) numbers, in which case you can simplify to this:

Ln() / Ln(10)

A few things to keep in mind using this:
1. If you are using the result of this formula in other calculations, do not round this number. Instead, round at the very last step in your sequence of calculations.
2. Likely the result will be a long decimal value. Quickbase can give you an accurate log up to 10-12 decimal places, after which it will be rounded.

In case anyone here has a deeper interest in the math behind this, you can read more about this principle here.​

------------------------------
Brian Cafferelli
Product Marketing Manager | Quick Base
------------------------------