spending formula