Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently creating a game. In this game, you can upgrade buildings to another level by using resources (such as iron, platinum, etc).

Anyway, I am stuck trying to create a formula for the price based on the level of the building.

I have access to theses variables:

  • Default price for the level 1 (ex: 175)
  • The level of the building

I want to create a formula who's always like that:

  • Level 2 = 175*2 = 350
  • Level 3 = 350*2 = 700
  • Level 4 = 700*2 = 1400
  • etc..

Is that possible ? If so, how ?

No worries about how complicated it can be... If it work, it work.

Thanks for any help - been stuck for hours.

share|cite|improve this question
up vote 7 down vote accepted

$$\text{Price of level $n$ = (Default price for level $1$)$ \times 2^{n-1}$.}$$ Hence, if default price for level $1$ is say $175$, then $$\text{Price of level $n = 175 \times 2^{n-1}$.}$$

share|cite|improve this answer

Price of level $n$=$175(2^{n-1})$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.