Basically, formula doesn't store any value, as the field isn't stored in the database and so doesn't get updated.What happens is when you retrieve the record, the value is calculated and the field populated.
Two over come this type of problems we have couple of ways.
Try not use the formula field use a standard field and a workflow field update that reproduces the formula. That way the field will be stored in the database.
Use the formula in your workflow rule and fire it every time a record is created or edited.