Skip to content

Instantly share code, notes, and snippets.

@kortina
Last active December 20, 2015 14:59
Show Gist options
  • Save kortina/6151031 to your computer and use it in GitHub Desktop.
Save kortina/6151031 to your computer and use it in GitHub Desktop.
Figuring out how to compute average period growth rate given start size, end size, and number of periods.
g = period growth rate, eg, % MOM growth
S = starting size
E = ending size
n = number of periods elapsed between S and E

We know that to compute E from S, g, and n, we can use the equation:

E = S * (1 + g) ^ n

Let's do some algebra to transform this into an equation that solves for g when the other variables are known:

E = S * (1 + g) ^ n

E/S = (1 + g) ^ n

log10(E/S)  = n * log10(1 + g)

log10(E/S) / n = log10(1 + g)

10 ^ (log10(E/S) / n) = 1 + g

g = 10 ^ (log10(E/S) / n) - 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment