How to generate a "log" series of number knowing the start and end?

3.6k Views Asked by At

I'd like to generate a series of number that follow a logarithmic curve style in Google Sheets. I know it kind of means nothing, but maybe this will help: it's for creating a previsional growth chart. So I know what the curve should look like, but don't know how to create it.

I managed to "create" this one but I'd like to be able to specify the start and end number and, if it's possible, the curve "bending" coefficient.

I'm then using the values in some other cells in the spreadsheet. The formula for this plot (blue line) is = 30 + 300 * LN(30 * (COLUMN(A1) - 1) + 1), spreaded over multiple cells of the same row.

Pretty much graphic design but using maths as the tool!


EDIT

I made the Sheet available for anyone interested : https://docs.google.com/spreadsheets/d/147rfa4vrlOFYjrm17LZUoxOAtYC6_VdRN3pvNjR8_cg/edit?usp=sharing

2

There are 2 best solutions below

2
On BEST ANSWER

Suppose I want to place a log curve between points $(x_0,y_0) and (x_f,y_f)$. My equation will be of the form: $$y = a\log(x)+b$$. If I know two points, there is a unique logarithmic curve joining them. Your job is to find the numbers $a$ and $b$ which describe this curve. Then, $y_0 = a\log(x_0)+b$ and $y_f = a\log(x_f)+b$. This is a system of two equations in two variables. Note that $y_f-y_0 = a\log(\frac{x_f}{x_0}) \implies a = \frac{y_f-y_0}{\log(x_f/x_0)}$. After calculating $a$, you can easily find $b$.

1
On

Not an answer but perhaps helpful.

It seems as if what you want is a curve that trends the way your data do, perhaps for prediction.

I would suggest asking your spreadsheet to find that curve.

I suspect the 2018Q4 data point is an anomaly for prediction. I'd leave it out. Then just ask for a logarithmic trendline.

Here's how to do that in Excel

https://support.office.com/en-us/article/choosing-the-best-trendline-for-your-data-1bb3c9e7-0280-45b5-9ab0-d0c93161daa8

Google sheets doesn't have that functionality built in, but there are discussions online if you search for google sheets log trendline .