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'm developing a game where I've come to the point where I need a formula to calculate the gold cost of a resource. I want the gold to get lower the more resources are sold, so if A is gold and B is the resource, the higher B gets, the lower A needs to be. I'm posting this here because I'm looking for some different options and the math board seems like a logical place to ask for help with a formula.

Thanks for reading,


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

One of the simplest formulas would be $A=\frac{c}{B^{n}}$ where $c$ and $n$ are arbitrary constants. As $n$ increases, the magnitude of the rate at which $A$ decreases with increasing $B$ increases. $c$ works similarly, but not identically. You can experiment and plug in values to decide what is best.

share|cite|improve this answer
I'll try implementing this formula and let you know how it turned out, thanks alot in advance. – Kevin Peters Jan 28 '13 at 11:24
This works perfectly, thank you. – Kevin Peters Jan 28 '13 at 11:49

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.