title: Is there a math formula to calculate the following math problem. ( days of spending based on income )
body: <p>I would like to learn how to calculate the following in the most efficient way possible.  i guess there is a math function existing that could do that.  right now i am using google sheet functions. but any programming language will do.</p>
  <p>problem:  We have 37950 $  We have a daily income of 532 $. -&gt;  for how many days in a row can we spend 2700$   in others words,  how many days before the bankroll is under 2700$?</p>
  <p>current state.  now, of course starting money is good for 14 days. then in 14 days we earn around 7473 (its ok to pretend we earn fractions). thus prolonging the streak by close to 3 days., etc, etc.  is there an elegant formula to calculate this ?</p>
  <p>thanks.</p>